[clang] [CIR] Mark sizeof & alignof as NYI for scalable Vector (PR #172861)
Amr Hesham via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 18 13:02:32 PST 2025
AmrDeveloper wrote:
> Thanks!
>
> I might be missing something, but if this PR is about scalable vectors, shouldn't the newly added tests exercise the scalable vector path? Right now I only see tests with fixed vectors.
>
> Otherwise, marking scalable as NYI makes sense.
Before adding scalable vec, the `sizeof(vec)` logic will be
```
return builder.getConstant(
loc, cir::IntAttr::get(cgf.cgm.uInt64Ty,
e->EvaluateKnownConstInt(cgf.getContext())));
```
Which is not correct for a scalable vector, so I added a check to mark scalable vec as NYI and add a new if block for vector type in general, and I added coverage for `sizeof(vec)`
https://github.com/llvm/llvm-project/pull/172861
More information about the cfe-commits
mailing list