Skip to content

Commit 13b6d9a

Browse files
authored
AArch64: Use isUndef instead of checking opcode is UNDEF (#168219)
This is to avoid regressions by poison introduction
1 parent 789ef89 commit 13b6d9a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21640,9 +21640,8 @@ static SDValue performBuildVectorCombine(SDNode *N,
2164021640
SDValue LowLanesSrcVec = Elt0->getOperand(0)->getOperand(0);
2164121641
if (LowLanesSrcVec.getValueType() == MVT::v2f64) {
2164221642
SDValue HighLanes;
21643-
if (Elt2->getOpcode() == ISD::UNDEF &&
21644-
Elt3->getOpcode() == ISD::UNDEF) {
21645-
HighLanes = DAG.getUNDEF(MVT::v2f32);
21643+
if (Elt2->isUndef() && Elt3->isUndef()) {
21644+
HighLanes = DAG.getPOISON(MVT::v2f32);
2164621645
} else if (Elt2->getOpcode() == ISD::FP_ROUND &&
2164721646
Elt3->getOpcode() == ISD::FP_ROUND &&
2164821647
isa<ConstantSDNode>(Elt2->getOperand(1)) &&
@@ -23977,7 +23976,7 @@ static SDValue performUzpCombine(SDNode *N, SelectionDAG &DAG,
2397723976
return SDValue();
2397823977

2397923978
// uzp1(x, undef) -> concat(truncate(x), undef)
23980-
if (Op1.getOpcode() == ISD::UNDEF) {
23979+
if (Op1.isUndef()) {
2398123980
EVT BCVT = MVT::Other, HalfVT = MVT::Other;
2398223981
switch (ResVT.getSimpleVT().SimpleTy) {
2398323982
default:
@@ -26423,8 +26422,7 @@ performSetccMergeZeroCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI) {
2642326422
SDValue L1 = LHS->getOperand(1);
2642426423
SDValue L2 = LHS->getOperand(2);
2642526424

26426-
if (L0.getOpcode() == ISD::UNDEF && isNullConstant(L2) &&
26427-
isSignExtInReg(L1)) {
26425+
if (L0.isUndef() && isNullConstant(L2) && isSignExtInReg(L1)) {
2642826426
SDLoc DL(N);
2642926427
SDValue Shl = L1.getOperand(0);
2643026428
SDValue NewLHS = DAG.getNode(ISD::INSERT_SUBVECTOR, DL,

0 commit comments

Comments
 (0)