diff options
| author | Sven van Haastregt <sven.vanhaastregt@arm.com> | 2018-03-07 10:29:28 +0000 |
|---|---|---|
| committer | Sven van Haastregt <sven.vanhaastregt@arm.com> | 2018-03-07 10:29:28 +0000 |
| commit | 19f531d31ec8e21488b1852d9a99e0efef5f79f9 (patch) | |
| tree | 875772c0f3fe46e767d9a3b7b70f4b120771a07d /llvm/test | |
| parent | 9b996f03cbfca337e907369b05df1948732b9dbd (diff) | |
| download | bcm5719-llvm-19f531d31ec8e21488b1852d9a99e0efef5f79f9.tar.gz bcm5719-llvm-19f531d31ec8e21488b1852d9a99e0efef5f79f9.zip | |
[LoadStoreVectorizer] Differentiate between <1 x T> and T
The LoadStoreVectorizer thought that <1 x T> and T were the same types
when merging stores, leading to a crash later.
Patch by Erik Hogeman.
Differential Revision: https://reviews.llvm.org/D44014
llvm-svn: 326884
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/LoadStoreVectorizer/X86/vector-scalar.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Transforms/LoadStoreVectorizer/X86/vector-scalar.ll b/llvm/test/Transforms/LoadStoreVectorizer/X86/vector-scalar.ll new file mode 100644 index 00000000000..379b2353dc3 --- /dev/null +++ b/llvm/test/Transforms/LoadStoreVectorizer/X86/vector-scalar.ll @@ -0,0 +1,14 @@ +; RUN: opt -mtriple=x86_64-unknown-linux-gnu -load-store-vectorizer -mcpu haswell -S -o - %s | FileCheck %s + +; Check that the LoadStoreVectorizer does not crash due to not differentiating <1 x T> and T. + +; CHECK-LABEL: @vector_scalar( +; CHECK: store double +; CHECK: store <1 x double> +define void @vector_scalar(double* %ptr, double %a, <1 x double> %b) { + %1 = bitcast double* %ptr to <1 x double>* + %2 = getelementptr <1 x double>, <1 x double>* %1, i32 1 + store double %a, double* %ptr, align 8 + store <1 x double> %b, <1 x double>* %2, align 8 + ret void +} |

