[PATCH] D77868: [InstSimplify] fold select of bools using bitwise logic

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 08:33:55 PDT 2020


lebedev.ri added a comment.

In D77868#1974376 <https://reviews.llvm.org/D77868#1974376>, @spatel wrote:

> In D77868#1974358 <https://reviews.llvm.org/D77868#1974358>, @lebedev.ri wrote:
>
> > > This fixes regressions that would be visible if we remove known poison-unsafe transforms in instcombine mentioned here:
> > >  https://reviews.llvm.org/D72396#1810460
> >
> > I think the problem is being misunderstood:
> >
> >   %frozen_x = freeze i1 %x
>
>
> Ah, yes I know we could introduce freeze (or predicate with isGuaranteedNotToBeUndefOrPoison()?), but I thought we're not ready to introduce that as part of canonicalization because it would cause too much perf fallout currently.


Sure, yes. I'm just pointing out that the medium-to-long-term goal for
such 'miscompilations' is freezing potentially-poison operands,
not removal of the problematic transforms. It doesn't mean we shouldn't
see what other missed folds we uncover when we try to as-if remove those folds though.


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

https://reviews.llvm.org/D77868





More information about the llvm-commits mailing list