[clang] [clang] Lower _BitInt(129+) to a different type in LLVM IR (PR #91364)

Mariya Podchishchaeva via cfe-commits cfe-commits at lists.llvm.org
Wed May 29 06:15:49 PDT 2024


================
@@ -1989,6 +1989,14 @@ llvm::Value *CodeGenFunction::EmitLoadOfScalar(Address Addr, bool Volatile,
     return EmitAtomicLoad(AtomicLValue, Loc).getScalarVal();
   }
 
+  if (const auto *BIT = Ty->getAs<BitIntType>()) {
+    if (BIT->getNumBits() > 128) {
+      // Long _BitInt has array of bytes as in-memory type.
+      llvm::Type *NewTy = ConvertType(Ty);
----------------
Fznamznon wrote:

The idea was to load not array, but iN, so ConverType here was intentional. However I'm updating this patch soon, it will be using special load/store type whose idea is described by https://github.com/llvm/llvm-project/pull/91364#issuecomment-2099351151 .

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


More information about the cfe-commits mailing list