llvm-6502/test/CodeGen/X86/2012-07-15-broadcastfold.ll
NAKAMURA Takumi a2a179dd7d llvm/test/CodeGen/X86/2012-07-15-broadcastfold.ll: Rewrite expressions to fit various targets.
- Make sure existence of "barrier".
  - Confirm reload corresponding to spill.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160232 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-15 14:38:35 +00:00

24 lines
649 B
LLVM

; RUN: llc < %s -march=x86 -mcpu=corei7 -mattr=+avx2 | FileCheck %s
declare x86_fastcallcc i64 @barrier()
;CHECK: bcast_fold
;CHECK: vmovaps %xmm{{[0-9]+}}, [[SPILLED:[^\)]+\)]]
;CHECK: barrier
;CHECK: vbroadcastss [[SPILLED]], %ymm0
;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
}