diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2017-10-09 19:08:15 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2017-10-09 19:08:15 +0000 |
| commit | 6ab4d075ff40675af20ffc4124d1dc03609518fe (patch) | |
| tree | 5483ef5bf4fe0294e8d8a2539aefb1fe675502c1 /llvm/test | |
| parent | 8c01d47e52796fcef095c39ec5cabe6bbb8309ae (diff) | |
| download | bcm5719-llvm-6ab4d075ff40675af20ffc4124d1dc03609518fe.tar.gz bcm5719-llvm-6ab4d075ff40675af20ffc4124d1dc03609518fe.zip | |
[SLP] Add test for reversed load, NFC.
llvm-svn: 315232
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/SLPVectorizer/X86/PR32086.ll | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/PR32086.ll b/llvm/test/Transforms/SLPVectorizer/X86/PR32086.ll index f692f46b430..ee9ee7c34de 100644 --- a/llvm/test/Transforms/SLPVectorizer/X86/PR32086.ll +++ b/llvm/test/Transforms/SLPVectorizer/X86/PR32086.ll @@ -30,3 +30,33 @@ define void @i64_simplified(i64* noalias %st, i64* noalias %ld) { store i64 %t1, i64* %arrayidx5, align 8 ret void } + +define void @i64_simplifiedi_reversed(i64* noalias %st, i64* noalias %ld) { +; CHECK-LABEL: @i64_simplifiedi_reversed( +; CHECK-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds i64, i64* [[LD:%.*]], i64 1 +; CHECK-NEXT: [[T0:%.*]] = load i64, i64* [[LD]], align 8 +; CHECK-NEXT: [[T1:%.*]] = load i64, i64* [[ARRAYIDX1]], align 8 +; CHECK-NEXT: [[ARRAYIDX3:%.*]] = getelementptr inbounds i64, i64* [[ST:%.*]], i64 1 +; CHECK-NEXT: [[ARRAYIDX4:%.*]] = getelementptr inbounds i64, i64* [[ST]], i64 2 +; CHECK-NEXT: [[ARRAYIDX5:%.*]] = getelementptr inbounds i64, i64* [[ST]], i64 3 +; CHECK-NEXT: store i64 [[T1]], i64* [[ST]], align 8 +; CHECK-NEXT: store i64 [[T0]], i64* [[ARRAYIDX3]], align 8 +; CHECK-NEXT: store i64 [[T1]], i64* [[ARRAYIDX4]], align 8 +; CHECK-NEXT: store i64 [[T0]], i64* [[ARRAYIDX5]], align 8 +; CHECK-NEXT: ret void +; + %arrayidx1 = getelementptr inbounds i64, i64* %ld, i64 1 + + %t0 = load i64, i64* %ld, align 8 + %t1 = load i64, i64* %arrayidx1, align 8 + + %arrayidx3 = getelementptr inbounds i64, i64* %st, i64 1 + %arrayidx4 = getelementptr inbounds i64, i64* %st, i64 2 + %arrayidx5 = getelementptr inbounds i64, i64* %st, i64 3 + + store i64 %t1, i64* %st, align 8 + store i64 %t0, i64* %arrayidx3, align 8 + store i64 %t1, i64* %arrayidx4, align 8 + store i64 %t0, i64* %arrayidx5, align 8 + ret void +} |

