Skip to content

Commit

Permalink
Remove assert introduced in #71098
Browse files Browse the repository at this point in the history
This should effectively preserve the old behavior for non-HLSL code.
  • Loading branch information
llvm-beanz committed Feb 16, 2024
1 parent 2549c24 commit 0065161
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions clang/lib/CodeGen/CGExprScalar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2425,8 +2425,6 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
case CK_IntegralToFloating: {
if (E->getType()->isVectorType() && DestTy->isVectorType()) {
// TODO: Support constrained FP intrinsics.
assert(!Builder.getIsFPConstrained() &&
"FP Constrained vector casts not supported yet.");
QualType SrcElTy = E->getType()->castAs<VectorType>()->getElementType();
if (SrcElTy->isSignedIntegerOrEnumerationType())
return Builder.CreateSIToFP(Visit(E), ConvertType(DestTy), "conv");
Expand All @@ -2439,8 +2437,6 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
case CK_FloatingToIntegral: {
if (E->getType()->isVectorType() && DestTy->isVectorType()) {
// TODO: Support constrained FP intrinsics.
assert(!Builder.getIsFPConstrained() &&
"FP Constrained vector casts not supported yet.");
QualType DstElTy = DestTy->castAs<VectorType>()->getElementType();
if (DstElTy->isSignedIntegerOrEnumerationType())
return Builder.CreateFPToSI(Visit(E), ConvertType(DestTy), "conv");
Expand All @@ -2453,8 +2449,6 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
case CK_FloatingCast: {
if (E->getType()->isVectorType() && DestTy->isVectorType()) {
// TODO: Support constrained FP intrinsics.
assert(!Builder.getIsFPConstrained() &&
"FP Constrained vector casts not supported yet.");
QualType SrcElTy = E->getType()->castAs<VectorType>()->getElementType();
QualType DstElTy = DestTy->castAs<VectorType>()->getElementType();
if (DstElTy->castAs<BuiltinType>()->getKind() <
Expand Down

0 comments on commit 0065161

Please sign in to comment.