[PATCH] D45065: [InstCombine] Fix PR17564: don't fold [zs]ext into phi.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 4 08:13:23 PDT 2018


lebedev.ri added a comment.

In https://reviews.llvm.org/D45065#1056907, @lebedev.ri wrote:

> In https://reviews.llvm.org/D45065#1054271, @spatel wrote:
>
> > but I need to look closer at how the case in the bug report escaped the matching that we already have in foldSelectInstWithICmp() and foldSelectICmpAnd().
>
>
> Uhm, you know, i have added `return nullptr;` or `return false;` as the first statement in those functions, and even then those folds (`@just_select`, `@zext_of_select`, `@sext_of_select`) in this diff still happen.
>  So i'm not quite sure where they are happening...


Right, of course, that is handled by https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/InstCombine/InstCombineSelect.cpp#L1418-L1452
Continuing to look...


Repository:
  rL LLVM

https://reviews.llvm.org/D45065





More information about the llvm-commits mailing list