[PATCH] D64954: [IR][Verifier] Allow IntToPtrInst to be !dereferenceable
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 20 10:58:06 PDT 2019
jdoerfert added a comment.
Are you planning to teach `Value::getPointerDereferenceableBytes` about this? The rest of the pipeline "should" then "just work" and use the information.
================
Comment at: docs/LangRef.rst:9662
+to loads of a pointer type.
+
Semantics:
----------------
Copy & Paste, these are no loads. Remove last sentence and add load metadata to the list of analogous things.
================
Comment at: lib/IR/Verifier.cpp:3986
"apply only to pointer types", &I);
- Assert(isa<LoadInst>(I),
+ Assert((isa<LoadInst>(I) ^ isa<IntToPtrInst>(I)),
"dereferenceable, dereferenceable_or_null apply only to load"
----------------
Why `^`? I personally find that confusing. `||` should do just fine.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64954/new/
https://reviews.llvm.org/D64954
More information about the llvm-commits
mailing list