llvm-beanz wrote:
I pushed a speculative fix in 0065161c720c37e8ab545979aed6a03d944a3176. I think
the assert I added was too aggressive.
https://github.com/llvm/llvm-project/pull/71098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
Prabhuk wrote:
Seeing the crash in Linux CI toolchain builders.
```
Command Output (stderr):
--
RUN: at line 2: /b/s/w/ir/x/w/llvm_build/bin/clang -cc1 -internal-isystem
/b/s/w/ir/x/w/llvm_build/lib/clang/19/include -nostdsysteminc
-ffp-exception-behavior=maytrap
dyung wrote:
> Is this causing these crashes? http://45.33.8.238/linux/130945/step_7.txt
I can confirm that this commit is causing these crashes. @llvm-beanz can you
take a look or revert?
https://github.com/llvm/llvm-project/pull/71098
___
nico wrote:
Is this causing these crashes? http://45.33.8.238/linux/130945/step_7.txt
https://github.com/llvm/llvm-project/pull/71098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/71098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6432,7 +6432,7 @@ void InitializationSequence::InitializeFrom(Sema ,
// For HLSL ext vector types we allow list initialization behavior for C++
// constructor syntax. This is accomplished by converting initialization
// arguments an InitListExpr late.
- if
@@ -113,30 +115,12 @@ float2 HowManyFloats(float V) {
// up nicely too.
// CHECK-LABEL: AllRighty
-// CHECK: [[XTmp:%.*]] = alloca <1 x double>, align 8
-// CHECK: [[YTmp:%.*]] = alloca <1 x double>, align 8
-// CHECK: [[ZTmp:%.*]] = alloca <1 x double>, align 8
-
-// CHECK:
@@ -4772,6 +4788,76 @@ Sema::PerformImplicitConversion(Expr *From, QualType
ToType,
llvm_unreachable("Improper second standard conversion");
}
+ if (SCS.Element != ICK_Identity) {
+// If SCS.Element is not ICK_Identity the To and From types must be HLSL
+//
@@ -6432,7 +6432,7 @@ void InitializationSequence::InitializeFrom(Sema ,
// For HLSL ext vector types we allow list initialization behavior for C++
// constructor syntax. This is accomplished by converting initialization
// arguments an InitListExpr late.
- if
@@ -4772,6 +4788,76 @@ Sema::PerformImplicitConversion(Expr *From, QualType
ToType,
llvm_unreachable("Improper second standard conversion");
}
+ if (SCS.Element != ICK_Identity) {
+// If SCS.Element is not ICK_Identity the To and From types must be HLSL
+//
@@ -123,84 +123,83 @@ CompareDerivedToBaseConversions(Sema , SourceLocation
Loc,
/// GetConversionRank - Retrieve the implicit conversion rank
/// corresponding to the given implicit conversion kind.
ImplicitConversionRank clang::GetConversionRank(ImplicitConversionKind Kind)
https://github.com/bogner approved this pull request.
Looks good barring a few minor comments
https://github.com/llvm/llvm-project/pull/71098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/71098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/rjmccall approved this pull request.
Thanks, LGTM
https://github.com/llvm/llvm-project/pull/71098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -361,6 +361,9 @@ CAST_OPERATION(AddressSpaceConversion)
// Convert an integer initializer to an OpenCL sampler.
CAST_OPERATION(IntToOCLSampler)
+// Truncate a vector type (HLSL only).
+CAST_OPERATION(HLSLVectorTruncation)
rjmccall wrote:
Okay. I think
@@ -1843,13 +1843,86 @@ bool Sema::IsFunctionConversion(QualType FromType,
QualType ToType,
return true;
}
+/// Determine whether the conversion from FromType to ToType is a valid
+/// floating point conversion.
+///
+static bool IsFloatingPointConversion(Sema , QualType
@@ -361,6 +361,9 @@ CAST_OPERATION(AddressSpaceConversion)
// Convert an integer initializer to an OpenCL sampler.
CAST_OPERATION(IntToOCLSampler)
+// Truncate a vector type (HLSL only).
+CAST_OPERATION(HLSLVectorTruncation)
llvm-beanz wrote:
Yea... HLSL has
@@ -2414,9 +2420,41 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
return EmitScalarConversion(Visit(E), E->getType(), DestTy,
CE->getExprLoc(), Opts);
}
- case CK_IntegralToFloating:
- case CK_FloatingToIntegral:
- case
@@ -2466,6 +2504,15 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
case CK_IntToOCLSampler:
return CGF.CGM.createOpenCLIntToSamplerConversion(E, CGF);
+ case CK_HLSLVectorTruncation: {
+assert(DestTy->isVectorType() && "Expected dest type to be vector
@@ -4763,6 +4763,20 @@ Sema::PerformImplicitConversion(Expr *From, QualType
ToType,
CK_ZeroToOCLOpaqueType,
From->getValueKind()).get();
break;
+ case ICK_HLSL_Vector_Truncation: {
+// Note: HLSL vectors are
@@ -2466,6 +2504,14 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
case CK_IntToOCLSampler:
return CGF.CGM.createOpenCLIntToSamplerConversion(E, CGF);
+ case CK_HLSLVectorTruncation: {
+assert(DestTy->isVectorType() && "Expected dest type to be vector
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/71098
>From 91e8d9d9f63fe2ac481bb01549e3d69ac59d68f8 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Wed, 1 Nov 2023 12:18:43 -0500
Subject: [PATCH 1/7] [HLSL] Vector vector standard conversions
HLSL supports
llvm-beanz wrote:
ping @efriedma-quic & @rjmccall
https://github.com/llvm/llvm-project/pull/71098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1422,6 +1424,9 @@ Value *ScalarExprEmitter::EmitScalarConversion(Value
*Src, QualType SrcType,
return Builder.CreateVectorSplat(NumElements, Src, "splat");
}
+ if (SrcType->isExtVectorType() && DstType->isExtVectorType())
+return
@@ -1422,6 +1424,9 @@ Value *ScalarExprEmitter::EmitScalarConversion(Value
*Src, QualType SrcType,
return Builder.CreateVectorSplat(NumElements, Src, "splat");
}
+ if (SrcType->isExtVectorType() && DstType->isExtVectorType())
+return
llvm-beanz wrote:
@rjmccall & @efriedma-quic, do the CodeGen changes here look okay to you?
https://github.com/llvm/llvm-project/pull/71098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -123,82 +123,59 @@ CompareDerivedToBaseConversions(Sema , SourceLocation
Loc,
/// GetConversionRank - Retrieve the implicit conversion rank
/// corresponding to the given implicit conversion kind.
ImplicitConversionRank clang::GetConversionRank(ImplicitConversionKind Kind)
@@ -123,82 +123,59 @@ CompareDerivedToBaseConversions(Sema , SourceLocation
Loc,
/// GetConversionRank - Retrieve the implicit conversion rank
/// corresponding to the given implicit conversion kind.
ImplicitConversionRank clang::GetConversionRank(ImplicitConversionKind Kind)
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/71098
>From 91e8d9d9f63fe2ac481bb01549e3d69ac59d68f8 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Wed, 1 Nov 2023 12:18:43 -0500
Subject: [PATCH 1/6] [HLSL] Vector vector standard conversions
HLSL supports
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/71098
>From 91e8d9d9f63fe2ac481bb01549e3d69ac59d68f8 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Wed, 1 Nov 2023 12:18:43 -0500
Subject: [PATCH 1/5] [HLSL] Vector vector standard conversions
HLSL supports
@@ -123,82 +123,59 @@ CompareDerivedToBaseConversions(Sema , SourceLocation
Loc,
/// GetConversionRank - Retrieve the implicit conversion rank
/// corresponding to the given implicit conversion kind.
ImplicitConversionRank clang::GetConversionRank(ImplicitConversionKind Kind)
@@ -123,82 +123,59 @@ CompareDerivedToBaseConversions(Sema , SourceLocation
Loc,
/// GetConversionRank - Retrieve the implicit conversion rank
/// corresponding to the given implicit conversion kind.
ImplicitConversionRank clang::GetConversionRank(ImplicitConversionKind Kind)
AaronBallman wrote:
Adding some additional reviewers to look over codegen changes and also for
another set of eyes on the conversion changes in Sema (the changes look correct
to me, but conversion logic is dense enough that getting more eyes on it is a
good idea).
@@ -361,6 +361,9 @@ CAST_OPERATION(AddressSpaceConversion)
// Convert an integer initializer to an OpenCL sampler.
CAST_OPERATION(IntToOCLSampler)
+// Truncate a vector type (HLSL only).
+CAST_OPERATION(VectorTruncation)
AaronBallman wrote:
Should we name
@@ -123,82 +123,59 @@ CompareDerivedToBaseConversions(Sema , SourceLocation
Loc,
/// GetConversionRank - Retrieve the implicit conversion rank
/// corresponding to the given implicit conversion kind.
ImplicitConversionRank clang::GetConversionRank(ImplicitConversionKind Kind)
@@ -4966,6 +4967,7 @@ LValue CodeGenFunction::EmitCastLValue(const CastExpr *E)
{
return MakeAddrLValue(V, E->getType(), LV.getBaseInfo(),
CGM.getTBAAInfoForSubobject(LV, E->getType()));
}
+
AaronBallman wrote:
Spurious
@@ -4739,6 +4753,76 @@ Sema::PerformImplicitConversion(Expr *From, QualType
ToType,
llvm_unreachable("Improper second standard conversion");
}
+ if (SCS.Element != ICK_Identity) {
+// if SCS.Element is not ICK_Identity the To and From types must be HLSL
llvm-beanz wrote:
@AaronBallman, gentle ping
https://github.com/llvm/llvm-project/pull/71098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/71098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
39 matches
Mail list logo