Handle the unsigned form as well
authorChris Lattner <sabre@nondot.org>
Mon, 23 Feb 2004 06:37:33 +0000 (06:37 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 23 Feb 2004 06:37:33 +0000 (06:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11739 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/mul.ll

index e684d31ed3efbfdb7fe26fbd5f8f1df47243d547..f52b0f4251c9d102866a4c55fd651a7b516d3727 100644 (file)
@@ -65,3 +65,10 @@ uint %test11(int %a, uint %b) {
        ret uint %e
 }
 
+uint %test11(ubyte %a, uint %b) {
+       %c = setgt ubyte %a, 127
+       %d = cast bool %c to uint
+       %e = mul uint %d, %b           ; e = b & (a >> 31)
+       ret uint %e
+}
+