OSDN Git Service

InstCombine: Simplify FoldICmpCstShrCst
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 21 Oct 2014 19:51:55 +0000 (19:51 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 21 Oct 2014 19:51:55 +0000 (19:51 +0000)
commitdea8105323ac05acba9f1f34e323898fd554d711
tree1a33b437df5d8cec9291f3f2a3526290df2b342a
parent4af7ead7bdc37928f66bb8b382cca5bef69fa46e
InstCombine: Simplify FoldICmpCstShrCst

This function was complicated by the fact that it tried to perform
canonicalizations that were already preformed by InstSimplify.  Remove
this extra code and move the tests over to InstSimplify.  Add asserts to
make sure our preconditions hold before we make any assumptions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220314 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCompares.cpp
test/Transforms/InstCombine/icmp-shr.ll
test/Transforms/InstSimplify/ashr-nop.ll [deleted file]
test/Transforms/InstSimplify/shr-nop.ll [new file with mode: 0644]