mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Update insertps handling based on feedback. Move to a v4f32 style
to support vector arguments and scalar arguments correctly. Update lowering and fix comment to refer to pinsr* instead of insertps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76921 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -4383,11 +4383,12 @@ X86TargetLowering::LowerINSERT_VECTOR_ELT_SSE4(SDValue Op, SelectionDAG &DAG){
|
||||
// Bits [3:0] of the constant are the zero mask. The DAG Combiner may
|
||||
// combine either bitwise AND or insert of float 0.0 to set these bits.
|
||||
N2 = DAG.getIntPtrConstant(cast<ConstantSDNode>(N2)->getZExtValue() << 4);
|
||||
// Create this as a scalar to vector..
|
||||
N1 = DAG.getNode(ISD::SCALAR_TO_VECTOR, dl, MVT::v4f32, N1);
|
||||
return DAG.getNode(X86ISD::INSERTPS, dl, VT, N0, N1, N2);
|
||||
} else if (EVT == MVT::i32) {
|
||||
// InsertPS works with constant index.
|
||||
if (isa<ConstantSDNode>(N2))
|
||||
return Op;
|
||||
} else if (EVT == MVT::i32 && isa<ConstantSDNode>(N2)) {
|
||||
// PINSR* works with constant index.
|
||||
return Op;
|
||||
}
|
||||
return SDValue();
|
||||
}
|
||||
|
Reference in New Issue
Block a user