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

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Tue May 7 10:58:24 PDT 2024


================
@@ -5348,6 +5348,13 @@ Value *ScalarExprEmitter::VisitVAArgExpr(VAArgExpr *VE) {
     return llvm::UndefValue::get(ArgTy);
   }
 
+  if (const auto *BIT = Ty->getAs<BitIntType>()) {
+    if (BIT->getNumBits() > 128) {
----------------
efriedma-quic wrote:

This seems a little fragile; specifically for _BitInt, we assume the pointer is wrong and the return type is right, but in other cases, we assume the pointer is right and we need to do some sort of conversion.

Can we fix the interface of EmitVAArg so we can just EmitLoadOfScalar() here?

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


More information about the cfe-commits mailing list