As discussed in D48893, we have an existing bug in the recent shuffle transforms when we combine poison flags with undefs in the shuffle mask.
There are 2 ways to solve that bug: (1) change the undef constants to safe constants (which we must do for div/rem because they have immediate UB potential), or (2) drop the poison flags.
I suggested using safe constants in D48893, but I changed my mind for 2 reasons: (1) we can't always be sure what qualifies as a safe constant (operand 0 of a binop?) and (2) undef vector lanes are likely more valuable for further analysis and vector transforms than any poison decorations.
https://godbolt.org/g/y7hCki
Should instcombine be dropping these flags just because?
Or we only care about not creating more of these situations than we already had?