aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp
diff options
context:
space:
mode:
authorpuneeth_aditya_5656 <myakampuneeth@gmail.com>2026-01-31 21:04:53 +0530
committerGitHub <noreply@github.com>2026-01-31 16:34:53 +0100
commit5c213a9000233fa54c03e532c14f0b08f7c6967a (patch)
tree19f72e9bbe22f5c21a6f289fa4bce0df950bf441 /llvm/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp
parent09c404631c70ace74feaebe6ef439d15a1998c6b (diff)
downloadllvm-main.zip
llvm-main.tar.gz
llvm-main.tar.bz2
[clang][bytecode] Fix crash on __builtin_align_up with one-past-end pointers (#178652)HEADmain
## Summary Fix assertion failure when evaluating `__builtin_align_up`/`__builtin_align_down`/`__builtin_is_aligned` with one-past-end pointers like `&array[size]`. ## Root Cause `getIndex()` calls `getOffset()` which asserts when `Offset == PastEndMark`. This happens for one-past-end element pointers. ## Fix Check `isElementPastEnd()` before calling `getIndex()`. For past-end pointers, use `getNumElems()` instead which gives the correct index value. ## Test Added test cases in `builtin-align-cxx.cpp` for one-past-end pointer alignment. Fixes #178647
Diffstat (limited to 'llvm/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp')
0 files changed, 0 insertions, 0 deletions