AmrDeveloper wrote:
> ```c++
> return builder.getConstant(
> loc, cir::IntAttr::get(cgf.cgm.uInt64Ty,
> e->EvaluateKnownConstInt(cgf.getContext())));
> ```
For a fixed vector, it's updated to get the size directly.
```
return builder.getConstant(
loc, cir::IntAttr::get(cgf.cgm.uInt64Ty, vecTy.getSize()));
```
And for scalable, it's NYI because, similar to classical codegen, we need
`llvm.vscale` and perform a mul op, and after the NYI, I returned the old value
for now so we can recover from this error and print as many errors as we can.
> Is there no way to test the NYI logic? I would normally check myself, but am
> already OOO (and afk) for the break.
I also usually check myself locally and make sure it hits this part, but for
this case, i already know it when I implement sizeof and countof :D, I was just
waiting for scalable vector to be added to update it
https://github.com/llvm/llvm-project/pull/172861
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits