banach-space wrote:

> Before adding scalable vec, the sizeof(vec) logic was like this
> 
> 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)

So, IIUC, the implementation was updated for both types of vectors, right? As 
in, even for fixed vectors it was updated from:

```cpp
return builder.getConstant(
      loc, cir::IntAttr::get(cgf.cgm.uInt64Ty,
      e->EvaluateKnownConstInt(cgf.getContext())));
```
to

```cpp

return builder.getConstant(
      loc, cir::IntAttr::get(cgf.cgm.uInt64Ty,
      e->EvaluateKnownConstInt(vecTy.getSize());
```

If that's correct, it's worth updating the summary.

https://github.com/llvm/llvm-project/pull/172861
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to