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

Cullen Rhodes via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 11 03:14:35 PDT 2020


c-rhodes added inline comments.


================
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
----------------
efriedma wrote:
> 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.
> 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.

Yeah you're right, may as well keep `Ctx.UnsignedCharTy`, I changed it before pushing. Thanks for reviewing!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87358



More information about the cfe-commits mailing list