[PATCH] D142115: [ValueTracking] Take poison-generating metadata into account (PR59888)
Nuno Lopes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 19 10:32:59 PST 2023
nlopes accepted this revision.
nlopes added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/IR/Instruction.cpp:217
+ hasMetadata(LLVMContext::MD_nonnull) ||
+ hasMetadata(LLVMContext::MD_align);
+}
----------------
nikic wrote:
> nlopes wrote:
> > not sure about align.
> > If a pointer is not sufficiently aligned, a load may crash. Returning poison in that case is not strong enough for the hardware behavior.
> This is the same semantics we use for the param attribute. I think it's okay because any kind of speculation requires dereferenceable and align, and dereferenceable implies noundef.
>
> (Note that this is the align metadata that specifies the alignment of the returned pointer, not the alignment of the load itself.)
Oh, I see.
I didn't have that implemented in Alive. Just added support.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142115/new/
https://reviews.llvm.org/D142115
More information about the llvm-commits
mailing list