[SLP] fix fast-math-flag propagation on FP reductions
authorSanjay Patel <spatel@rotateright.com>
Sat, 23 Jan 2021 15:37:55 +0000 (10:37 -0500)
committerSanjay Patel <spatel@rotateright.com>
Sat, 23 Jan 2021 16:17:20 +0000 (11:17 -0500)
commita6f02212764a76935ec5fb704fe86a1a76f65745
tree4d28d98e06035b78e757e469dfb18308ae1c130a
parent39e1e53a7c162652c6c138d1bcf50d2766fe9561
[SLP] fix fast-math-flag propagation on FP reductions

As shown in the test diffs, we could miscompile by
propagating flags that did not exist in the original
code.

The flags required for fmin/fmax reductions will be
fixed in a follow-up patch.
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/horizontal.ll