[PATCH] D139289: [SCCP] Propagate equality of a not-constant
luxufan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 5 03:29:56 PST 2022
StephenFan added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SCCPSolver.cpp:1330
+ ? ValueLatticeElement::getNot(CondVal.getConstant())
+ : ValueLatticeElement::get(CondVal.getConstant()));
return;
----------------
nikic wrote:
> StephenFan wrote:
> > nikic wrote:
> > > nikic wrote:
> > > > Shouldn't this be getNotConstant()? Probably missing test coverage, I'd expect this to assert.
> > > Actually, isn't this case entirely incorrect? If `A != B` and `B != C`, then that does not imply that `A == C`, right?
> > Yes, you are right. Thanks!
> Could you please still add a test for this, to make sure the optimization does not happen?
Done.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139289/new/
https://reviews.llvm.org/D139289
More information about the llvm-commits
mailing list