[PATCH] D88217: [GVN] Make propagateEquality look into the operand of freeze

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 11:58:05 PDT 2020


efriedma added a comment.

On a related note, did we ever make any progress on the issue of propagating equalities on pointers?



================
Comment at: llvm/lib/Transforms/Scalar/GVN.cpp:1993
     uint32_t LVN = VN.lookupOrAdd(LHS);
-    if ((isa<Argument>(LHS) && isa<Argument>(RHS)) ||
-        (isa<Instruction>(LHS) && isa<Instruction>(RHS))) {
+    if ((!LHSFr || isa<FreezeInst>(RHS)) &&
+        ((isa<Argument>(LHS) && isa<Argument>(RHS)) ||
----------------
I guess favoring "prefer the non-freeze" over "prefer the oldest" is a heuristic?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88217



More information about the llvm-commits mailing list