[PATCH] D71799: [Attributor] AAUndefinedBehavior: Check for branches on undef value.
Stefanos Baziotis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 27 02:41:02 PST 2019
baziotis added a comment.
In D71799#1797070 <https://reviews.llvm.org/D71799#1797070>, @uenoku wrote:
> In D71799#1796829 <https://reviews.llvm.org/D71799#1796829>, @baziotis wrote:
>
> > - I still don't understand why `getPointerOperand()` returns `null` on `volatile` instructions (although I have guess it is to prevent further processing). Is it correct what I do?
>
>
> `getPointerOperand` was added as a helper for `dereferenceable`(volatile store/load doesn't imply dereferenceable). And you can change it if you want.
Aha ok, thanks.
> I'd say I'm not sure whether volatile store/load for `undef` is UB.
Well, if we go by the book, which would be the LLVM IR ref manual, and optimize aggressively for UB, `undef` can be considered to have any bit pattern.
And we can choose it to have the `null` bit pattern, which is UB for both `volatile` and non-volatile.
As another note (and related to the diff update message), I realize that it's difficult for both of us to try and correct 16 test cases that currently fail in //this revision//.
I think it's better to remove the `AAValueSimplify` in the memory accessing instructions. That will make the failing test-cases only 3. I could then try to fix them
and it should be easier for you to review as well. What do you think?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71799/new/
https://reviews.llvm.org/D71799
More information about the llvm-commits
mailing list