[llvm] 3762880 - [SLP] avoid 'tmp' value name conflict with auto-generated CHECK script; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 1 06:28:35 PDT 2019
Author: Sanjay Patel
Date: 2019-11-01T09:27:35-04:00
New Revision: 37628802bed834aa397475ef6cc36f2589666ef5
URL: https://github.com/llvm/llvm-project/commit/37628802bed834aa397475ef6cc36f2589666ef5
DIFF: https://github.com/llvm/llvm-project/commit/37628802bed834aa397475ef6cc36f2589666ef5.diff
LOG: [SLP] avoid 'tmp' value name conflict with auto-generated CHECK script; NFC
The script uses 'TMP#' as its substitute for nameless values,
so if a test already contains 'tmp#' *named* values, then
there could be trouble. We should probably just fix the
script to avoid this problem going forward, but it's easy
enough to change a test too (and explicitly naming variables
'tmp' is always a sad choice).
Added:
Modified:
llvm/test/Transforms/SLPVectorizer/X86/PR34635.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/PR34635.ll b/llvm/test/Transforms/SLPVectorizer/X86/PR34635.ll
index e36d6f3e4548..daa68b12b330 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/PR34635.ll
+++ b/llvm/test/Transforms/SLPVectorizer/X86/PR34635.ll
@@ -2,97 +2,96 @@
; RUN: opt < %s -mtriple=x86_64-unknown-linux -slp-vectorizer -S -mcpu=corei7 | FileCheck %s
define i32 @main() {
-; CHECK-LABEL: @main(
+; CHECK-LABEL: define {{[^@]+}}@main(
; CHECK-NEXT: bb:
-; CHECK-NEXT: [[TMP:%.*]] = alloca <8 x i32>, align 32
-; CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i32>* [[TMP]] to [8 x i32]*
-; CHECK-NEXT: [[TMP2:%.*]] = alloca i32, align 4
-; CHECK-NEXT: [[TMP3:%.*]] = bitcast <8 x i32>* [[TMP]] to i8*
-; CHECK-NEXT: [[TMP4:%.*]] = getelementptr inbounds <8 x i32>, <8 x i32>* [[TMP]], i64 0, i64 0
-; CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds [8 x i32], [8 x i32]* [[TMP1]], i64 0, i64 1
-; CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds [8 x i32], [8 x i32]* [[TMP1]], i64 0, i64 2
-; CHECK-NEXT: [[TMP7:%.*]] = getelementptr inbounds [8 x i32], [8 x i32]* [[TMP1]], i64 0, i64 3
-; CHECK-NEXT: [[TMP8:%.*]] = getelementptr inbounds [8 x i32], [8 x i32]* [[TMP1]], i64 0, i64 4
-; CHECK-NEXT: [[TMP9:%.*]] = getelementptr inbounds [8 x i32], [8 x i32]* [[TMP1]], i64 0, i64 6
-; CHECK-NEXT: [[TMP10:%.*]] = getelementptr inbounds [8 x i32], [8 x i32]* [[TMP1]], i64 0, i64 5
-; CHECK-NEXT: [[TMP11:%.*]] = getelementptr inbounds [8 x i32], [8 x i32]* [[TMP1]], i64 0, i64 7
-; CHECK-NEXT: store <8 x i32> <i32 -221320154, i32 -756426931, i32 563883532, i32 382683935, i32 144890241, i32 -1052877364, i32 -1052877364, i32 -1016007675>, <8 x i32>* [[TMP]], align 32
-; CHECK-NEXT: [[TMP12:%.*]] = bitcast i32* [[TMP2]] to i8*
-; CHECK-NEXT: [[TMP13:%.*]] = load i32, i32* [[TMP4]], align 32
-; CHECK-NEXT: [[TMP14:%.*]] = load i32, i32* [[TMP5]], align 4
-; CHECK-NEXT: [[TMP15:%.*]] = icmp slt i32 [[TMP14]], [[TMP13]]
-; CHECK-NEXT: [[TMP16:%.*]] = select i1 [[TMP15]], i32 [[TMP14]], i32 [[TMP13]]
-; CHECK-NEXT: [[TMP17:%.*]] = zext i1 [[TMP15]] to i32
-; CHECK-NEXT: [[TMP18:%.*]] = load i32, i32* [[TMP6]], align 8
-; CHECK-NEXT: [[TMP19:%.*]] = icmp slt i32 [[TMP18]], [[TMP16]]
-; CHECK-NEXT: [[TMP20:%.*]] = select i1 [[TMP19]], i32 [[TMP18]], i32 [[TMP16]]
-; CHECK-NEXT: [[TMP21:%.*]] = select i1 [[TMP19]], i32 2, i32 [[TMP16]]
-; CHECK-NEXT: [[TMP22:%.*]] = load i32, i32* [[TMP7]], align 4
-; CHECK-NEXT: [[TMP23:%.*]] = icmp slt i32 [[TMP22]], [[TMP20]]
-; CHECK-NEXT: [[TMP24:%.*]] = select i1 [[TMP23]], i32 [[TMP22]], i32 [[TMP20]]
-; CHECK-NEXT: [[TMP25:%.*]] = select i1 [[TMP23]], i32 3, i32 [[TMP21]]
-; CHECK-NEXT: [[TMP26:%.*]] = load i32, i32* [[TMP8]], align 16
-; CHECK-NEXT: [[TMP27:%.*]] = icmp slt i32 [[TMP26]], [[TMP24]]
-; CHECK-NEXT: [[TMP28:%.*]] = select i1 [[TMP27]], i32 [[TMP26]], i32 [[TMP24]]
-; CHECK-NEXT: [[TMP29:%.*]] = select i1 [[TMP27]], i32 4, i32 [[TMP25]]
-; CHECK-NEXT: [[TMP30:%.*]] = load i32, i32* [[TMP10]], align 4
-; CHECK-NEXT: [[TMP31:%.*]] = icmp slt i32 [[TMP30]], [[TMP28]]
-; CHECK-NEXT: [[TMP32:%.*]] = select i1 [[TMP31]], i32 [[TMP30]], i32 [[TMP28]]
-; CHECK-NEXT: [[TMP33:%.*]] = select i1 [[TMP31]], i32 5, i32 [[TMP29]]
-; CHECK-NEXT: [[TMP34:%.*]] = load i32, i32* [[TMP9]], align 8
-; CHECK-NEXT: [[TMP35:%.*]] = icmp slt i32 [[TMP34]], [[TMP32]]
-; CHECK-NEXT: [[TMP36:%.*]] = select i1 [[TMP35]], i32 [[TMP34]], i32 [[TMP32]]
-; CHECK-NEXT: [[TMP37:%.*]] = select i1 [[TMP35]], i32 6, i32 [[TMP33]]
-; CHECK-NEXT: [[TMP38:%.*]] = load i32, i32* [[TMP11]], align 4
-; CHECK-NEXT: [[TMP39:%.*]] = icmp slt i32 [[TMP38]], [[TMP36]]
-; CHECK-NEXT: [[TMP40:%.*]] = select i1 [[TMP39]], i32 7, i32 [[TMP37]]
-; CHECK-NEXT: store i32 [[TMP40]], i32* [[TMP2]], align 4
+; CHECK-NEXT: [[T:%.*]] = alloca <8 x i32>, align 32
+; CHECK-NEXT: [[T1:%.*]] = bitcast <8 x i32>* [[T]] to [8 x i32]*
+; CHECK-NEXT: [[T2:%.*]] = alloca i32, align 4
+; CHECK-NEXT: [[T3:%.*]] = bitcast <8 x i32>* [[T]] to i8*
+; CHECK-NEXT: [[T4:%.*]] = getelementptr inbounds <8 x i32>, <8 x i32>* [[T]], i64 0, i64 0
+; CHECK-NEXT: [[T5:%.*]] = getelementptr inbounds [8 x i32], [8 x i32]* [[T1]], i64 0, i64 1
+; CHECK-NEXT: [[T6:%.*]] = getelementptr inbounds [8 x i32], [8 x i32]* [[T1]], i64 0, i64 2
+; CHECK-NEXT: [[T7:%.*]] = getelementptr inbounds [8 x i32], [8 x i32]* [[T1]], i64 0, i64 3
+; CHECK-NEXT: [[T8:%.*]] = getelementptr inbounds [8 x i32], [8 x i32]* [[T1]], i64 0, i64 4
+; CHECK-NEXT: [[T9:%.*]] = getelementptr inbounds [8 x i32], [8 x i32]* [[T1]], i64 0, i64 6
+; CHECK-NEXT: [[T10:%.*]] = getelementptr inbounds [8 x i32], [8 x i32]* [[T1]], i64 0, i64 5
+; CHECK-NEXT: [[T11:%.*]] = getelementptr inbounds [8 x i32], [8 x i32]* [[T1]], i64 0, i64 7
+; CHECK-NEXT: store <8 x i32> <i32 -221320154, i32 -756426931, i32 563883532, i32 382683935, i32 144890241, i32 -1052877364, i32 -1052877364, i32 -1016007675>, <8 x i32>* [[T]], align 32
+; CHECK-NEXT: [[T12:%.*]] = bitcast i32* [[T2]] to i8*
+; CHECK-NEXT: [[T13:%.*]] = load i32, i32* [[T4]], align 32
+; CHECK-NEXT: [[T14:%.*]] = load i32, i32* [[T5]], align 4
+; CHECK-NEXT: [[T15:%.*]] = icmp slt i32 [[T14]], [[T13]]
+; CHECK-NEXT: [[T16:%.*]] = select i1 [[T15]], i32 [[T14]], i32 [[T13]]
+; CHECK-NEXT: [[T17:%.*]] = zext i1 [[T15]] to i32
+; CHECK-NEXT: [[T18:%.*]] = load i32, i32* [[T6]], align 8
+; CHECK-NEXT: [[T19:%.*]] = icmp slt i32 [[T18]], [[T16]]
+; CHECK-NEXT: [[T20:%.*]] = select i1 [[T19]], i32 [[T18]], i32 [[T16]]
+; CHECK-NEXT: [[T21:%.*]] = select i1 [[T19]], i32 2, i32 [[T16]]
+; CHECK-NEXT: [[T22:%.*]] = load i32, i32* [[T7]], align 4
+; CHECK-NEXT: [[T23:%.*]] = icmp slt i32 [[T22]], [[T20]]
+; CHECK-NEXT: [[T24:%.*]] = select i1 [[T23]], i32 [[T22]], i32 [[T20]]
+; CHECK-NEXT: [[T25:%.*]] = select i1 [[T23]], i32 3, i32 [[T21]]
+; CHECK-NEXT: [[T26:%.*]] = load i32, i32* [[T8]], align 16
+; CHECK-NEXT: [[T27:%.*]] = icmp slt i32 [[T26]], [[T24]]
+; CHECK-NEXT: [[T28:%.*]] = select i1 [[T27]], i32 [[T26]], i32 [[T24]]
+; CHECK-NEXT: [[T29:%.*]] = select i1 [[T27]], i32 4, i32 [[T25]]
+; CHECK-NEXT: [[T30:%.*]] = load i32, i32* [[T10]], align 4
+; CHECK-NEXT: [[T31:%.*]] = icmp slt i32 [[T30]], [[T28]]
+; CHECK-NEXT: [[T32:%.*]] = select i1 [[T31]], i32 [[T30]], i32 [[T28]]
+; CHECK-NEXT: [[T33:%.*]] = select i1 [[T31]], i32 5, i32 [[T29]]
+; CHECK-NEXT: [[T34:%.*]] = load i32, i32* [[T9]], align 8
+; CHECK-NEXT: [[T35:%.*]] = icmp slt i32 [[T34]], [[T32]]
+; CHECK-NEXT: [[T36:%.*]] = select i1 [[T35]], i32 [[T34]], i32 [[T32]]
+; CHECK-NEXT: [[T37:%.*]] = select i1 [[T35]], i32 6, i32 [[T33]]
+; CHECK-NEXT: [[T38:%.*]] = load i32, i32* [[T11]], align 4
+; CHECK-NEXT: [[T39:%.*]] = icmp slt i32 [[T38]], [[T36]]
+; CHECK-NEXT: [[T40:%.*]] = select i1 [[T39]], i32 7, i32 [[T37]]
+; CHECK-NEXT: store i32 [[T40]], i32* [[T2]], align 4
; CHECK-NEXT: ret i32 0
;
bb:
- %tmp = alloca <8 x i32>, align 32
- %tmp1 = bitcast <8 x i32>* %tmp to [8 x i32]*
- %tmp2 = alloca i32, align 4
- %tmp3 = bitcast <8 x i32>* %tmp to i8*
- %tmp4 = getelementptr inbounds <8 x i32>, <8 x i32>* %tmp, i64 0, i64 0
- %tmp5 = getelementptr inbounds [8 x i32], [8 x i32]* %tmp1, i64 0, i64 1
- %tmp6 = getelementptr inbounds [8 x i32], [8 x i32]* %tmp1, i64 0, i64 2
- %tmp7 = getelementptr inbounds [8 x i32], [8 x i32]* %tmp1, i64 0, i64 3
- %tmp8 = getelementptr inbounds [8 x i32], [8 x i32]* %tmp1, i64 0, i64 4
- %tmp9 = getelementptr inbounds [8 x i32], [8 x i32]* %tmp1, i64 0, i64 6
- %tmp10 = getelementptr inbounds [8 x i32], [8 x i32]* %tmp1, i64 0, i64 5
- %tmp11 = getelementptr inbounds [8 x i32], [8 x i32]* %tmp1, i64 0, i64 7
- store <8 x i32> <i32 -221320154, i32 -756426931, i32 563883532, i32 382683935, i32 144890241, i32 -1052877364, i32 -1052877364, i32 -1016007675>, <8 x i32>* %tmp, align 32
- %tmp12 = bitcast i32* %tmp2 to i8*
- %tmp13 = load i32, i32* %tmp4, align 32
- %tmp14 = load i32, i32* %tmp5, align 4
- %tmp15 = icmp slt i32 %tmp14, %tmp13
- %tmp16 = select i1 %tmp15, i32 %tmp14, i32 %tmp13
- %tmp17 = zext i1 %tmp15 to i32
- %tmp18 = load i32, i32* %tmp6, align 8
- %tmp19 = icmp slt i32 %tmp18, %tmp16
- %tmp20 = select i1 %tmp19, i32 %tmp18, i32 %tmp16
- %tmp21 = select i1 %tmp19, i32 2, i32 %tmp16
- %tmp22 = load i32, i32* %tmp7, align 4
- %tmp23 = icmp slt i32 %tmp22, %tmp20
- %tmp24 = select i1 %tmp23, i32 %tmp22, i32 %tmp20
- %tmp25 = select i1 %tmp23, i32 3, i32 %tmp21
- %tmp26 = load i32, i32* %tmp8, align 16
- %tmp27 = icmp slt i32 %tmp26, %tmp24
- %tmp28 = select i1 %tmp27, i32 %tmp26, i32 %tmp24
- %tmp29 = select i1 %tmp27, i32 4, i32 %tmp25
- %tmp30 = load i32, i32* %tmp10, align 4
- %tmp31 = icmp slt i32 %tmp30, %tmp28
- %tmp32 = select i1 %tmp31, i32 %tmp30, i32 %tmp28
- %tmp33 = select i1 %tmp31, i32 5, i32 %tmp29
- %tmp34 = load i32, i32* %tmp9, align 8
- %tmp35 = icmp slt i32 %tmp34, %tmp32
- %tmp36 = select i1 %tmp35, i32 %tmp34, i32 %tmp32
- %tmp37 = select i1 %tmp35, i32 6, i32 %tmp33
- %tmp38 = load i32, i32* %tmp11, align 4
- %tmp39 = icmp slt i32 %tmp38, %tmp36
- %tmp40 = select i1 %tmp39, i32 7, i32 %tmp37
- store i32 %tmp40, i32* %tmp2, align 4
+ %t = alloca <8 x i32>, align 32
+ %t1 = bitcast <8 x i32>* %t to [8 x i32]*
+ %t2 = alloca i32, align 4
+ %t3 = bitcast <8 x i32>* %t to i8*
+ %t4 = getelementptr inbounds <8 x i32>, <8 x i32>* %t, i64 0, i64 0
+ %t5 = getelementptr inbounds [8 x i32], [8 x i32]* %t1, i64 0, i64 1
+ %t6 = getelementptr inbounds [8 x i32], [8 x i32]* %t1, i64 0, i64 2
+ %t7 = getelementptr inbounds [8 x i32], [8 x i32]* %t1, i64 0, i64 3
+ %t8 = getelementptr inbounds [8 x i32], [8 x i32]* %t1, i64 0, i64 4
+ %t9 = getelementptr inbounds [8 x i32], [8 x i32]* %t1, i64 0, i64 6
+ %t10 = getelementptr inbounds [8 x i32], [8 x i32]* %t1, i64 0, i64 5
+ %t11 = getelementptr inbounds [8 x i32], [8 x i32]* %t1, i64 0, i64 7
+ store <8 x i32> <i32 -221320154, i32 -756426931, i32 563883532, i32 382683935, i32 144890241, i32 -1052877364, i32 -1052877364, i32 -1016007675>, <8 x i32>* %t, align 32
+ %t12 = bitcast i32* %t2 to i8*
+ %t13 = load i32, i32* %t4, align 32
+ %t14 = load i32, i32* %t5, align 4
+ %t15 = icmp slt i32 %t14, %t13
+ %t16 = select i1 %t15, i32 %t14, i32 %t13
+ %t17 = zext i1 %t15 to i32
+ %t18 = load i32, i32* %t6, align 8
+ %t19 = icmp slt i32 %t18, %t16
+ %t20 = select i1 %t19, i32 %t18, i32 %t16
+ %t21 = select i1 %t19, i32 2, i32 %t16
+ %t22 = load i32, i32* %t7, align 4
+ %t23 = icmp slt i32 %t22, %t20
+ %t24 = select i1 %t23, i32 %t22, i32 %t20
+ %t25 = select i1 %t23, i32 3, i32 %t21
+ %t26 = load i32, i32* %t8, align 16
+ %t27 = icmp slt i32 %t26, %t24
+ %t28 = select i1 %t27, i32 %t26, i32 %t24
+ %t29 = select i1 %t27, i32 4, i32 %t25
+ %t30 = load i32, i32* %t10, align 4
+ %t31 = icmp slt i32 %t30, %t28
+ %t32 = select i1 %t31, i32 %t30, i32 %t28
+ %t33 = select i1 %t31, i32 5, i32 %t29
+ %t34 = load i32, i32* %t9, align 8
+ %t35 = icmp slt i32 %t34, %t32
+ %t36 = select i1 %t35, i32 %t34, i32 %t32
+ %t37 = select i1 %t35, i32 6, i32 %t33
+ %t38 = load i32, i32* %t11, align 4
+ %t39 = icmp slt i32 %t38, %t36
+ %t40 = select i1 %t39, i32 7, i32 %t37
+ store i32 %t40, i32* %t2, align 4
ret i32 0
}
-
More information about the llvm-commits
mailing list