hfinkel added a subscriber: hfinkel.
hfinkel added a comment.
I'm *really* nervous about doing anything with
-f(no-)delete-null-pointer-checks that makes it look like we support this
feature without actually supporting it in the backend.
In computePointerICmp in InstructionSimplify.cpp, we have:
// A non-null pointer is not equal to a null pointer.
if (llvm::isKnownNonNull(LHS, TLI) && isa<ConstantPointerNull>(RHS) &&
(Pred == CmpInst::ICMP_EQ || Pred == CmpInst::ICMP_NE))
return ConstantInt::get(GetCompareTy(LHS),
!CmpInst::isTrueWhenEqual(Pred));
I'd much rather have the frontend add an attribute (and I think it must be an
attribute because of how this needs to work in LTO) that disables this, and any
other necessary checks.
http://reviews.llvm.org/D17993
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits