diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-01-10 08:23:59 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-01-10 08:23:59 +0000 |
commit | a937633893432b4cdbd1a32602c566f0a006f2fd (patch) | |
tree | f499582fd517facaa9f4a17bed64bffed9aaea44 /test/CodeGen/X86/avx-vbroadcast.ll | |
parent | 1accb7ed98d823c291a4d5df172d0538451aba9e (diff) | |
download | external_llvm-a937633893432b4cdbd1a32602c566f0a006f2fd.zip external_llvm-a937633893432b4cdbd1a32602c566f0a006f2fd.tar.gz external_llvm-a937633893432b4cdbd1a32602c566f0a006f2fd.tar.bz2 |
Fix a crash in AVX2 when trying to broadcast a double into a 128-bit vector. There is no vbroadcastsd xmm, but we do need to support 64-bit integers broadcasted into xmm. Also factor the AVX check into the isVectorBroadcast function. This makes more sense since the AVX2 check was already inside.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147844 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/avx-vbroadcast.ll')
-rw-r--r-- | test/CodeGen/X86/avx-vbroadcast.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx-vbroadcast.ll b/test/CodeGen/X86/avx-vbroadcast.ll index 8fbd02a..5bf9f4f 100644 --- a/test/CodeGen/X86/avx-vbroadcast.ll +++ b/test/CodeGen/X86/avx-vbroadcast.ll @@ -89,3 +89,13 @@ define <4 x i32> @H(<4 x i32> %a) { ret <4 x i32> %x } +; CHECK: _I +; CHECK-NOT: vbroadcastsd (% +; CHECK: ret +define <2 x double> @I(double* %ptr) nounwind uwtable readnone ssp { +entry: + %q = load double* %ptr, align 4 + %vecinit.i = insertelement <2 x double> undef, double %q, i32 0 + %vecinit2.i = insertelement <2 x double> %vecinit.i, double %q, i32 1 + ret <2 x double> %vecinit2.i +} |