[PATCH] D88217: [GVN] Make propagateEquality look into the operand of freeze
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 26 05:21:15 PDT 2020
aqjune added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/GVN.cpp:2000
if (LVN < RVN) {
std::swap(LHS, RHS);
LVN = RVN;
----------------
nikic wrote:
> Won't something fishy happen here if LHS and RHS are swapped, but LHSFr still refers to the old LHS?
Yes, it might have caused a problem; LHSFr should have been updated.
But, allowing this transformation when LHS and RHS were both freeze seemed problematic as well - its benefit wasn't clear. So I fixed this patch to simply be disabled in that case.
Added a few negative tests for such case.
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