https://github.com/spall closed https://github.com/llvm/llvm-project/pull/129939
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/129939
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/129939
>From 23debaf2084f953e60847b8f0814c5d1ee27c726 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 4 Mar 2025 09:53:56 -0800
Subject: [PATCH 01/15] extra scalar vector overloads for clamp
---
.../lib/Headers/h
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/129939
>From 23debaf2084f953e60847b8f0814c5d1ee27c726 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 4 Mar 2025 09:53:56 -0800
Subject: [PATCH 01/16] extra scalar vector overloads for clamp
---
.../lib/Headers/h
@@ -0,0 +1,12 @@
+// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 202x %s 2>&1 |
FileCheck %s -DTEST_TYPE=half
+// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 202x %s 2>&1 |
FileCheck %s -DTEST_TYPE=half3
+// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0
@@ -0,0 +1,12 @@
+// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 202x %s 2>&1 |
FileCheck %s -DTEST_TYPE=half
+// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 202x %s 2>&1 |
FileCheck %s -DTEST_TYPE=half3
+// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/129939
>From 23debaf2084f953e60847b8f0814c5d1ee27c726 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 4 Mar 2025 09:53:56 -0800
Subject: [PATCH 01/14] extra scalar vector overloads for clamp
---
.../lib/Headers/h
https://github.com/llvm-beanz commented:
One small nit on formatting, otherwise looks good.
https://github.com/llvm/llvm-project/pull/129939
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com
@@ -0,0 +1,7 @@
+// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 202x %s 2>&1 |
FileCheck %s
+
+// check we error on 16 bit type if shader model is too old
+// CHECK: '-enable-16bit-types' option requires target HLSL Version >= 2018
and shader model >= 6.2, but HLSL Ve
@@ -0,0 +1,7 @@
+// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 202x %s 2>&1 |
FileCheck %s
farzonl wrote:
rename to `clang/test/SemaHLSL/BuiltIns/clamp-errors-16bit.hlsl`
```suggestion
// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 202x %s
@@ -0,0 +1,59 @@
+//===--- hlsl_compat_overloads.h - Additional HLSL overload definitions for
+// intrinsics --===//
llvm-beanz wrote:
nit: shorten the summary so this fits on one line.
https://github.com/llvm/llvm-project/pull/129939
___
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/129939
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/129939
>From 23debaf2084f953e60847b8f0814c5d1ee27c726 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 4 Mar 2025 09:53:56 -0800
Subject: [PATCH 01/12] extra scalar vector overloads for clamp
---
.../lib/Headers/h
@@ -0,0 +1,63 @@
+//===--- hlsl_compat_overloads.h - Additional HLSL overload definitions for
+// intrinsics --===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-Licens
https://github.com/bob80905 approved this pull request.
Ok, given the specific conditions that:
1. there are 3 parameters
2. the first parameter should always be the vector type
3. and there should be at most one base type among all the parameters
This macro should work for that specific case.
I
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/129939
>From 23debaf2084f953e60847b8f0814c5d1ee27c726 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 4 Mar 2025 09:53:56 -0800
Subject: [PATCH 01/13] extra scalar vector overloads for clamp
---
.../lib/Headers/h
@@ -94,6 +109,9 @@ uint64_t3 test_clamp_ulong3(uint64_t3 p0, uint64_t3 p1) {
return clamp(p0, p1,p1
// CHECK: define [[FNATTRS]] <4 x i64> @_Z17test_clamp_ulong4
// CHECK: call <4 x i64> @llvm.[[TARGET]].uclamp.v4i64
uint64_t4 test_clamp_ulong4(uint64_t4 p0, uint64_t4 p1) { re
https://github.com/bob80905 approved this pull request.
https://github.com/llvm/llvm-project/pull/129939
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/129939
>From 23debaf2084f953e60847b8f0814c5d1ee27c726 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 4 Mar 2025 09:53:56 -0800
Subject: [PATCH 01/11] extra scalar vector overloads for clamp
---
.../lib/Headers/h
@@ -81,6 +93,9 @@ int64_t3 test_clamp_long3(int64_t3 p0, int64_t3 p1) { return
clamp(p0, p1,p1); }
// CHECK: define [[FNATTRS]] <4 x i64> @_Z16test_clamp_long4
// CHECK: call <4 x i64> @llvm.[[TARGET]].sclamp.v4i64
int64_t4 test_clamp_long4(int64_t4 p0, int64_t4 p1) { return c
@@ -94,6 +109,9 @@ uint64_t3 test_clamp_ulong3(uint64_t3 p0, uint64_t3 p1) {
return clamp(p0, p1,p1
// CHECK: define [[FNATTRS]] <4 x i64> @_Z17test_clamp_ulong4
// CHECK: call <4 x i64> @llvm.[[TARGET]].uclamp.v4i64
uint64_t4 test_clamp_ulong4(uint64_t4 p0, uint64_t4 p1) { re
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/129939
>From 23debaf2084f953e60847b8f0814c5d1ee27c726 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 4 Mar 2025 09:53:56 -0800
Subject: [PATCH 01/10] extra scalar vector overloads for clamp
---
.../lib/Headers/h
spall wrote:
I need to add more tests for certain odd cases.
https://github.com/llvm/llvm-project/pull/129939
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/129939
>From 23debaf2084f953e60847b8f0814c5d1ee27c726 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 4 Mar 2025 09:53:56 -0800
Subject: [PATCH 1/5] extra scalar vector overloads for clamp
---
.../lib/Headers/hls
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/129939
>From 23debaf2084f953e60847b8f0814c5d1ee27c726 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 4 Mar 2025 09:53:56 -0800
Subject: [PATCH 1/4] extra scalar vector overloads for clamp
---
.../lib/Headers/hls
https://github.com/spall converted_to_draft
https://github.com/llvm/llvm-project/pull/129939
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -35,25 +35,48 @@ namespace hlsl {
#define _HLSL_16BIT_AVAILABILITY_STAGE(environment, version, stage)
#endif
-#define GEN_VEC_SCALAR_OVERLOADS(FUNC_NAME, BASE_TYPE, AVAIL)
\
- GEN_BOTH_OVERLOADS(FUNC_NAME, BASE_TYPE, BASE_TYPE##2, AVAIL)
\
@@ -35,25 +35,48 @@ namespace hlsl {
#define _HLSL_16BIT_AVAILABILITY_STAGE(environment, version, stage)
#endif
-#define GEN_VEC_SCALAR_OVERLOADS(FUNC_NAME, BASE_TYPE, AVAIL)
\
- GEN_BOTH_OVERLOADS(FUNC_NAME, BASE_TYPE, BASE_TYPE##2, AVAIL)
\
@@ -35,25 +35,48 @@ namespace hlsl {
#define _HLSL_16BIT_AVAILABILITY_STAGE(environment, version, stage)
#endif
-#define GEN_VEC_SCALAR_OVERLOADS(FUNC_NAME, BASE_TYPE, AVAIL)
\
- GEN_BOTH_OVERLOADS(FUNC_NAME, BASE_TYPE, BASE_TYPE##2, AVAIL)
\
@@ -35,25 +35,48 @@ namespace hlsl {
#define _HLSL_16BIT_AVAILABILITY_STAGE(environment, version, stage)
#endif
-#define GEN_VEC_SCALAR_OVERLOADS(FUNC_NAME, BASE_TYPE, AVAIL)
\
- GEN_BOTH_OVERLOADS(FUNC_NAME, BASE_TYPE, BASE_TYPE##2, AVAIL)
\
@@ -35,25 +35,48 @@ namespace hlsl {
#define _HLSL_16BIT_AVAILABILITY_STAGE(environment, version, stage)
#endif
-#define GEN_VEC_SCALAR_OVERLOADS(FUNC_NAME, BASE_TYPE, AVAIL)
\
- GEN_BOTH_OVERLOADS(FUNC_NAME, BASE_TYPE, BASE_TYPE##2, AVAIL)
\
@@ -35,25 +35,48 @@ namespace hlsl {
#define _HLSL_16BIT_AVAILABILITY_STAGE(environment, version, stage)
#endif
-#define GEN_VEC_SCALAR_OVERLOADS(FUNC_NAME, BASE_TYPE, AVAIL)
\
- GEN_BOTH_OVERLOADS(FUNC_NAME, BASE_TYPE, BASE_TYPE##2, AVAIL)
\
@@ -35,25 +35,48 @@ namespace hlsl {
#define _HLSL_16BIT_AVAILABILITY_STAGE(environment, version, stage)
#endif
-#define GEN_VEC_SCALAR_OVERLOADS(FUNC_NAME, BASE_TYPE, AVAIL)
\
- GEN_BOTH_OVERLOADS(FUNC_NAME, BASE_TYPE, BASE_TYPE##2, AVAIL)
\
https://github.com/bob80905 edited
https://github.com/llvm/llvm-project/pull/129939
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -35,25 +35,48 @@ namespace hlsl {
#define _HLSL_16BIT_AVAILABILITY_STAGE(environment, version, stage)
#endif
-#define GEN_VEC_SCALAR_OVERLOADS(FUNC_NAME, BASE_TYPE, AVAIL)
\
- GEN_BOTH_OVERLOADS(FUNC_NAME, BASE_TYPE, BASE_TYPE##2, AVAIL)
\
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/129939
>From b464aec7a7686a696006d23f16541ff2ca0bc1b2 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 4 Mar 2025 09:53:56 -0800
Subject: [PATCH 1/2] extra scalar vector overloads for clamp
---
.../lib/Headers/hls
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Sarah Spall (spall)
Changes
Add additional vector scalar overloads for clamp
Revamp Macros which generate overloads
Add Tests
Fix one test which now errors instead of warns.
Closes #128230
---
Full diff: https://github.com/llvm/llvm-proje
llvmbot wrote:
@llvm/pr-subscribers-hlsl
Author: Sarah Spall (spall)
Changes
Add additional vector scalar overloads for clamp
Revamp Macros which generate overloads
Add Tests
Fix one test which now errors instead of warns.
Closes #128230
---
Full diff: https://github.com/llvm/llvm-projec
llvmbot wrote:
@llvm/pr-subscribers-backend-x86
Author: Sarah Spall (spall)
Changes
Add additional vector scalar overloads for clamp
Revamp Macros which generate overloads
Add Tests
Fix one test which now errors instead of warns.
Closes #128230
---
Full diff: https://github.com/llvm/llvm
https://github.com/spall created
https://github.com/llvm/llvm-project/pull/129939
Add additional vector scalar overloads for clamp
Revamp Macros which generate overloads
Add Tests
Fix one test which now errors instead of warns.
Closes #128230
>From b464aec7a7686a696006d23f16541ff2ca0bc1b2 Mon
40 matches
Mail list logo