[PATCH] D125530: [InstSimplify] Fold and/or using implied conditions

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 13 05:05:53 PDT 2022


fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.

LGTM, thanks!



================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:2226
+      return Op0;
+    if (isImpliedCondition(Op1, Op0, Q.DL).getValueOr(false))
+      return Op1;
----------------
nit: might be good to have `// A&B -> B where B implies A`? 

Not sure about the comments using `A`/`B` while the code using `Op0`/`Op1`. Might be good to keep things consistent, but `A`/B` seems nicer


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

https://reviews.llvm.org/D125530



More information about the llvm-commits mailing list