[PATCH] D45867: [InstCombine] Unfold masked merge with constant mask
Dávid Bolvanský via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 28 14:02:30 PDT 2018
xbolva00 added a comment.
In https://reviews.llvm.org/D45867#1082081, @lebedev.ri wrote:
> In https://reviews.llvm.org/D45867#1082079, @xbolva00 wrote:
>
> > Not related to this patch exactly but since you work in this area... maybe you can check this too?
> > https://godbolt.org/g/wksfqb
>
>
> That particular example should be handled by dead code elimination pass i guess,
> because it is literally optimized down to `return 0;`,
> since it only reads global `uint32_t b;` once, and ultimately does nothing with that.
>
> But, i have zero clues how it should be done.
It is interesting, since even if we dont use "b", just leave it as "uint32_t a = 5;", code is not eliminated since compiler may think it could be infinite loop (?)
Repository:
rL LLVM
https://reviews.llvm.org/D45867
More information about the llvm-commits
mailing list