mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 20:59:51 +00:00
Fix PR2574: implement v2f32 scalar_to_vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53927 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4e00987f09
commit
52672b813e
@ -601,6 +601,7 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
|
||||
setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v2i32, Custom);
|
||||
setOperationAction(ISD::VECTOR_SHUFFLE, MVT::v1i64, Custom);
|
||||
|
||||
setOperationAction(ISD::SCALAR_TO_VECTOR, MVT::v2f32, Custom);
|
||||
setOperationAction(ISD::SCALAR_TO_VECTOR, MVT::v8i8, Custom);
|
||||
setOperationAction(ISD::SCALAR_TO_VECTOR, MVT::v4i16, Custom);
|
||||
setOperationAction(ISD::SCALAR_TO_VECTOR, MVT::v1i64, Custom);
|
||||
@ -4135,6 +4136,12 @@ X86TargetLowering::LowerINSERT_VECTOR_ELT(SDOperand Op, SelectionDAG &DAG) {
|
||||
|
||||
SDOperand
|
||||
X86TargetLowering::LowerSCALAR_TO_VECTOR(SDOperand Op, SelectionDAG &DAG) {
|
||||
if (Op.getValueType() == MVT::v2f32)
|
||||
return DAG.getNode(ISD::BIT_CONVERT, MVT::v2f32,
|
||||
DAG.getNode(ISD::SCALAR_TO_VECTOR, MVT::v2i32,
|
||||
DAG.getNode(ISD::BIT_CONVERT, MVT::i32,
|
||||
Op.getOperand(0))));
|
||||
|
||||
SDOperand AnyExt = DAG.getNode(ISD::ANY_EXTEND, MVT::i32, Op.getOperand(0));
|
||||
MVT VT = MVT::v2i32;
|
||||
switch (Op.getValueType().getSimpleVT()) {
|
||||
|
15
test/CodeGen/X86/mmx-s2v.ll
Normal file
15
test/CodeGen/X86/mmx-s2v.ll
Normal file
@ -0,0 +1,15 @@
|
||||
; RUN: llvm-as < %s | llc -march=x86 -mattr=+mmx
|
||||
; PR2574
|
||||
|
||||
define void @entry(i32 %m_task_id, i32 %start_x, i32 %end_x) {; <label>:0
|
||||
br i1 true, label %bb.nph, label %._crit_edge
|
||||
|
||||
bb.nph: ; preds = %bb.nph, %0
|
||||
%t2206f2.0 = phi <2 x float> [ %2, %bb.nph ], [ undef, %0 ] ; <<2 x float>> [#uses=1]
|
||||
insertelement <2 x float> %t2206f2.0, float 0.000000e+00, i32 0 ; <<2 x float>>:1 [#uses=1]
|
||||
insertelement <2 x float> %1, float 0.000000e+00, i32 1 ; <<2 x float>>:2 [#uses=1]
|
||||
br label %bb.nph
|
||||
|
||||
._crit_edge: ; preds = %0
|
||||
ret void
|
||||
}
|
Loading…
Reference in New Issue
Block a user