Fold "icmp pred (srem X, Y), Y" like we do for urem. Handle signed comparisons
authorNick Lewycky <nicholas@mxc.ca>
Fri, 4 Mar 2011 10:06:52 +0000 (10:06 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Fri, 4 Mar 2011 10:06:52 +0000 (10:06 +0000)
commit786792784e898f29febb3e7270d54b0e21e3c904
treef78e6e1fe0cbd54096297b2eb788daf50719d749
parent3a73e343d02ba3a00adf03311183cc0ccc960978
Fold "icmp pred (srem X, Y), Y" like we do for urem. Handle signed comparisons
in the urem case, though not the other way around. This is enough to get #3 from
PR9343!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126991 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InstructionSimplify.cpp
test/Transforms/InstCombine/icmp.ll
test/Transforms/InstSimplify/compare.ll