From: Sanjay Patel Date: Fri, 13 Sep 2019 18:33:02 +0000 (+0000) Subject: [SLP] add test for vectorization of constant expressions; NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=942cafda25662ca57707dcdc9ab19d68c416ac21;p=llvm [SLP] add test for vectorization of constant expressions; NFC Goes with D67362. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371879 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Transforms/SLPVectorizer/X86/consecutive-access.ll b/test/Transforms/SLPVectorizer/X86/consecutive-access.ll index cb4d7b707e9..b77c010e252 100644 --- a/test/Transforms/SLPVectorizer/X86/consecutive-access.ll +++ b/test/Transforms/SLPVectorizer/X86/consecutive-access.ll @@ -565,6 +565,19 @@ define void @PR33958(i32** nocapture %p) { ret void } +define void @store_constant_expression(i64* %p) { +; CHECK-LABEL: @store_constant_expression( +; CHECK-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds i64, i64* [[P:%.*]], i64 1 +; CHECK-NEXT: [[TMP1:%.*]] = bitcast i64* [[P]] to <2 x i64>* +; CHECK-NEXT: store <2 x i64> , <2 x i64>* [[TMP1]], align 8 +; CHECK-NEXT: ret void +; + store i64 ptrtoint (i32* @g1 to i64), i64* %p, align 8 + %arrayidx1 = getelementptr inbounds i64, i64* %p, i64 1 + store i64 ptrtoint (i32* @g2 to i64), i64* %arrayidx1, align 8 + ret void +} + 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" } !llvm.ident = !{!0}