]> granicus.if.org Git - llvm/commit
[InstCombine] allow sinking fneg operands through an FP min/max
authorSanjay Patel <spatel@rotateright.com>
Tue, 7 May 2019 18:58:07 +0000 (18:58 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 7 May 2019 18:58:07 +0000 (18:58 +0000)
commitd568215bb216ea6522168629689f5ad4b0cb6138
tree680bcd28da4f1dbed6eae3980ac72aa2046ebee1
parent4b077a176c52292f4d302e73c0b26ea6aa6a674d
[InstCombine] allow sinking fneg operands through an FP min/max

Fundamentally/generally, we should not have to rely on bailouts/crippling of
folds. In this particular case, I think we always recognize the inverted
predicate min/max pattern, so there should not be any loss of optimization.
Codegen looks better because we are eliminating an fneg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360180 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCompares.cpp
test/Transforms/InstCombine/minmax-fp.ll