https://bugs.llvm.org/show_bug.cgi?id=43833
Bug ID: 43833
Summary: Deduce non-null if `gep inbounds` with non-zero offset
is applied
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Interprocedural Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
https://godbolt.org/z/J1gBEU
void sink(int*);
void test(int* input, int len) {
for(int i = 1; i < len; ++i)
sink(input + len);
}
Currently the call to sink() isn't annotated with nonnull, but i think it can
be.
I'm not sure about legality check. It should be legal if i is never 0,
illegal if i is always 0, but what about if i increments from -1?
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs