summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/2012-07-15-broadcastfold.ll
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2012-07-15 12:26:30 +0000
committerNadav Rotem <nadav.rotem@intel.com>2012-07-15 12:26:30 +0000
commitee3552f88dd10d8108e3d27f295bf22c774d1ea5 (patch)
tree6addbafe0a16ceaee394fd2c804cf5f40a5ed243 /llvm/test/CodeGen/X86/2012-07-15-broadcastfold.ll
parenta62368c96518938a756768570d394d28e75e658f (diff)
downloadbcm5719-llvm-ee3552f88dd10d8108e3d27f295bf22c774d1ea5.tar.gz
bcm5719-llvm-ee3552f88dd10d8108e3d27f295bf22c774d1ea5.zip
Rename VBROADCASTSDrm into VBROADCASTSDYrm to match the naming convention.
Allow the folding of vbroadcastRR to vbroadcastRM, where the memory operand is a spill slot. PR12782. Together with Michael Kuperstein <michael.m.kuperstein@intel.com> llvm-svn: 160230
Diffstat (limited to 'llvm/test/CodeGen/X86/2012-07-15-broadcastfold.ll')
-rw-r--r--llvm/test/CodeGen/X86/2012-07-15-broadcastfold.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/2012-07-15-broadcastfold.ll b/llvm/test/CodeGen/X86/2012-07-15-broadcastfold.ll
new file mode 100644
index 00000000000..6a7bb63b88e
--- /dev/null
+++ b/llvm/test/CodeGen/X86/2012-07-15-broadcastfold.ll
@@ -0,0 +1,21 @@
+; RUN: llc < %s -march=x86 -mcpu=corei7 -mattr=+avx2 | FileCheck %s
+
+declare x86_fastcallcc i64 @barrier()
+
+;CHECK: bcast_fold
+;CHECK: vbroadcastss -24(%ebp), %ymm0 # 16-byte Folded Reload
+;CHECK: ret
+define <8 x float> @bcast_fold( float* %A) {
+BB:
+ %A0 = load float* %A
+ %tt3 = call x86_fastcallcc i64 @barrier()
+ br i1 undef, label %work, label %exit
+
+work:
+ %A1 = insertelement <8 x float> undef, float %A0, i32 0
+ %A2 = shufflevector <8 x float> %A1, <8 x float> undef, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>
+ ret <8 x float> %A2
+
+exit:
+ ret <8 x float> undef
+}
OpenPOWER on IntegriCloud