summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/mul.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-23 05:38:47 +0000
committerChris Lattner <sabre@nondot.org>2004-02-23 05:38:47 +0000
commit1dda055e55aaaeb055b01f8508d1607bd60dad3f (patch)
treeff059339a744ef675e83fd921f898cb9066227ec /test/Transforms/InstCombine/mul.ll
parentfc2b449a17c540285af2c358b31126c2ad666dec (diff)
downloadllvm-1dda055e55aaaeb055b01f8508d1607bd60dad3f.tar.gz
llvm-1dda055e55aaaeb055b01f8508d1607bd60dad3f.tar.bz2
llvm-1dda055e55aaaeb055b01f8508d1607bd60dad3f.tar.xz
This multiply can be eliminated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11733 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/mul.ll')
-rw-r--r--test/Transforms/InstCombine/mul.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/mul.ll b/test/Transforms/InstCombine/mul.ll
index 2cafce0328..34a45724e5 100644
--- a/test/Transforms/InstCombine/mul.ll
+++ b/test/Transforms/InstCombine/mul.ll
@@ -50,3 +50,11 @@ uint %test9(uint %i) {
%j = mul uint %i, 4294967295 ; %j = sub 0, %i
ret uint %j
}
+
+uint %test10(int %a, uint %b) {
+ %c = setlt int %a, 0
+ %d = cast bool %c to uint
+ %e = mul uint %d, %b ; e = b & (a >> 31)
+ ret uint %e
+}
+