[llvm] r365663 - [NFC][InstCombine] Fixup some tests in just-added "omit mask before left-shift" tests
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 10 09:54:13 PDT 2019
Author: lebedevri
Date: Wed Jul 10 09:54:13 2019
New Revision: 365663
URL: http://llvm.org/viewvc/llvm-project?rev=365663&view=rev
Log:
[NFC][InstCombine] Fixup some tests in just-added "omit mask before left-shift" tests
Modified:
llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-a.ll
llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-b.ll
llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-f.ll
Modified: llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-a.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-a.ll?rev=365663&r1=365662&r2=365663&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-a.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-a.ll Wed Jul 10 09:54:13 2019
@@ -228,7 +228,8 @@ define i32 @t6_commutativity1(i32 %nbits
; CHECK-NEXT: call void @use32(i32 [[T3]])
; CHECK-NEXT: call void @use32(i32 [[T4]])
; CHECK-NEXT: call void @use32(i32 [[T5]])
-; CHECK-NEXT: ret i32 [[T4]]
+; CHECK-NEXT: [[T6:%.*]] = shl i32 [[T4]], [[T5]]
+; CHECK-NEXT: ret i32 [[T6]]
;
%t0 = shl i32 1, %nbits0
%t1 = add nsw i32 %t0, -1
@@ -243,7 +244,7 @@ define i32 @t6_commutativity1(i32 %nbits
call void @use32(i32 %t4)
call void @use32(i32 %t5)
%t6 = shl i32 %t4, %t5
- ret i32 %t4
+ ret i32 %t6
}
define i32 @t6_commutativity2(i32 %nbits0, i32 %nbits1) {
; CHECK-LABEL: @t6_commutativity2(
@@ -259,7 +260,8 @@ define i32 @t6_commutativity2(i32 %nbits
; CHECK-NEXT: call void @use32(i32 [[T3]])
; CHECK-NEXT: call void @use32(i32 [[T4]])
; CHECK-NEXT: call void @use32(i32 [[T5]])
-; CHECK-NEXT: ret i32 [[T4]]
+; CHECK-NEXT: [[T6:%.*]] = shl i32 [[T4]], [[T5]]
+; CHECK-NEXT: ret i32 [[T6]]
;
%t0 = shl i32 1, %nbits0
%t1 = add nsw i32 %t0, -1
@@ -274,7 +276,7 @@ define i32 @t6_commutativity2(i32 %nbits
call void @use32(i32 %t4)
call void @use32(i32 %t5)
%t6 = shl i32 %t4, %t5
- ret i32 %t4
+ ret i32 %t6
}
; Fast-math flags. We must not preserve them!
Modified: llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-b.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-b.ll?rev=365663&r1=365662&r2=365663&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-b.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-b.ll Wed Jul 10 09:54:13 2019
@@ -228,7 +228,8 @@ define i32 @t6_commutativity1(i32 %nbits
; CHECK-NEXT: call void @use32(i32 [[T3]])
; CHECK-NEXT: call void @use32(i32 [[T4]])
; CHECK-NEXT: call void @use32(i32 [[T5]])
-; CHECK-NEXT: ret i32 [[T4]]
+; CHECK-NEXT: [[T6:%.*]] = shl i32 [[T4]], [[T5]]
+; CHECK-NEXT: ret i32 [[T6]]
;
%t0 = shl i32 -1, %nbits0
%t1 = xor i32 %t0, -1
@@ -243,7 +244,7 @@ define i32 @t6_commutativity1(i32 %nbits
call void @use32(i32 %t4)
call void @use32(i32 %t5)
%t6 = shl i32 %t4, %t5
- ret i32 %t4
+ ret i32 %t6
}
define i32 @t6_commutativity2(i32 %nbits0, i32 %nbits1) {
; CHECK-LABEL: @t6_commutativity2(
@@ -259,7 +260,8 @@ define i32 @t6_commutativity2(i32 %nbits
; CHECK-NEXT: call void @use32(i32 [[T3]])
; CHECK-NEXT: call void @use32(i32 [[T4]])
; CHECK-NEXT: call void @use32(i32 [[T5]])
-; CHECK-NEXT: ret i32 [[T4]]
+; CHECK-NEXT: [[T6:%.*]] = shl i32 [[T4]], [[T5]]
+; CHECK-NEXT: ret i32 [[T6]]
;
%t0 = shl i32 -1, %nbits0
%t1 = xor i32 %t0, -1
@@ -274,7 +276,7 @@ define i32 @t6_commutativity2(i32 %nbits
call void @use32(i32 %t4)
call void @use32(i32 %t5)
%t6 = shl i32 %t4, %t5
- ret i32 %t4
+ ret i32 %t6
}
; Fast-math flags. We must not preserve them!
Modified: llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-f.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-f.ll?rev=365663&r1=365662&r2=365663&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-f.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/redundant-left-shift-input-masking-variant-f.ll Wed Jul 10 09:54:13 2019
@@ -200,7 +200,8 @@ define i32 @n12(i32 %x, i32 %nbits) {
; CHECK-NEXT: call void @use32(i32 [[T0]])
; CHECK-NEXT: call void @use32(i32 [[T1]])
; CHECK-NEXT: call void @use32(i32 [[T2]])
-; CHECK-NEXT: ret i32 [[T2]]
+; CHECK-NEXT: [[T3:%.*]] = shl i32 [[T1]], [[T2]]
+; CHECK-NEXT: ret i32 [[T3]]
;
%t0 = shl i32 %x, %nbits
%t1 = ashr i32 %t0, %nbits
@@ -209,5 +210,5 @@ define i32 @n12(i32 %x, i32 %nbits) {
call void @use32(i32 %t1)
call void @use32(i32 %t2)
%t3 = shl i32 %t1, %t2 ; shift is smaller than mask
- ret i32 %t2
+ ret i32 %t3
}
More information about the llvm-commits
mailing list