[llvm] [RISCV] Optimize (and (icmp x, 0, eq), (icmp y, 0, eq)) utilizing zicond extension (PR #166469)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 4 16:01:43 PST 2025


================
@@ -16117,6 +16162,25 @@ static SDValue reverseZExtICmpCombine(SDNode *N, SelectionDAG &DAG,
   return DAG.getNode(ISD::ZERO_EXTEND, DL, VT, Res);
 }
 
+static SDValue reduceANDOfSetCC(SDNode *N, SelectionDAG &DAG,
----------------
topperc wrote:

I don't think `reduce` is the right word here. I guess it was copied from the `reduceANDOfAtomicLoad` but I'm not sure its good there either.

Maybe `combineANDOfSetCCToCZERO`?

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


More information about the llvm-commits mailing list