[PATCH] D25847: [ValueTracking] Don't assume we can speculate shifts
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 20 16:31:11 PDT 2016
davide added a comment.
In https://reviews.llvm.org/D25847#575978, @mkuper wrote:
> 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.
Oh, sorry, this is entirely my fault. I misread `result undefined` == `undefined behaviour`, that's where the confusion started. Sorry again!
More information about the llvm-commits