diff options
author | Chris Lattner <sabre@nondot.org> | 2011-02-06 21:44:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-02-06 21:44:57 +0000 |
commit | 35bda8914c0d1c02a6f90f42e7810c83150737e1 (patch) | |
tree | b210ccd009a7ac5331c76c6393b5b45d141d12d0 /test/Transforms | |
parent | bd75021465e7f8c81785e692cfd3ce559764e46f (diff) | |
download | llvm-35bda8914c0d1c02a6f90f42e7810c83150737e1.tar.gz llvm-35bda8914c0d1c02a6f90f42e7810c83150737e1.tar.bz2 llvm-35bda8914c0d1c02a6f90f42e7810c83150737e1.tar.xz |
enhance vmcore to know that udiv's can be exact, and add a trivial
instcombine xform to exercise this.
Nothing forms exact udivs yet though. This is progress on PR8862
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124992 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/InstCombine/exact.ll (renamed from test/Transforms/InstCombine/exact-sdiv.ll) | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/exact-sdiv.ll b/test/Transforms/InstCombine/exact.ll index e5677541e9..940469ea71 100644 --- a/test/Transforms/InstCombine/exact-sdiv.ll +++ b/test/Transforms/InstCombine/exact.ll @@ -50,3 +50,11 @@ define i32 @b1(i32 %x) { %z = mul i32 %y, -3 ret i32 %z } + +; CHECK: i32 @b2 +; CHECK: ret i32 %x +define i32 @b2(i32 %x, i32 %w) { + %y = udiv exact i32 %x, %w + %z = mul i32 %y, %w + ret i32 %z +} |