[PATCH] D138542: [InstSimplify] Use dominate condtion to simplify instructions

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 23 18:14:36 PST 2022


bcl5980 added inline comments.


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:762
+    case Instruction::And:
+    case Instruction::Or:
+      return Op1;
----------------
spatel wrote:
> bcl5980 wrote:
> > I'm a little worry about the `and`/`or` part. Recursive call to isImpliedByDomCondition looks a little heavy.
> > I return Op1 here is because Op1 can be constant value but not sure it has any side effect or not.
> Did you run any compile-time-tracker experiments?
> We could leave those out of the initial patch, add a TODO, and then put them back in a follow-up patch to reduce risk.
Hi @spatel, can you help to run the and/or part to see the compile-time-tracker result? I have no privilege to test.


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

https://reviews.llvm.org/D138542



More information about the llvm-commits mailing list