Skip to content

Commit 4ba6717

Browse files
committed
[SLP] add test for vectorization of constant expressions; NFC
Goes with D67362. llvm-svn: 371879
1 parent 41d9d50 commit 4ba6717

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

llvm/test/Transforms/SLPVectorizer/X86/consecutive-access.ll

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,19 @@ define void @PR33958(i32** nocapture %p) {
565565
ret void
566566
}
567567

568+
define void @store_constant_expression(i64* %p) {
569+
; CHECK-LABEL: @store_constant_expression(
570+
; CHECK-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds i64, i64* [[P:%.*]], i64 1
571+
; CHECK-NEXT: [[TMP1:%.*]] = bitcast i64* [[P]] to <2 x i64>*
572+
; CHECK-NEXT: store <2 x i64> <i64 ptrtoint (i32* @g1 to i64), i64 ptrtoint (i32* @g2 to i64)>, <2 x i64>* [[TMP1]], align 8
573+
; CHECK-NEXT: ret void
574+
;
575+
store i64 ptrtoint (i32* @g1 to i64), i64* %p, align 8
576+
%arrayidx1 = getelementptr inbounds i64, i64* %p, i64 1
577+
store i64 ptrtoint (i32* @g2 to i64), i64* %arrayidx1, align 8
578+
ret void
579+
}
580+
568581
attributes #0 = { nounwind ssp uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
569582

570583
!llvm.ident = !{!0}

0 commit comments

Comments
 (0)