OSDN Git Service

Teach InstCombine to canonicalize [SU]div+[AL]shl patterns.
authorNadav Rotem <nrotem@apple.com>
Tue, 28 Aug 2012 10:01:43 +0000 (10:01 +0000)
committerNadav Rotem <nrotem@apple.com>
Tue, 28 Aug 2012 10:01:43 +0000 (10:01 +0000)
commit9753f0b9b4ab33919c5010acb6a7b2dc1e875aff
tree1b51cc99811cc851fded60ed5ec0f232f06b2929
parenteeba6e83175d7835f3648c30a44c2ca12116d40b
Teach InstCombine to canonicalize  [SU]div+[AL]shl patterns.

For example:
  %1 = lshr i32 %x, 2
  %2 = udiv i32 %1, 100

rdar://12182093

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162743 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
test/Transforms/InstCombine/2012-08-28-udiv_ashl.ll [new file with mode: 0644]
test/Transforms/InstCombine/udiv-simplify-bug-1.ll