[llvm] [InstCombine] Improve handling of `not` and free inversion. (PR #66787)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 10:47:12 PST 2023
goldsteinn wrote:
> > > LGTM with the last commit removed (the test coverage is quite insufficient around m_AddSubInvertable, and I don't particularly want this fold anyway).
> >
> >
> > I'd be happy to improve the coverage. Why are you opposed to the commit as a whole? Also do you mean removed entirely, or is changing is to `ConsumeLHS && ConsumeRHS` okay?
>
> It looks like a fold with very low value but very high risk. Limiting it to `ConsumeLHS && ConsumeRHS` (with `&&`, not `||`, and no special add/sub cases) would probably be acceptable.
Okay, done (added b.c noticed after changing the logic for `~Y - ~X` had a regression).
https://github.com/llvm/llvm-project/pull/66787
More information about the llvm-commits
mailing list