[PATCH] D24774: [Loads] Fix crash in is isDereferenceableAndAlignedPointer()
Hal Finkel via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 18 05:48:09 PDT 2016
hfinkel accepted this revision.
hfinkel added a reviewer: hfinkel.
hfinkel added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/Analysis/Loads.cpp:97
+ return isDereferenceableAndAlignedPointer(Base, Align,
+ Offset + Size.getSExtValue(), DL,
CtxI, DT, Visited);
----------------
I realize that we don't support object sizes > 2^64, but this seems a bit odd because you're sign extending by converting to a uint64_t unnecessarily. I'd rather you write:
Offset + Size.sextOrTrunc(Offset.getBitWidth())
Otherwise, this LGTM.
https://reviews.llvm.org/D24774
More information about the llvm-commits
mailing list