blob: 1c39c747cdc8d07c113476aae659f9ed88113d5c [file] [log] [blame]
Nadav Rotemee3552f2012-07-15 12:26:30 +00001; RUN: llc < %s -march=x86 -mcpu=corei7 -mattr=+avx2 | FileCheck %s
2
3declare x86_fastcallcc i64 @barrier()
4
Stephen Lin6f36b452013-07-18 22:47:09 +00005;CHECK-LABEL: bcast_fold:
NAKAMURA Takumiec844da2012-11-27 00:48:27 +00006;CHECK: vmov{{[au]}}ps %xmm{{[0-9]+}}, [[SPILLED:[^\)]+\)]]
NAKAMURA Takumi032dc0a2012-07-15 14:38:35 +00007;CHECK: barrier
8;CHECK: vbroadcastss [[SPILLED]], %ymm0
Nadav Rotemee3552f2012-07-15 12:26:30 +00009;CHECK: ret
10define <8 x float> @bcast_fold( float* %A) {
11BB:
12 %A0 = load float* %A
13 %tt3 = call x86_fastcallcc i64 @barrier()
14 br i1 undef, label %work, label %exit
15
16work:
17 %A1 = insertelement <8 x float> undef, float %A0, i32 0
18 %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>
19 ret <8 x float> %A2
20
21exit:
22 ret <8 x float> undef
23}