llvm-project
b004f7ef - [CIR][CodeGen] Support VLA pointer arithmetic (#196837)

Commit
6 days ago
[CIR][CodeGen] Support VLA pointer arithmetic (#196837) Implement pointer arithmetic on variable-length array types in CIR codegen, removing two NYI diagnostics: 1. Binary pointer arithmetic (p + i, p - i) where the pointee is a VLA: multiply the index by the runtime VLA size before emitting PtrStrideOp. 2. Unary increment/decrement (p++, p--) on pointers to VLA types: stride by the VLA element count, negating for decrement. Fixes #192318
Parents
Loading