Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit e65dbf0

Browse files
committed
[X86][SSE] Don't use PSHUFD directly - lower with generic shuffle
Remove the last user of the old getTargetShuffleNode helpers git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281499 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 47eb9d5 commit e65dbf0

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

lib/Target/X86/X86ISelLowering.cpp

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3848,21 +3848,6 @@ static bool isTargetShuffleVariableMask(unsigned Opcode) {
38483848
}
38493849
}
38503850

3851-
static SDValue getTargetShuffleNode(unsigned Opc, const SDLoc &dl, MVT VT,
3852-
SDValue V1, unsigned TargetMask,
3853-
SelectionDAG &DAG) {
3854-
switch(Opc) {
3855-
default: llvm_unreachable("Unknown x86 shuffle node");
3856-
case X86ISD::PSHUFD:
3857-
case X86ISD::PSHUFHW:
3858-
case X86ISD::PSHUFLW:
3859-
case X86ISD::VPERMILPI:
3860-
case X86ISD::VPERMI:
3861-
return DAG.getNode(Opc, dl, VT, V1,
3862-
DAG.getConstant(TargetMask, dl, MVT::i8));
3863-
}
3864-
}
3865-
38663851
SDValue X86TargetLowering::getReturnAddressFrameIndex(SelectionDAG &DAG) const {
38673852
MachineFunction &MF = DAG.getMachineFunction();
38683853
const X86RegisterInfo *RegInfo = Subtarget.getRegisterInfo();
@@ -13689,8 +13674,7 @@ SDValue X86TargetLowering::LowerUINT_TO_FP_i64(SDValue Op,
1368913674
Result = DAG.getNode(X86ISD::FHADD, dl, MVT::v2f64, Sub, Sub);
1369013675
} else {
1369113676
SDValue S2F = DAG.getBitcast(MVT::v4i32, Sub);
13692-
SDValue Shuffle = getTargetShuffleNode(X86ISD::PSHUFD, dl, MVT::v4i32,
13693-
S2F, 0x4E, DAG);
13677+
SDValue Shuffle = DAG.getVectorShuffle(MVT::v4i32, dl, S2F, S2F, {2,3,0,1});
1369413678
Result = DAG.getNode(ISD::FADD, dl, MVT::v2f64,
1369513679
DAG.getBitcast(MVT::v2f64, Shuffle), Sub);
1369613680
}

0 commit comments

Comments
 (0)