=?utf-8?q?Félix?= Cloutier <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -2198,8 +2211,16 @@ llvm::Value *CodeGenFunction::EmitFromMemory(llvm::Value
*Value, QualType Ty) {
}
llvm::Type *ResTy = ConvertType(Ty);
- if (Ty->hasBooleanRepresentation() || Ty->isBitIntType() ||
- Ty->isExtVectorBoolType())
+ bool IsBitInt = Ty->isBitIntType();
+ bool HasBoolRep = Ty->hasBooleanRepresentation();
+ if (HasBoolRep && !IsBitInt &&
----------------
brunodf-snps wrote:
Since there is [0,2) range information today for types that have
`hasBooleanRepresentation()` and not `isVectorType()` (see [this
line](https://github.com/llvm/llvm-project/blob/cb59da20a645bcb663a8d9cc7225b94f13d03916/clang/lib/CodeGen/CGExpr.cpp#L2017))
and you will suppress this range information for all such types in case of
-fno-strict-bool, I would suggest that you change the truncate in a non-zero
check under exactly those same conditions when -fno-strict-bool=nonzero, does
that make sense? This will include `BitInt(1)`.
https://github.com/llvm/llvm-project/pull/160790
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits