This patch prevents the simultaneous presence of dereferenceable and dereferenceable_or_null attribute
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This was a problem for a while now:
Can we have a test case to make sure we do not lose information, e.g. deref_or_null(100) nonnull deref(4) should not remove the deref_or_null(100).
llvm/test/Transforms/FunctionAttrs/dereferenceable.ll | ||
---|---|---|
32–33 | FIXME can be removed. |
Comment Actions
In my understanding, deref_or_null(100) and nonnull imply deref(100) so deref_or_null(100) can be deleted safely, correct?
Comment Actions
Yes, please see the comment
llvm/lib/Transforms/IPO/Attributor.cpp | ||
---|---|---|
2944–2947 | The max of deref(x) and deref_or_null(y) is taken here. |
llvm/lib/Transforms/IPO/Attributor.cpp | ||
---|---|---|
2944–2947 | Cool, thanks, just checking :) |
The max of deref(x) and deref_or_null(y) is taken here.