[PATCH] D38925: Fix implicit null check with negative offset
Yichao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 14 16:27:28 PDT 2017
yuyichao created this revision.
It seems that negative offset was accidentally allowed in https://reviews.llvm.org/D17967.
AFAICT small negative offset should be valid (always raise segfault) on all archs that I'm aware of (especially x86, which is the only one with this optimization enabled) and such case can be useful when loading hiden metadata from an object.
However, like the positive side, it should only be done within a certain limit.
For now, use the same limit on the positive side for the negative side.
A separate option can be added if needs appear.
https://reviews.llvm.org/D38925
Files:
lib/CodeGen/ImplicitNullChecks.cpp
test/CodeGen/X86/implicit-null-check-negative.ll
test/CodeGen/X86/implicit-null-check.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38925.119046.patch
Type: text/x-patch
Size: 4023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171014/78386a2f/attachment.bin>
More information about the llvm-commits
mailing list