mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 06:33:21 +00:00
Fix VSELECT operand order. Was previously backwards, causing bogus vector shift results - <rdar://problem/10559581>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146671 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0508d047fe
commit
a0a251372f
@ -10177,7 +10177,7 @@ SDValue X86TargetLowering::LowerShift(SDValue Op, SelectionDAG &DAG) const {
|
||||
M = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, VT,
|
||||
DAG.getConstant(Intrinsic::x86_sse2_pslli_w, MVT::i32), M,
|
||||
DAG.getConstant(4, MVT::i32));
|
||||
R = DAG.getNode(ISD::VSELECT, dl, VT, Op, R, M);
|
||||
R = DAG.getNode(ISD::VSELECT, dl, VT, Op, M, R);
|
||||
// a += a
|
||||
Op = DAG.getNode(ISD::ADD, dl, VT, Op, Op);
|
||||
|
||||
@ -10192,13 +10192,13 @@ SDValue X86TargetLowering::LowerShift(SDValue Op, SelectionDAG &DAG) const {
|
||||
M = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, VT,
|
||||
DAG.getConstant(Intrinsic::x86_sse2_pslli_w, MVT::i32), M,
|
||||
DAG.getConstant(2, MVT::i32));
|
||||
R = DAG.getNode(ISD::VSELECT, dl, VT, Op, R, M);
|
||||
R = DAG.getNode(ISD::VSELECT, dl, VT, Op, M, R);
|
||||
// a += a
|
||||
Op = DAG.getNode(ISD::ADD, dl, VT, Op, Op);
|
||||
|
||||
// return pblendv(r, r+r, a);
|
||||
R = DAG.getNode(ISD::VSELECT, dl, VT, Op,
|
||||
R, DAG.getNode(ISD::ADD, dl, VT, R, R));
|
||||
DAG.getNode(ISD::ADD, dl, VT, R, R), R);
|
||||
return R;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user