[PATCH] D77804: [DAG] Enable ISD::SRL SimplifyMultipleUseDemandedBits handling inside SimplifyDemandedBits (WIP)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 17 11:21:04 PDT 2022


RKSimon added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:6871
+
+    // (or (and X, C1), (and (or X, Y), C2)) -> (or (and X, C1|C2), (and Y, C2))
+    if (N1.getOpcode() == ISD::AND) {
----------------
spatel wrote:
> spatel wrote:
> > This could be a preliminary patch. I don't think we'd get that in IR either (even without extra uses):
> > https://alive2.llvm.org/ce/z/g61VRe
> If I'm reading the SystemZ debug spew correctly, we should have gotten this transform to fire twice, so it would do this:
> https://alive2.llvm.org/ce/z/tUsepa
> ...but we miss it because we don't revisit the last 'or' node? Is that what D127115 would solve?
I've confirmed that D127115 solves the SystemZ fun3 regression but not fun2


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77804/new/

https://reviews.llvm.org/D77804



More information about the llvm-commits mailing list