Skip to content

Commit 338cea0

Browse files
committed
[𝘀𝗽𝗿] changes introduced through rebase
Created using spr 1.3.4 [skip ci]
1 parent b2f212d commit 338cea0

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

llvm/test/Transforms/LoopVectorize/X86/vplan-noinbounds-gep.ll renamed to llvm/test/Transforms/LoopVectorize/X86/drop-inbounds-flags-for-reverse-vector-pointer.ll

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
55
target triple = "x86_64-unknown-linux-gnu"
66

7+
; FIXME: GEP flags on GEPs for reverse vector pointer need to be dropped when folding the tail.
8+
79
; Function Attrs: nofree norecurse nosync nounwind memory(none)
8-
define i1 @fn(ptr %nno) local_unnamed_addr #0 {
10+
define i1 @fn(ptr %nno) #0 {
911
; CHECK-LABEL: define i1 @fn(
10-
; CHECK-SAME: ptr [[NNO:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
12+
; CHECK-SAME: ptr [[NNO:%.*]]) #[[ATTR0:[0-9]+]] {
1113
; CHECK-NEXT: entry:
1214
; CHECK-NEXT: br i1 false, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]]
1315
; CHECK: vector.ph:
@@ -24,7 +26,7 @@ define i1 @fn(ptr %nno) local_unnamed_addr #0 {
2426
; CHECK-NEXT: [[TMP1:%.*]] = icmp ule <4 x i64> [[VEC_IV]], splat (i64 10)
2527
; CHECK-NEXT: [[TMP2:%.*]] = and <4 x i64> [[VEC_IND]], splat (i64 1)
2628
; CHECK-NEXT: [[TMP3:%.*]] = icmp eq <4 x i64> [[TMP2]], zeroinitializer
27-
; CHECK-NEXT: [[TMP23:%.*]] = getelementptr inbounds nuw [12 x i32], ptr [[NNO]], i64 0, i64 [[TMP22]]
29+
; CHECK-NEXT: [[TMP23:%.*]] = getelementptr inbounds nuw i32, ptr [[NNO]], i64 [[TMP22]]
2830
; CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds i32, ptr [[TMP23]], i32 0
2931
; CHECK-NEXT: [[TMP6:%.*]] = getelementptr inbounds i32, ptr [[TMP5]], i32 -3
3032
; CHECK-NEXT: [[REVERSE:%.*]] = shufflevector <4 x i1> [[TMP1]], <4 x i1> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
@@ -53,7 +55,7 @@ define i1 @fn(ptr %nno) local_unnamed_addr #0 {
5355
; CHECK-NEXT: [[SUM_01:%.*]] = phi i32 [ [[BC_MERGE_RDX]], [[SCALAR_PH]] ], [ [[SUM_1:%.*]], [[FOR_INC35]] ]
5456
; CHECK-NEXT: [[REM4:%.*]] = and i64 [[INDVARS_IV]], 1
5557
; CHECK-NEXT: [[CMP21:%.*]] = icmp eq i64 [[REM4]], 0
56-
; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds nuw [12 x i32], ptr [[NNO]], i64 0, i64 [[INDVARS_IV]]
58+
; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds nuw i32, ptr [[NNO]], i64 [[INDVARS_IV]]
5759
; CHECK-NEXT: [[TMP15:%.*]] = load i32, ptr [[GEP]], align 4
5860
; CHECK-NEXT: br i1 [[CMP21]], label [[IF_THEN22:%.*]], label [[FOR_INC35]]
5961
; CHECK: if.then:
@@ -79,7 +81,7 @@ loop.header: ; preds = %entry, %loop.latch
7981
%sum.01 = phi i32 [ 0, %entry ], [ %sum.1, %loop.latch ]
8082
%rem4 = and i64 %iv, 1
8183
%cmp21 = icmp eq i64 %rem4, 0
82-
%gep = getelementptr inbounds nuw [12 x i32], ptr %nno, i64 0, i64 %iv
84+
%gep = getelementptr inbounds nuw i32, ptr %nno, i64 %iv
8385
%0 = load i32, ptr %gep, align 4
8486
br i1 %cmp21, label %if.then, label %loop.latch
8587

@@ -101,4 +103,4 @@ exit: ; preds = %loop.latch
101103
ret i1 %cmp41
102104
}
103105

104-
attributes #0 = { nofree norecurse nosync nounwind memory(none) "target-features"="+aes,+avx,+cmov,+crc32,+cx16,+cx8,+fxsr,+mmx,+pclmul,+popcnt,+prfchw,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" }
106+
attributes #0 = { "target-features"="+avx" }

0 commit comments

Comments
 (0)