[PATCH] D49047: [InstCombine] fix shuffle-of-binops transform to avoid poison/undef

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 9 06:22:50 PDT 2018


spatel added a comment.

In https://reviews.llvm.org/D49047#1155252, @nlopes wrote:

> LGTM.
>
> BTW, I couldn't figure if this case is possible, but mentioning it just in case: it's also not legal to introduce 'sdiv undef, ..', since 'sdiv INT_MIN, -1' is UB. Same for srem. So we need to be careful when folding the shuffle on LHS as well.


Good point - it's not possible for now because we bail out on a LHS constant for div/rem for both patterns (1 variable operand or 2).


https://reviews.llvm.org/D49047





More information about the llvm-commits mailing list