[PATCH] D149528: [TargetLowering] Stop passing an ISD::CondCode to isOperationLegalOrCustom.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 29 13:21:11 PDT 2023


craig.topper created this revision.
craig.topper added a reviewer: RKSimon.
Herald added a subscriber: hiraditya.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added a project: LLVM.

ISD::CondCode is a separate num space from opcodes. isOperationLegalOrCustom
should take an opcode.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149528

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


Index: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -6703,9 +6703,9 @@
   // NOTE: we avoid letting illegal types through even if we're before legalize
   // ops – legalization has a hard time producing good code for the code that
   // follows.
-  if (!isOperationLegalOrCustom(ISD::SETEQ, VT) ||
+  if (!isOperationLegalOrCustom(ISD::SETCC, VT) ||
       !isOperationLegalOrCustom(ISD::AND, VT) ||
-      !isOperationLegalOrCustom(Cond, VT) ||
+      !isCondCodeLegalOrCustom(Cond, VT.getSimpleVT()) ||
       !isOperationLegalOrCustom(ISD::VSELECT, SETCCVT))
     return SDValue();
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149528.518229.patch
Type: text/x-patch
Size: 770 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230429/7d7749ad/attachment.bin>


More information about the llvm-commits mailing list