[PATCH] D74228: [PatternMatch] Match XOR variant of unsigned-add overflow check.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 17 08:28:42 PST 2020


fhahn added a comment.

In D74228#1878307 <https://reviews.llvm.org/D74228#1878307>, @fhahn wrote:

> In D74228#1878177 <https://reviews.llvm.org/D74228#1878177>, @lebedev.ri wrote:
>
> > In D74228#1878174 <https://reviews.llvm.org/D74228#1878174>, @spatel wrote:
> >
> > > In D74228#1877769 <https://reviews.llvm.org/D74228#1877769>, @lebedev.ri wrote:
> > >
> > > > In D74228#1870877 <https://reviews.llvm.org/D74228#1870877>, @spatel wrote:
> > > >
> > > > > @nikic or others - does that match your expectations?
> > > >
> > > >
> > > > I admittedly haven't paid match attention to what's happening here,
> > > >  but i agree that this pattern is missed, and do think we should handle multi-BB case.
> > >
> > >
> > > Ok, then I think we can proceed with this patch in CGP, but as mentioned, I think we need to tighten the default TLI hook, so we don't create regressions for some targets.
> >
> >
> > SGMT
>
>
> Great, I'll add the hook


I've put up a patch adjusting the shouldFormOverflowOp hook to consider whether the math result is used: D74722 <https://reviews.llvm.org/D74722>


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74228





More information about the llvm-commits mailing list