diff options
| author | Juergen Ributzka <juergen@apple.com> | 2015-03-04 00:13:25 +0000 |
|---|---|---|
| committer | Juergen Ributzka <juergen@apple.com> | 2015-03-04 00:13:25 +0000 |
| commit | 1f7a17661cb617a1bd82aa72977bca288a2d7f9d (patch) | |
| tree | 300480e2e6669162bfac684d60ed3c19f5e58920 /llvm/test/CodeGen/X86 | |
| parent | 5a2ab2bb932d94eb350f809693a48d05e4a7eea6 (diff) | |
| download | bcm5719-llvm-1f7a17661cb617a1bd82aa72977bca288a2d7f9d.tar.gz bcm5719-llvm-1f7a17661cb617a1bd82aa72977bca288a2d7f9d.zip | |
Remove 'llvm.x86.avx2.vbroadcasti128' intrinsic.
The intrinsic is no longer generated by the front-end. Remove the intrinsic and
auto-upgrade it to a vector shuffle.
Reviewed by Nadav
This is related to rdar://problem/18742778.
llvm-svn: 231182
Diffstat (limited to 'llvm/test/CodeGen/X86')
| -rw-r--r-- | llvm/test/CodeGen/X86/avx2-intrinsics-x86.ll | 7 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/x86-upgrade-avx2-vbroadcast.ll | 18 |
2 files changed, 18 insertions, 7 deletions
diff --git a/llvm/test/CodeGen/X86/avx2-intrinsics-x86.ll b/llvm/test/CodeGen/X86/avx2-intrinsics-x86.ll index da0f17a88de..b7e2b7412ff 100644 --- a/llvm/test/CodeGen/X86/avx2-intrinsics-x86.ll +++ b/llvm/test/CodeGen/X86/avx2-intrinsics-x86.ll @@ -641,13 +641,6 @@ define <4 x i64> @test_x86_avx2_pmul.dq(<8 x i32> %a0, <8 x i32> %a1) { declare <4 x i64> @llvm.x86.avx2.pmul.dq(<8 x i32>, <8 x i32>) nounwind readnone -define <4 x i64> @test_x86_avx2_vbroadcasti128(i8* %a0) { - ; CHECK: vbroadcasti128 - %res = call <4 x i64> @llvm.x86.avx2.vbroadcasti128(i8* %a0) ; <<4 x i64>> [#uses=1] - ret <4 x i64> %res -} -declare <4 x i64> @llvm.x86.avx2.vbroadcasti128(i8*) nounwind readonly - define <4 x double> @test_x86_avx2_vbroadcast_sd_pd_256(<2 x double> %a0) { ; CHECK: vbroadcastsd %res = call <4 x double> @llvm.x86.avx2.vbroadcast.sd.pd.256(<2 x double> %a0) ; <<4 x double>> [#uses=1] diff --git a/llvm/test/CodeGen/X86/x86-upgrade-avx2-vbroadcast.ll b/llvm/test/CodeGen/X86/x86-upgrade-avx2-vbroadcast.ll new file mode 100644 index 00000000000..08571f51478 --- /dev/null +++ b/llvm/test/CodeGen/X86/x86-upgrade-avx2-vbroadcast.ll @@ -0,0 +1,18 @@ +; RUN: llc -mattr=+avx2 < %s | FileCheck %s + +; Check that we properly upgrade the AVX2 vbroadcast intrinsic to IR. + +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-apple-macosx10.10.0" + +define <4 x i64> @broadcast128(<2 x i64> %src) { + CHECK-LABEL: broadcast128 + CHECK: vinsertf128 $1, %xmm0, %ymm0, %ymm0 + %1 = alloca <2 x i64>, align 16 + %2 = bitcast <2 x i64>* %1 to i8* + store <2 x i64> %src, <2 x i64>* %1, align 16 + %3 = call <4 x i64> @llvm.x86.avx2.vbroadcasti128(i8* %2) + ret <4 x i64> %3 +} + +declare <4 x i64> @llvm.x86.avx2.vbroadcasti128(i8*) #1 |

