Make assume (load (call|invoke) != null) set nonNull return attribute
for the call and invoke. Also include tests.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I think you'd add tests for the nonnull attribute in a similar way to how we test for the nonnull metadata in test/Transforms/InstCombine/assume.ll.
lib/Transforms/InstCombine/InstCombineCalls.cpp | ||
---|---|---|
1137 ↗ | (On Diff #18549) | This does not seem right. dereferenceable needs a size. |
Comment Actions
Drop the deref propagation, because it requires more work. Redo the
nonNull propagation so that it is correct (thanks to Hal for poking me
to test it properly).
Comment Actions
LGTM.
lib/Transforms/InstCombine/InstCombineCalls.cpp | ||
---|---|---|
1084 ↗ | (On Diff #19561) | Line too long? |