Skip to content

Commit a9d8114

Browse files
committed
[X86] combineOr - pull out repeated SDLoc(). NFCI.
1 parent f00da7c commit a9d8114

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46646,11 +46646,12 @@ static SDValue combineOr(SDNode *N, SelectionDAG &DAG,
4664646646
SDValue N0 = N->getOperand(0);
4664746647
SDValue N1 = N->getOperand(1);
4664846648
EVT VT = N->getValueType(0);
46649+
SDLoc dl(N);
4664946650

4665046651
// If this is SSE1 only convert to FOR to avoid scalarization.
4665146652
if (Subtarget.hasSSE1() && !Subtarget.hasSSE2() && VT == MVT::v4i32) {
4665246653
return DAG.getBitcast(MVT::v4i32,
46653-
DAG.getNode(X86ISD::FOR, SDLoc(N), MVT::v4f32,
46654+
DAG.getNode(X86ISD::FOR, dl, MVT::v4f32,
4665446655
DAG.getBitcast(MVT::v4f32, N0),
4665546656
DAG.getBitcast(MVT::v4f32, N1)));
4665646657
}
@@ -46662,7 +46663,6 @@ static SDValue combineOr(SDNode *N, SelectionDAG &DAG,
4666246663
SmallVector<APInt, 2> SrcPartials;
4666346664
if (matchScalarReduction(SDValue(N, 0), ISD::OR, SrcOps, &SrcPartials) &&
4666446665
SrcOps.size() == 1) {
46665-
SDLoc dl(N);
4666646666
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
4666746667
unsigned NumElts = SrcOps[0].getValueType().getVectorNumElements();
4666846668
EVT MaskVT = EVT::getIntegerVT(*DAG.getContext(), NumElts);
@@ -46709,7 +46709,6 @@ static SDValue combineOr(SDNode *N, SelectionDAG &DAG,
4670946709
if (NumElts >= 16 && N1.getOpcode() == X86ISD::KSHIFTL &&
4671046710
N1.getConstantOperandAPInt(1) == HalfElts &&
4671146711
DAG.MaskedValueIsZero(N0, APInt(1, 1), UpperElts)) {
46712-
SDLoc dl(N);
4671346712
return DAG.getNode(
4671446713
ISD::CONCAT_VECTORS, dl, VT,
4671546714
extractSubVector(N0, 0, DAG, dl, HalfElts),
@@ -46718,7 +46717,6 @@ static SDValue combineOr(SDNode *N, SelectionDAG &DAG,
4671846717
if (NumElts >= 16 && N0.getOpcode() == X86ISD::KSHIFTL &&
4671946718
N0.getConstantOperandAPInt(1) == HalfElts &&
4672046719
DAG.MaskedValueIsZero(N1, APInt(1, 1), UpperElts)) {
46721-
SDLoc dl(N);
4672246720
return DAG.getNode(
4672346721
ISD::CONCAT_VECTORS, dl, VT,
4672446722
extractSubVector(N1, 0, DAG, dl, HalfElts),

0 commit comments

Comments
 (0)