llvm-6502/test/CodeGen/X86/2012-07-15-broadcastfold.ll
Nadav Rotem aec9f382dd 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>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160230 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-15 12:26:30 +00:00

22 lines
605 B
LLVM

; 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
}