[PATCH] D116811: [SCEVExpander] Skip creating <u 0 check, which is always false.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 7 09:24:14 PST 2022


fhahn marked an inline comment as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp:2653
+    return B;
+  return Builder.CreateOr(A, B);
+}
----------------
nikic wrote:
> FWIW CreateOr already folds LHS | 0 -> LHS, so I think it would make sense to also fold 0 | RHS -> RHS there, for the sake of consistency.
I moved the fold to D116817. We can discuss that there and if it turns out that it's not desirable to have it in IRBuilder directly I can add it to the expander as follow-up.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116811



More information about the llvm-commits mailing list