[PATCH] D25847: [ValueTracking] Don't assume we can speculate shifts

Michael Kuperstein via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 16:26:10 PDT 2016


mkuper added a comment.

In https://reviews.llvm.org/D25847#575972, @sanjoy wrote:

> This looks wrong -- shifts should always be safe to speculate.  I wasn't following PR30708 closely, but can you describe why you think shift speculation is the root cause for PR30708?


Because of this comment on PR30708:

> This instruction:
> 
>   %shr.i.us21 = lshr i32 1, 53
> 
> has UB as we're trying to shift right > 32

But, as Eli pointed out (thanks!), this isn't true.


https://reviews.llvm.org/D25847





More information about the llvm-commits mailing list