Issue 137833
Summary Missing workaround for old glibc `__PTR_ALIGN` macro
Labels clang:codegen
Assignees dtcxzyw
Reporter dtcxzyw
    See also https://github.com/llvm/llvm-project/pull/130742#issuecomment-2835528395.

Do not set `inbounds` flag on GEPs for the following pattern:
```
((sizeof(long int) < sizeof(void *) ? (base) : (char *)0) +
 (((pointer) - (sizeof(long int) < sizeof(void *) ? (base) : (char *)0) +
 (align_mask)) &
    ~(align_mask)));
```
1. Handle the pointer addition case `(char *0) + idx`
2. Handle expr `((sizeof(long int) < sizeof(void *) ? (base) : (char *)0)` in `isUnderlyingBasePointerConstantNull`.

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to