From bb9004e0dcef07ef7538784e46bbdd3cb3789d24 Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Thu, 13 Dec 2012 14:28:16 +0000 Subject: Revert r170020, "Simplify negated bit test", for now. This assumes (1 << n) is always not zero. Consider n is greater than word size. Although I know it is undefined, this transforms undefined behavior hidden. This led clang unexpected behavior with some failures. I will investigate to fix undefined shl in clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170128 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/InstCombine/icmp.ll | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'test/Transforms') diff --git a/test/Transforms/InstCombine/icmp.ll b/test/Transforms/InstCombine/icmp.ll index d11b6cc756..8e064a4f2f 100644 --- a/test/Transforms/InstCombine/icmp.ll +++ b/test/Transforms/InstCombine/icmp.ll @@ -677,29 +677,3 @@ define i1 @test66(i64 %A, i64 %B) { ; CHECK-NEXT: ret i1 true ret i1 %cmp } - -define i1 @test67(i32 %A, i32 %B) { - %neg = xor i32 %A, -1 - %shl = shl i32 1, %B - %and = and i32 %shl, %neg - %cmp = icmp ne i32 %and, 0 -; CHECK: @test67 -; CHECK-NEXT: %shl = shl i32 1, %B -; CHECK-NEXT: %1 = and i32 %shl, %A -; CHECK-NEXT: %cmp = icmp eq i32 %1, 0 -; CHECK-NEXT: ret i1 %cmp - ret i1 %cmp -} - -define i1 @test68(i32 %A, i32 %B) { - %neg = xor i32 %A, -1 - %shl = shl i32 1, %B - %and = and i32 %shl, %neg - %cmp = icmp eq i32 %and, 0 -; CHECK: @test68 -; CHECK-NEXT: %shl = shl i32 1, %B -; CHECK-NEXT: %1 = and i32 %shl, %A -; CHECK-NEXT: %cmp = icmp ne i32 %1, 0 -; CHECK-NEXT: ret i1 %cmp - ret i1 %cmp -} -- cgit v1.2.3-70-g09d2