Move some rem transforms out of instcombine and into instsimplify.
authorDuncan Sands <baldrick@free.fr>
Mon, 2 May 2011 16:27:02 +0000 (16:27 +0000)
committerDuncan Sands <baldrick@free.fr>
Mon, 2 May 2011 16:27:02 +0000 (16:27 +0000)
commitf24ed77d2416b66178d8ff1d807858dfab37ca18
tree6d831345e74800af4d0f3b17b53923c807895239
parent2866edf1204133b4627358d9d5ccd80a4b699cf1
Move some rem transforms out of instcombine and into instsimplify.
This automagically provides a transform noticed by my super-optimizer
as occurring quite often: "rem x, (select cond, x, 1)" -> 0.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130694 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
test/Transforms/InstSimplify/rem.ll [new file with mode: 0644]