[clang] [clang] Rework `hasBooleanRepresentation`. (PR #136038)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 16 16:18:35 PDT 2025


================
@@ -2088,13 +2085,22 @@ llvm::Value *CodeGenFunction::EmitToMemory(llvm::Value *Value, QualType Ty) {
     Value = Builder.CreateBitCast(Value, StoreTy);
   }
 
+  if (Ty->hasBooleanRepresentation() || Ty->isBitIntType()) {
----------------
andykaylor wrote:

Is `isExtVectorBoolType()` guaranteed to filter out all the cases where a boolean vector type might get us here? It doesn't seem like the previous code had any sort of handling for vectors of bool other than the `isExtVectorBoolType` handling, but this seems like a potential change in behavior.

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


More information about the cfe-commits mailing list