Closed
Description
FunctionAttrs incorrectly infers that the following function returns nonnull (https://llvm.godbolt.org/z/49Kbq15xn):
define ptr @test(ptr nonnull %arg) {
%res = getelementptr i8, ptr %arg, i64 -8
ret ptr %res
}
This is because the code assumes that the result of a GEP is non-null if the source is non-null here:
This is not correct for non-inbounds GEPs.Metadata
Metadata
Assignees
Type
Projects
Status
Done