[llvm] [DAG] SimplifyMultipleUseDemandedBits - bypass ADD nodes if either operand is zero (PR #112588)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 09:20:25 PST 2024


================
@@ -797,6 +797,16 @@ SDValue TargetLowering::SimplifyMultipleUseDemandedBits(
       return Op.getOperand(1);
     break;
   }
+  case ISD::ADD: {
----------------
RKSimon wrote:

OR is already handled more generally - I'll see if I can get (SUB X, 0) to match in any tests

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


More information about the llvm-commits mailing list