https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/90222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tex3d approved this pull request.
https://github.com/llvm/llvm-project/pull/90222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/90222
>From a173605b6043739e69f89d3a559a4f6a68d5fc0a Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Thu, 25 Apr 2024 15:47:22 -0500
Subject: [PATCH 1/2] [HLSL] Shore up floating point conversions
This PR fixes
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/90222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,229 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -Wconversion -verify -o - %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -ast-dump %s | FileCheck %
@@ -4393,6 +4401,24 @@ getFixedEnumPromtion(Sema &S, const
StandardConversionSequence &SCS) {
return FixedEnumPromotion::ToPromotedUnderlyingType;
}
+static ImplicitConversionSequence::CompareKind
+HLSLCompareFloatingRank(QualType LHS, QualType RHS) {
+ assert(LHS->isVecto
farzonl wrote:
Are there test cases in `OverloadResolutionBugs.hlsl` that have been fixed by
this change and would need to be removed from that file?
https://github.com/llvm/llvm-project/pull/90222
___
cfe-commits mailing list
cfe-commits@lists.llvm.
@@ -0,0 +1,229 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -Wconversion -verify -o - %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -ast-dump %s | FileCheck %
@@ -2616,6 +2617,13 @@ bool Sema::IsFloatingPointPromotion(QualType FromType,
QualType ToType) {
ToBuiltin->getKind() == BuiltinType::Ibm128))
return true;
+ // In HLSL, `half` promotes to `float` or `double`, regardless of whether
+ // or not nat
@@ -4393,6 +4401,24 @@ getFixedEnumPromtion(Sema &S, const
StandardConversionSequence &SCS) {
return FixedEnumPromotion::ToPromotedUnderlyingType;
}
+static ImplicitConversionSequence::CompareKind
+HLSLCompareFloatingRank(QualType LHS, QualType RHS) {
+ assert(LHS->isVecto
@@ -0,0 +1,229 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -Wconversion -verify -o - %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -ast-dump %s | FileCheck %
@@ -2616,6 +2617,13 @@ bool Sema::IsFloatingPointPromotion(QualType FromType,
QualType ToType) {
ToBuiltin->getKind() == BuiltinType::Ibm128))
return true;
+ // In HLSL, `half` promotes to `float` or `double`, regardless of whether
+ // or not nat
https://github.com/coopp approved this pull request.
Looks good. Took me a while to go through all of the tests. Looks like
everything is covered!
https://github.com/llvm/llvm-project/pull/90222
___
cfe-commits mailing list
cfe-commits@lists.llvm.or
@@ -0,0 +1,229 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -Wconversion -verify -o - %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -ast-dump %s | FileCheck %
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/90222
>From a173605b6043739e69f89d3a559a4f6a68d5fc0a Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Thu, 25 Apr 2024 15:47:22 -0500
Subject: [PATCH] [HLSL] Shore up floating point conversions
This PR fixes bug
@@ -0,0 +1,229 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -Wconversion -verify -o - %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -ast-dump %s | FileCheck %
https://github.com/damyanp approved this pull request.
https://github.com/llvm/llvm-project/pull/90222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,229 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -Wconversion -verify -o - %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -fnative-half-type
-finclude-default-header -ast-dump %s | FileCheck %
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Chris B (llvm-beanz)
Changes
This PR fixes bugs in HLSL floating conversions. HLSL always has `half`,
`float` and `double` types, which promote in the order:
`half`->`float`->`double`
and convert in the order:
`double`->`float`->`half`
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/90222
This PR fixes bugs in HLSL floating conversions. HLSL always has `half`,
`float` and `double` types, which promote in the order:
`half`->`float`->`double`
and convert in the order:
`double`->`float`->`half`
20 matches
Mail list logo