[InstCombine] Remove redundant test case.

Patch by Sonam Kumari!

Differential Revision: http://reviews.llvm.org/D5284

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217865 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tilmann Scheller 2014-09-16 08:50:10 +00:00
parent 0218e1e1da
commit 359ae293f5

View File

@ -138,45 +138,35 @@ define i32 @test11(i32 %A, i32 %B) {
; CHECK-NEXT: ret i32 0
}
define i32 @test12(i32 %A, i32 %B) {
%xor1 = xor i32 %B, %A
%not = xor i32 %A, -1
%xor2 = xor i32 %not, %B
%and = and i32 %xor1, %xor2
ret i32 %and
; CHECK-LABEL: @test12(
; CHECK-NEXT: ret i32 0
}
define i32 @test13(i32 %a, i32 %b) {
define i32 @test12(i32 %a, i32 %b) {
%negb = xor i32 %b, -1
%and = and i32 %a, %negb
%nega = xor i32 %a, -1
%xor = xor i32 %and, %nega
ret i32 %xor
; CHECK-LABEL: @test12(
; CHECK-NEXT: %1 = and i32 %a, %b
; CHECK-NEXT: %xor = xor i32 %1, -1
}
define i32 @test13(i32 %a, i32 %b) {
%nega = xor i32 %a, -1
%negb = xor i32 %b, -1
%and = and i32 %a, %negb
%xor = xor i32 %nega, %and
ret i32 %xor
; CHECK-LABEL: @test13(
; CHECK-NEXT: %1 = and i32 %a, %b
; CHECK-NEXT: %xor = xor i32 %1, -1
}
define i32 @test14(i32 %a, i32 %b) {
%nega = xor i32 %a, -1
%negb = xor i32 %b, -1
%and = and i32 %a, %negb
%xor = xor i32 %nega, %and
ret i32 %xor
; CHECK-LABEL: @test14(
; CHECK-NEXT: %1 = and i32 %a, %b
; CHECK-NEXT: %xor = xor i32 %1, -1
}
; (A ^ C) ^ (A | B) -> ((~A) & B) ^ C
define i32 @test15(i32 %a, i32 %b, i32 %c) {
define i32 @test14(i32 %a, i32 %b, i32 %c) {
%neg = xor i32 %a, %c
%or = or i32 %a, %b
%xor = xor i32 %neg, %or
ret i32 %xor
; CHECK-LABEL: @test15(
; CHECK-LABEL: @test14(
; CHECK-NEXT: %[[not:.*]] = xor i32 %a, -1
; CHECK-NEXT: %[[and:.*]] = and i32 %[[not]], %b
; CHECK-NEXT: %[[xor:.*]] = xor i32 %[[and]], %c