llvmbot wrote:
@llvm/pr-subscribers-clang
Author: None (metkarpoonam)
Changes
Implement dst algorithm in the hlsl_intrinsics.h and added test cases for HLSL
codegen and sema
fixes: https://github.com/llvm/llvm-project/issues/99108
---
Full diff: https://github.com/llvm/llvm-project/pull/
@@ -0,0 +1,45 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.2-library %s -fnative-half-type -emit-llvm -O1 -o - |
FileCheck %s
+
+
+// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float>
@_Z12dstWithFloatDv4_fS_(
+// CHECK-SAME: <4
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/133828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,85 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.2-library %s -fnative-half-type -emit-llvm -O1 -o - |
FileCheck %s
+
+
+// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float>
@_Z12dstWithFloatDv4_fS_(
+// CHECK-SAME: <4
@@ -35,6 +35,12 @@ length_vec_impl(vector X) {
#endif
}
+template
+constexpr vector dst_impl(vector src0, vector src1) {
+ vector dest = {1, src0[1] * src1[1], src0[2], src1[3]};
+ return dest;
+}
damyanp wrote:
It looks like this needs to be done across m
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify
+
+float4 test_too_many_arg(float4 p0)
+{
+dst(p0, p0, p0);
+ // expected-error@-1 {{no matching function
@@ -0,0 +1,85 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.2-library %s -fnative-half-type -emit-llvm -O1 -o - |
FileCheck %s
+
+
+// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float>
@_Z12dstWithFloatDv4_fS_(
+// CHECK-SAME: <4
https://github.com/metkarpoonam edited
https://github.com/llvm/llvm-project/pull/133828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/metkarpoonam edited
https://github.com/llvm/llvm-project/pull/133828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/metkarpoonam edited
https://github.com/llvm/llvm-project/pull/133828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/metkarpoonam edited
https://github.com/llvm/llvm-project/pull/133828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/metkarpoonam edited
https://github.com/llvm/llvm-project/pull/133828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -35,6 +35,12 @@ length_vec_impl(vector X) {
#endif
}
+template
+constexpr vector dst_impl(vector src0, vector src1) {
+ vector dest = {1, src0[1] * src1[1], src0[2], src1[3]};
+ return dest;
+}
metkarpoonam wrote:
Thanks for the feedback! I've made the
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify
+
+float4 test_too_many_arg(float4 p0)
+{
+dst(p0, p0, p0);
+ // expected-error@-1 {{no matching function
https://github.com/metkarpoonam updated
https://github.com/llvm/llvm-project/pull/133828
>From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001
From: Poonam Vilas Metkar
Date: Mon, 31 Mar 2025 16:49:18 -0700
Subject: [PATCH 01/10] Implement a dst function with test cases for HL
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify
+
+float4 test_too_many_arg(float4 p0)
+{
+dst(p0, p0, p0);
+ // expected-error@-1 {{no matching function
@@ -0,0 +1,85 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.2-library %s -fnative-half-type -emit-llvm -O1 -o - |
FileCheck %s
+
+
+// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x float>
@_Z12dstWithFloatDv4_fS_(
+// CHECK-SAME: <4
@@ -0,0 +1,70 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.2-library %s -fnative-half-type -emit-llvm -O1 -o - |
FileCheck %s
metkarpoonam wrote:
I removed the -O1 flag and added codegen with disable-llvm-pass.
https://g
https://github.com/metkarpoonam updated
https://github.com/llvm/llvm-project/pull/133828
>From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001
From: Poonam Vilas Metkar
Date: Mon, 31 Mar 2025 16:49:18 -0700
Subject: [PATCH 1/9] Implement a dst function with test cases for HLSL
https://github.com/metkarpoonam created
https://github.com/llvm/llvm-project/pull/133828
Implement dst algorithm in the hlsl_intrinsics.h and added test cases for HLSL
codegen and sema
fixes: https://github.com/llvm/llvm-project/issues/99108
>From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon S
https://github.com/metkarpoonam updated
https://github.com/llvm/llvm-project/pull/133828
>From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001
From: Poonam Vilas Metkar
Date: Mon, 31 Mar 2025 16:49:18 -0700
Subject: [PATCH 1/8] Implement a dst function with test cases for HLSL
https://github.com/metkarpoonam updated
https://github.com/llvm/llvm-project/pull/133828
>From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001
From: Poonam Vilas Metkar
Date: Mon, 31 Mar 2025 16:49:18 -0700
Subject: [PATCH 1/8] Implement a dst function with test cases for HLSL
@@ -0,0 +1,70 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.2-library %s -fnative-half-type -emit-llvm -O1 -o - |
FileCheck %s
farzonl wrote:
remove -O1 you should be able to check for correctness without optimizations.
h
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify
+
+float4 test_too_many_arg(float4 p0)
+{
+dst(p0, p0, p0);
+ // expected-error@-1 {{no matching function
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify
+
+float4 test_too_many_arg(float4 p0)
+{
+dst(p0, p0, p0);
+ // expected-error@-1 {{no matching function
https://github.com/metkarpoonam updated
https://github.com/llvm/llvm-project/pull/133828
>From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001
From: Poonam Vilas Metkar
Date: Mon, 31 Mar 2025 16:49:18 -0700
Subject: [PATCH 1/8] Implement a dst function with test cases for HLSL
https://github.com/metkarpoonam updated
https://github.com/llvm/llvm-project/pull/133828
>From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001
From: Poonam Vilas Metkar
Date: Mon, 31 Mar 2025 16:49:18 -0700
Subject: [PATCH 1/7] Implement a dst function with test cases for HLSL
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify
+
+float4 test_too_many_arg(float4 p0)
+{
+dst(p0, p0, p0);
+ // expected-error@-1 {{no matching function
@@ -0,0 +1,51 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify
+
+float4 test_too_many_arg(float4 p0)
+{
+dst(p0, p0, p0);
+ // expected-error@-1 {{no matching function
@@ -0,0 +1,51 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify
+
+float4 test_too_many_arg(float4 p0)
+{
+dst(p0, p0, p0);
+ // expected-error@-1 {{no matching function
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/133828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl deleted
https://github.com/llvm/llvm-project/pull/133828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -35,6 +35,12 @@ length_vec_impl(vector X) {
#endif
}
+template
+constexpr vector dst_impl(vector src0, vector src1) {
+ vector dest = {1, src0[1] * src1[1], src0[2], src1[3]};
+ return dest;
+}
damyanp wrote:
Coding conventions:
```suggestion
constexpr
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify
+
+float4 test_too_many_arg(float4 p0)
+{
+dst(p0, p0, p0);
+ // expected-error@-1 {{no matching function
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify
+
+float4 test_too_many_arg(float4 p0)
+{
+dst(p0, p0, p0);
+ // expected-error@-1 {{no matching function
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/133828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/metkarpoonam deleted
https://github.com/llvm/llvm-project/pull/133828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify
+
+float4 test_too_many_arg(float4 p0)
+{
+dst(p0, p0, p0);
+ // expected-error@-1 {{no matching function
https://github.com/metkarpoonam updated
https://github.com/llvm/llvm-project/pull/133828
>From 3a45246453d120da108e597d23da0fb8d9df0b1b Mon Sep 17 00:00:00 2001
From: Poonam Vilas Metkar
Date: Mon, 31 Mar 2025 16:49:18 -0700
Subject: [PATCH 1/4] Implement a dst function with test cases for HLSL
llvmbot wrote:
@llvm/pr-subscribers-backend-x86
Author: None (metkarpoonam)
Changes
Implement dst algorithm in the hlsl_intrinsics.h and added test cases for HLSL
codegen and sema
fixes: https://github.com/llvm/llvm-project/issues/99108
---
Full diff: https://github.com/llvm/llvm-project
40 matches
Mail list logo