[PATCH] D25847: [ValueTracking] Don't assume we can speculate shifts
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 20 16:13:32 PDT 2016
It seems wrong to prohibit hoisting an instruction which neither traps nor
has side effects.
My gut feeling is that the bug lies elsewhere. Perhaps the hoisting allows
another transform to happen?
On Thursday, October 20, 2016, Davide Italiano <dccitaliano at gmail.com>
> davide added a comment.
> In https://reviews.llvm.org/D25847#575957, @efriedma wrote:
> > "A shift is undefined if the second operand is equal or larger than the
> number of bits in the first operand."
> > Yes... but that's not undefined behavior. LangRef just says "the result
> is undefined".
> hmm, does this change the fact that we don't want to speculate in this
> case or you're commenting on the wording?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits