This multiply can be eliminated
authorChris Lattner <sabre@nondot.org>
Mon, 23 Feb 2004 05:38:47 +0000 (05:38 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 23 Feb 2004 05:38:47 +0000 (05:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11733 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/mul.ll

index 2cafce0328a9cd97e5c72165b2fdc4733e2d17e9..34a45724e5d40f02a9a58fff5804a9e8b23988af 100644 (file)
@@ -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
+}
+