[llvm] 8928b23 - [X86] Emit ISD::ADD instead of X86ISD::ADD from combineSubSetcc. NFC (#182195)

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 19 07:50:23 PST 2026


Author: Craig Topper
Date: 2026-02-19T07:50:18-08:00
New Revision: 8928b2337dea03e7defce442aeed9774937969bd

URL: https://github.com/llvm/llvm-project/commit/8928b2337dea03e7defce442aeed9774937969bd
DIFF: https://github.com/llvm/llvm-project/commit/8928b2337dea03e7defce442aeed9774937969bd.diff

LOG: [X86] Emit ISD::ADD instead of X86ISD::ADD from combineSubSetcc. NFC (#182195)

The flag result isn't used so the X86ISD::ADD would be converted to
ISD::ADD by a DAGCombine immediately after.

Prior to this we could create a X86ISD::ADD with an illegal type and we
were using the wrong VT for the flag result.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86ISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index b41dd2f70abaf..b843dd43dd5b6 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -59507,7 +59507,7 @@ static SDValue combineSubSetcc(SDNode *N, SelectionDAG &DAG) {
     SDLoc DL(Op1);
     SDValue NewSetCC = getSETCC(NewCC, SetCC.getOperand(1), DL, DAG);
     NewSetCC = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, NewSetCC);
-    return DAG.getNode(X86ISD::ADD, DL, DAG.getVTList(VT, VT), NewSetCC,
+    return DAG.getNode(ISD::ADD, DL, VT, NewSetCC,
                        DAG.getConstant(NewImm, DL, VT));
   }
 


        


More information about the llvm-commits mailing list