[PATCH] D87358: [clang][aarch64] Fix ILP32 ABI for arm_sve_vector_bits

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 10 11:29:01 PDT 2020


efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: clang/lib/AST/Type.cpp:2324
     // scalable and fixed-length vectors.
-    return Ctx.UnsignedCharTy;
-  case BuiltinType::SveInt16:
-    return Ctx.ShortTy;
-  case BuiltinType::SveUint16:
-    return Ctx.UnsignedShortTy;
-  case BuiltinType::SveInt32:
-    return Ctx.IntTy;
-  case BuiltinType::SveUint32:
-    return Ctx.UnsignedIntTy;
-  case BuiltinType::SveInt64:
-    return Ctx.LongTy;
-  case BuiltinType::SveUint64:
-    return Ctx.UnsignedLongTy;
-  case BuiltinType::SveFloat16:
-    return Ctx.Float16Ty;
-  case BuiltinType::SveBFloat16:
-    return Ctx.BFloat16Ty;
-  case BuiltinType::SveFloat32:
-    return Ctx.FloatTy;
-  case BuiltinType::SveFloat64:
-    return Ctx.DoubleTy;
-  }
+    return Ctx.getIntTypeForBitwidth(8, /*Signed=*/0);
+  else
----------------
For 8-bit types, not sure you're getting anything by using getIntTypeForBitwidth instead of Ctx.UnsignedCharTy; there isn't actually any possible variation. I don't care much either way, though.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87358/new/

https://reviews.llvm.org/D87358



More information about the cfe-commits mailing list