Reapply r237520 with another fix for infinite looping
authorJames Molloy <james.molloy@arm.com>
Sun, 17 May 2015 08:27:27 +0000 (08:27 +0000)
committerJames Molloy <james.molloy@arm.com>
Sun, 17 May 2015 08:27:27 +0000 (08:27 +0000)
commit2bb2ea810545e8a051a8e7b3fd2b27ed92ff4b24
tree4f22e6429cb2f96cac4503bffdac1472e4d29da3
parenta0eb8033762a1a4765c06957419eb889ddace887
Reapply r237520 with another fix for infinite looping

SimplifyDemandedBits was "simplifying" a constant by removing just sign bits.
This caused a canonicalization race between different parts of instcombine.

Fix and regression test added - third time lucky?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237539 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCasts.cpp
lib/Transforms/InstCombine/InstCombineCompares.cpp
lib/Transforms/InstCombine/InstCombineSelect.cpp
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/minmax-fold.ll [new file with mode: 0644]