[clang] [CIR] Upstream ArraySubscriptExpr for fixed size array (PR #134536)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 7 14:08:56 PDT 2025


================
@@ -157,6 +157,15 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> {
 
   mlir::Value VisitCastExpr(CastExpr *e);
 
+  mlir::Value VisitArraySubscriptExpr(ArraySubscriptExpr *e) {
+    if (e->getBase()->getType()->isVectorType()) {
+      assert(!cir::MissingFeatures::scalableVectors() &&
----------------
andykaylor wrote:

```suggestion
      assert(!cir::MissingFeatures::scalableVectors());
```
The second part of this assert isn't necessary.

This does still need an errorNYI for vector types and a return without falling through to the call below. Vector types in general are handled in the incubator and not covered by the missing features assert here.

https://github.com/llvm/llvm-project/pull/134536


More information about the cfe-commits mailing list