[PATCH] D84250: [InstSimplify] ExpandBinOp should fold an expression only when it's safe

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 09:02:52 PDT 2020


aqjune marked 4 inline comments as done.
aqjune added a comment.

In D84250#2187367 <https://reviews.llvm.org/D84250#2187367>, @aqjune wrote:

> In D84250#2187305 <https://reviews.llvm.org/D84250#2187305>, @spatel wrote:
>
>> I tried to find other examples where this could happen, and I can't find anything else either.
>> So I think this just needs some minor changes.
>> However, Alive2 does not show the "f_dontfold" test example or my reduced candidate test as incorrect - is that a bug for Alive2?
>> https://alive2.llvm.org/ce/z/dbGLzN
>
> `f_dontfold` simply shows that the patch prevents the folding; it is still correct to fold the expression. I'll leave TODO there.
> I'll update this patch to reflect the comments.

I understood the question; the comments in `distribute.ll` were wrong. The transformations are valid even if x is undef. I fixed the comments.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84250



More information about the llvm-commits mailing list