[PATCH] D45453: [InstCombine] Enable Add/Sub simplifications with only 'reassoc' FMF
Warren Ristow via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 14 12:53:04 PDT 2018
wristow added inline comments.
================
Comment at: test/Transforms/InstCombine/fast-math.ll:392
+;
+ %mul = fmul reassoc nsz float %x, 7.000000e+00
+ %sub = fsub reassoc nsz float %mul, %x
----------------
spatel wrote:
> Maybe independent of this patch, but the fmul shouldn't need any FMF for this fold, so it's worth checking if that actually happens. Another consideration is whether the fmul hasOneUse(). We definitely don't have enough multi-use tests to show that folds are not unintentionally creating extra instructions.
Hmmm... You're saying that the transformation:
`c1 * x - x => (c1 - 1.0) * x`
shouldn't need any FMF? That doesn't seem right to me. I //think //both 'reassoc' and 'nsz' should be needed.
https://reviews.llvm.org/D45453
More information about the llvm-commits
mailing list