Author: Chris Bieneman
Date: 2024-02-15T18:56:35-06:00
New Revision: 0065161c720c37e8ab545979aed6a03d944a3176

URL: 
https://github.com/llvm/llvm-project/commit/0065161c720c37e8ab545979aed6a03d944a3176
DIFF: 
https://github.com/llvm/llvm-project/commit/0065161c720c37e8ab545979aed6a03d944a3176.diff

LOG: Remove assert introduced in #71098

This should effectively preserve the old behavior for non-HLSL code.

Added: 
    

Modified: 
    clang/lib/CodeGen/CGExprScalar.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CGExprScalar.cpp 
b/clang/lib/CodeGen/CGExprScalar.cpp
index 13526de3e76421..576734e460b9c1 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -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");
@@ -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");
@@ -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() <


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to