[clang] c4b0dfc - [Clang] Fix a non-effective assertion (#81083)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 8 06:44:46 PST 2024
Author: Shilei Tian
Date: 2024-02-08T09:44:42-05:00
New Revision: c4b0dfcc99da7506bff6b57d563e5cbce9caf4cd
URL: https://github.com/llvm/llvm-project/commit/c4b0dfcc99da7506bff6b57d563e5cbce9caf4cd
DIFF: https://github.com/llvm/llvm-project/commit/c4b0dfcc99da7506bff6b57d563e5cbce9caf4cd.diff
LOG: [Clang] Fix a non-effective assertion (#81083)
`PTy` here is literally `FTy->getParamType(i)`, which makes this
assertion not
work as expected.
Added:
Modified:
clang/lib/CodeGen/CGBuiltin.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index e051cbc648635..a7a410dab1a01 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -5908,7 +5908,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
}
}
- assert(PTy->canLosslesslyBitCastTo(FTy->getParamType(i)) &&
+ assert(ArgValue->getType()->canLosslesslyBitCastTo(PTy) &&
"Must be able to losslessly bit cast to param");
// Cast vector type (e.g., v256i32) to x86_amx, this only happen
// in amx intrinsics.
More information about the cfe-commits
mailing list