Remove bogus test: for all possible inputs of %X, the 'sub nsw' is guaranteed
authorNick Lewycky <nicholas@mxc.ca>
Tue, 19 Jul 2011 08:22:57 +0000 (08:22 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Tue, 19 Jul 2011 08:22:57 +0000 (08:22 +0000)
to perform a signed wrap. Don't rely on any particular handling of that case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135471 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstSimplify/compare.ll

index d2c564f567b44ed268f63f7f24c0ca6d335ca680..2cbd641a7426f13550630d50da0a4ac5911243a3 100644 (file)
@@ -283,17 +283,6 @@ define i1 @srem3(i16 %X, i32 %Y) {
   ret i1 %E
 }
 
-; CHECK: @srem4
-; CHECK-NEXT: ret i1 false
-define i1 @srem4(i16 %X, i32 %Y) {
-  %A = zext i16 %X to i32
-  %B = or i32 2147483648, %A
-  %C = sub nsw i32 %A, %B
-  %D = srem i32 %C, %Y
-  %E = icmp slt i32 %D, 0
-  ret i1 %E
-}
-
 define i1 @udiv1(i32 %X) {
 ; CHECK: @udiv1
   %A = udiv i32 %X, 1000000