[llvm] [X86][CodeGen] Support lowering for CCMP/CTEST (PR #91747)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Sat May 25 20:34:00 PDT 2024


================
@@ -54759,6 +54924,11 @@ static SDValue combineX86AddSub(SDNode *N, SelectionDAG &DAG,
   bool IsSub = X86ISD::SUB == N->getOpcode();
   unsigned GenericOpc = IsSub ? ISD::SUB : ISD::ADD;
 
+  if (IsSub && isOneConstant(N->getOperand(1)) && !N->hasAnyUseOfValue(0)) {
----------------
phoebewang wrote:

Nit: No need parentheses.

https://github.com/llvm/llvm-project/pull/91747


More information about the llvm-commits mailing list