mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-01 16:31:13 +00:00
Splats can contain undef's; make sure to handle them correctly. PR11526.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146299 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
21d7fb814a
commit
effab8fa24
@ -3984,8 +3984,7 @@ SDValue ARMTargetLowering::LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG,
|
|||||||
|
|
||||||
// Use vmov.f32 to materialize other v2f32 and v4f32 splats.
|
// Use vmov.f32 to materialize other v2f32 and v4f32 splats.
|
||||||
if (VT == MVT::v2f32 || VT == MVT::v4f32) {
|
if (VT == MVT::v2f32 || VT == MVT::v4f32) {
|
||||||
ConstantFPSDNode *C = cast<ConstantFPSDNode>(Op.getOperand(0));
|
int ImmVal = ARM_AM::getFP32Imm(SplatBits);
|
||||||
int ImmVal = ARM_AM::getFP32Imm(C->getValueAPF());
|
|
||||||
if (ImmVal != -1) {
|
if (ImmVal != -1) {
|
||||||
SDValue Val = DAG.getTargetConstant(ImmVal, MVT::i32);
|
SDValue Val = DAG.getTargetConstant(ImmVal, MVT::i32);
|
||||||
return DAG.getNode(ARMISD::VMOVFPIMM, dl, VT, Val);
|
return DAG.getNode(ARMISD::VMOVFPIMM, dl, VT, Val);
|
||||||
|
@ -371,3 +371,13 @@ entry:
|
|||||||
store <4 x float> <float 3.100000e+01, float 3.100000e+01, float 3.100000e+01, float 3.100000e+01>, <4 x float>* %p, align 4
|
store <4 x float> <float 3.100000e+01, float 3.100000e+01, float 3.100000e+01, float 3.100000e+01>, <4 x float>* %p, align 4
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define void @v_mov_v4f32_undef(<4 x float> * nocapture %p) nounwind {
|
||||||
|
entry:
|
||||||
|
;CHECK: v_mov_v4f32_undef:
|
||||||
|
;CHECK: vmov.f32 q{{.*}}, #1.000000e+00
|
||||||
|
%a = load <4 x float> *%p
|
||||||
|
%b = fadd <4 x float> %a, <float undef, float 1.0, float 1.0, float 1.0>
|
||||||
|
store <4 x float> %b, <4 x float> *%p
|
||||||
|
ret void
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user