[PATCH] D126516: [RISCV][NFC] Simplified code for integer promotion setcc/vp.setcc

Pretty-box via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 26 19:04:46 PDT 2022


Pretty-box created this revision.
Pretty-box added reviewers: Jimerlife, benshi001, craig.topper.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, evandro, luismarques, sameer.abuasal, s.egerton, Jim, benna, psnobl, rogfer01, shiva0217, kito-cheng, simoncook, hiraditya, arichardson.
Herald added a project: All.
Pretty-box requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD.
Herald added a project: LLVM.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126516

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -1963,12 +1963,8 @@
   PromoteSetCCOperands(LHS, RHS, cast<CondCodeSDNode>(N->getOperand(2))->get());
 
   // The CC (#2) is always legal.
-  if (N->getNumOperands() == 3)
+  if (N->getOpcode() == ISD::SETCC)
     return SDValue(DAG.UpdateNodeOperands(N, LHS, RHS, N->getOperand(2)), 0);
-
-  assert(N->getNumOperands() == 5 && "Unexpected number of operands!");
-  assert(N->getOpcode() == ISD::VP_SETCC && "Expected VP_SETCC opcode");
-
   return SDValue(DAG.UpdateNodeOperands(N, LHS, RHS, N->getOperand(2),
                                         N->getOperand(3), N->getOperand(4)),
                  0);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126516.432441.patch
Type: text/x-patch
Size: 862 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220527/5bf97d0e/attachment.bin>


More information about the llvm-commits mailing list