Skip to content

Commit 630f82e

Browse files
authored
[Clang][CodeGen] Loose the cast check when emitting builtins (llvm#81669)
This patch looses the cast check (`canLosslesslyBitCastTo`) and leaves it to the one inside `CreateBitCast`. It seems too conservative for the use case here.
1 parent 78d401b commit 630f82e

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

clang/lib/CodeGen/CGBuiltin.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -5912,8 +5912,6 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
59125912
}
59135913
}
59145914

5915-
assert(ArgValue->getType()->canLosslesslyBitCastTo(PTy) &&
5916-
"Must be able to losslessly bit cast to param");
59175915
// Cast vector type (e.g., v256i32) to x86_amx, this only happen
59185916
// in amx intrinsics.
59195917
if (PTy->isX86_AMXTy())
@@ -5943,8 +5941,6 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
59435941
}
59445942
}
59455943

5946-
assert(V->getType()->canLosslesslyBitCastTo(RetTy) &&
5947-
"Must be able to losslessly bit cast result type");
59485944
// Cast x86_amx to vector type (e.g., v256i32), this only happen
59495945
// in amx intrinsics.
59505946
if (V->getType()->isX86_AMXTy())

0 commit comments

Comments
 (0)