[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
Tue Jun 4 10:08:48 PDT 2024


================
@@ -2044,6 +2048,12 @@ llvm::Value *CodeGenFunction::EmitFromMemory(llvm::Value *Value, QualType Ty) {
     return emitBoolVecConversion(V, ValNumElems, "extractvec");
   }
 
+  if (hasBooleanRepresentation(Ty) || Ty->isBitIntType()) {
+    llvm::Type *ResTy = ConvertType(Ty);
+    bool Signed = Ty->isSignedIntegerOrEnumerationType();
+    return Builder.CreateIntCast(Value, ResTy, Signed, "loadedv");
----------------
Fznamznon wrote:

It is always a `trunc`. Changed it to `CreateTrunc`.

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


More information about the cfe-commits mailing list