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)
commitd205602a0b05bd2c28c03117ae5054c34dc8c4f8
tree869250b7dd60bf6bfacee983d0e59d0ce2d5b644
parent9d35e2e70e163d93a1e3da691de6ad9ec22288e6
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.

llvm-svn: 220314
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/test/Transforms/InstCombine/icmp-shr.ll
llvm/test/Transforms/InstSimplify/ashr-nop.ll [deleted file]
llvm/test/Transforms/InstSimplify/shr-nop.ll [new file with mode: 0644]