https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/139959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -98,21 +110,98 @@ void applySPIRVDistance(MachineInstr &MI,
MachineRegisterInfo &MRI,
SPIRVGlobalRegistry *GR =
MI.getMF()->getSubtarget().getSPIRVGlobalRegistry();
- auto RemoveAllUses = [&](Register Reg) {
-SmallVector UsesToErase(
-llvm::make_pointe
@@ -98,21 +110,98 @@ void applySPIRVDistance(MachineInstr &MI,
MachineRegisterInfo &MRI,
SPIRVGlobalRegistry *GR =
MI.getMF()->getSubtarget().getSPIRVGlobalRegistry();
- auto RemoveAllUses = [&](Register Reg) {
-SmallVector UsesToErase(
-llvm::make_pointe
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/139959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/139959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -98,21 +110,98 @@ void applySPIRVDistance(MachineInstr &MI,
MachineRegisterInfo &MRI,
SPIRVGlobalRegistry *GR =
MI.getMF()->getSubtarget().getSPIRVGlobalRegistry();
- auto RemoveAllUses = [&](Register Reg) {
-SmallVector UsesToErase(
-llvm::make_pointe
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/139959
>From be7df595c1df0f310a1941da3d3ac3529270241e Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Tue, 29 Apr 2025 16:46:08 -0700
Subject: [PATCH 1/5] WIP - debug `matchSelectToFaceForward`
---
.../lib/Headers/hlsl/hl
@@ -0,0 +1,63 @@
+# RUN: llc -verify-machineinstrs -O0 -mtriple spirv-unknown-unknown
-run-pass=spirv-prelegalizer-combiner %s -o - | FileCheck %s
+# REQUIRES: asserts
+---
+name:faceforward_instcombine_float
+tracksRegLiveness: true
+legalized: true
+body:
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/139959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/139959
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,63 @@
+# RUN: llc -verify-machineinstrs -O0 -mtriple spirv-unknown-unknown
-run-pass=spirv-prelegalizer-combiner %s -o - | FileCheck %s
+# REQUIRES: asserts
+---
+name:faceforward_instcombine_float
+tracksRegLiveness: true
+legalized: true
+body:
https://github.com/kmpeng created
https://github.com/llvm/llvm-project/pull/139959
Tasks completed:
- instCombine `select(fcmp(dot(p2, p3), 0), p1, 0 - p1)` to `faceforward(p1,
p2, p3)`
- Remove HLSL `faceforward` intrinsic's SPIR-V fast path
- Add instCombine tests to `prelegalizercombiner-sel
https://github.com/kmpeng closed
https://github.com/llvm/llvm-project/pull/138182
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/138182
>From d5187a940fc0a16325eedb0c67bcf647deb95d8f Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Thu, 1 May 2025 11:48:47 -0700
Subject: [PATCH 1/4] ldexp implementation and tests
---
.../lib/Headers/hlsl/hlsl_intrin
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/138182
>From d5187a940fc0a16325eedb0c67bcf647deb95d8f Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Thu, 1 May 2025 11:48:47 -0700
Subject: [PATCH 1/3] ldexp implementation and tests
---
.../lib/Headers/hlsl/hlsl_intrin
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/138182
>From d5187a940fc0a16325eedb0c67bcf647deb95d8f Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Thu, 1 May 2025 11:48:47 -0700
Subject: [PATCH 1/2] ldexp implementation and tests
---
.../lib/Headers/hlsl/hlsl_intrin
https://github.com/kmpeng created
https://github.com/llvm/llvm-project/pull/138182
Closes #99133.
Implemented `ldexp` entirely in `hlsl_intrinsics.h` and
`hlsl_intrinsic_helpers.h`, added coresponding tests in
`clang/test/CodeGenHLSL/builtins/ldexp.hlsl` and
`clang/test/SemaHLSL/BuiltIns/lde
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/136026
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -89,7 +132,7 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned
BuiltinID,
QualType ArgTyB = B.get()->getType();
auto *VTyB = ArgTyB->getAs();
if (VTyB == nullptr) {
- SemaRef.Diag(A.get()->getBeginLoc(),
+ SemaRef.Diag(B.get()->getBeginLoc(),
-
https://github.com/kmpeng deleted
https://github.com/llvm/llvm-project/pull/136026
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 %s -triple spirv-pc-vulkan-compute -verify
+
+typedef float float2 __attribute__((ext_vector_type(2)));
+
+float2 test_no_second_arg(float2 p0) {
+ return __builtin_spirv_refract(p0);
+ // expected-error@-1 {{too few arguments to function cal
@@ -71,6 +71,27 @@ constexpr vector reflect_vec_impl(vector I,
vector N) {
#endif
}
+template constexpr T refract_impl(T I, T N, T eta) {
+ T k = 1 - eta * eta * (1 - (N * I * N *I));
kmpeng wrote:
Variables should [start with an upper-case
letter](https:
@@ -89,7 +132,7 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned
BuiltinID,
QualType ArgTyB = B.get()->getType();
auto *VTyB = ArgTyB->getAs();
if (VTyB == nullptr) {
- SemaRef.Diag(A.get()->getBeginLoc(),
+ SemaRef.Diag(B.get()->getBeginLoc(),
-
https://github.com/kmpeng closed
https://github.com/llvm/llvm-project/pull/135878
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/135878
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/135878
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/135878
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/135878
>From 115b4f8e6276c4dd19e66136a5ad01b6b22f7586 Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Mon, 7 Apr 2025 14:46:07 -0700
Subject: [PATCH 1/5] create int_spv_faceforward intrinsic, create faceforward
lowering &
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/135878
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/135878
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -105,35 +136,27 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned
BuiltinID,
if (SemaRef.checkArgCount(TheCall, 3))
return true;
-// check if the all arguments have floating representation
-for (unsigned i = 0; i < TheCall->getNumArgs(); ++i) {
-
@@ -126,6 +126,24 @@ template constexpr vector lit_impl(T
NDotL, T NDotH, T M) {
return Result;
}
+template constexpr T faceforward_impl(T N, T I, T Ng) {
kmpeng wrote:
You're right. Removed vector implementation
https://github.com/llvm/llvm-project/pul
@@ -0,0 +1,35 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 5
+
+// RUN: %clang_cc1 -O1 -triple spirv-pc-vulkan-compute %s -emit-llvm -o - |
FileCheck %s
+
+typedef float float2 __attribute__((ext_vector_type(2)));
+typedef
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/135878
>From d953d95867574dd575cf098668554dfa8e7ffad5 Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Mon, 7 Apr 2025 14:46:07 -0700
Subject: [PATCH 1/4] create int_spv_faceforward intrinsic, create faceforward
lowering &
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/135878
>From 69aee464d31dcf585c355808053b0c4d1c7d7f3c Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Mon, 7 Apr 2025 14:46:07 -0700
Subject: [PATCH 1/4] create int_spv_faceforward intrinsic, create faceforward
lowering &
@@ -105,35 +136,27 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned
BuiltinID,
if (SemaRef.checkArgCount(TheCall, 3))
return true;
-// check if the all arguments have floating representation
-for (unsigned i = 0; i < TheCall->getNumArgs(); ++i) {
-
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/135878
>From 69aee464d31dcf585c355808053b0c4d1c7d7f3c Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Mon, 7 Apr 2025 14:46:07 -0700
Subject: [PATCH 1/3] create int_spv_faceforward intrinsic, create faceforward
lowering &
@@ -214,6 +214,53 @@ const inline double4 dst(double4 Src0, double4 Src1) {
return __detail::dst_impl(Src0, Src1);
}
+//===--===//
+// faceforward builtin
+//===--
@@ -137,6 +137,42 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned
BuiltinID,
TheCall->setType(RetTy);
break;
}
+ case SPIRV::BI__builtin_spirv_faceforward: {
+if (SemaRef.checkArgCount(TheCall, 3))
+ return true;
+
+// check if all arguments h
@@ -0,0 +1,94 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
kmpeng wrote:
Code updated
https://github.com/llvm/llvm-project/pull/135878
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/135878
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -137,6 +137,42 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned
BuiltinID,
TheCall->setType(RetTy);
break;
}
+ case SPIRV::BI__builtin_spirv_faceforward: {
+if (SemaRef.checkArgCount(TheCall, 3))
+ return true;
+
+// check if all arguments h
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/135878
>From 69aee464d31dcf585c355808053b0c4d1c7d7f3c Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Mon, 7 Apr 2025 14:46:07 -0700
Subject: [PATCH 1/2] create int_spv_faceforward intrinsic, create faceforward
lowering &
https://github.com/kmpeng created
https://github.com/llvm/llvm-project/pull/135878
Resolves #99114. There will be a follow-up PR on pattern matching later.
Tasks completed:
- Implement `faceforward` in `hlsl_intrinsics.h`/`hlsl_intrinsic_helpers.h`
- Implement `faceforward` SPIR-V target builti
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng closed
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/134171
>From 719bb94279f64f134c826faa22898e4e549bb23c Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Thu, 27 Mar 2025 14:39:27 -0700
Subject: [PATCH 01/11] finished lit implementation, added codegen and sema
tests
---
.
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify -verify-ignore-unexpected=note
+
+float4 test_double_inputs(double p0, double p1, double p2) {
+ retur
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/134171
>From d87804880ceee63329761178e780bd301b3e50f6 Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Thu, 27 Mar 2025 14:39:27 -0700
Subject: [PATCH 01/13] finished lit implementation, added codegen and sema
tests
---
.
@@ -0,0 +1,34 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 5
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - |
FileCheck %s
---
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/134171
>From d87804880ceee63329761178e780bd301b3e50f6 Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Thu, 27 Mar 2025 14:39:27 -0700
Subject: [PATCH 01/12] finished lit implementation, added codegen and sema
tests
---
.
@@ -280,6 +280,17 @@ constexpr bool4 isinf(double4 V) { return
isinf((float4)V); }
_DXC_COMPAT_TERNARY_DOUBLE_OVERLOADS(lerp)
_DXC_COMPAT_TERNARY_INTEGER_OVERLOADS(lerp)
+//===--===//
+// lit builtins overloa
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify
+
+float4 test_no_second_arg(float p0) {
+ return lit(p0);
+ // expected-error@-1 {{no matching funct
@@ -0,0 +1,9 @@
+// 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=int16_t
+// RUN: not %clang_dxc -enable-16bit-types -T cs_6_
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/134171
>From 719bb94279f64f134c826faa22898e4e549bb23c Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Thu, 27 Mar 2025 14:39:27 -0700
Subject: [PATCH 01/12] finished lit implementation, added codegen and sema
tests
---
.
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
kmpeng wrote:
I currently don't have `-fnative-half-type` enabled in that file, so yes this
test case ends up having `float` input/return types (though it's not
necessarily being converted in the function, if that's what you're asking).
With `-fnative-half-ty
@@ -322,5 +322,53 @@ reflect(__detail::HLSL_FIXED_VECTOR I,
__detail::HLSL_FIXED_VECTOR N) {
return __detail::reflect_vec_impl(I, N);
}
+
+//===--===//
+// smoothstep builtin
+//===---
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/134171
>From 719bb94279f64f134c826faa22898e4e549bb23c Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Thu, 27 Mar 2025 14:39:27 -0700
Subject: [PATCH 1/8] finished lit implementation, added codegen and sema tests
---
.../
@@ -253,6 +253,37 @@ const inline float
length(__detail::HLSL_FIXED_VECTOR X) {
return __detail::length_vec_impl(X);
}
+//===--===//
+// lit builtins
+//===--
@@ -101,6 +101,16 @@ constexpr vector smoothstep_vec_impl(vector
Min, vector Max,
#endif
}
+template constexpr vector lit_impl(T NDotL, T NDotH, T M) {
+ bool DiffuseCond = NDotL < 0;
+ T Diffuse = select(DiffuseCond, 0, NDotL);
+ vector Result = {1, Diffuse, 0, 1};
+ bo
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -280,6 +280,22 @@ constexpr bool4 isinf(double4 V) { return
isinf((float4)V); }
_DXC_COMPAT_TERNARY_DOUBLE_OVERLOADS(lerp)
_DXC_COMPAT_TERNARY_INTEGER_OVERLOADS(lerp)
+//===--===//
+// lit builtins overloa
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -280,6 +280,22 @@ constexpr bool4 isinf(double4 V) { return
isinf((float4)V); }
_DXC_COMPAT_TERNARY_DOUBLE_OVERLOADS(lerp)
_DXC_COMPAT_TERNARY_INTEGER_OVERLOADS(lerp)
+//===--===//
+// lit builtins overloa
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/134171
>From 719bb94279f64f134c826faa22898e4e549bb23c Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Thu, 27 Mar 2025 14:39:27 -0700
Subject: [PATCH 1/9] finished lit implementation, added codegen and sema tests
---
.../
@@ -253,6 +253,37 @@ const inline float
length(__detail::HLSL_FIXED_VECTOR X) {
return __detail::length_vec_impl(X);
}
+//===--===//
+// lit builtins
+//===--
@@ -280,6 +280,22 @@ constexpr bool4 isinf(double4 V) { return
isinf((float4)V); }
_DXC_COMPAT_TERNARY_DOUBLE_OVERLOADS(lerp)
_DXC_COMPAT_TERNARY_INTEGER_OVERLOADS(lerp)
+//===--===//
+// lit builtins overloa
https://github.com/kmpeng deleted
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -101,6 +101,16 @@ constexpr vector smoothstep_vec_impl(vector
Min, vector Max,
#endif
}
+template constexpr vector lit_impl(T NDotL, T NDotH, T M) {
+ bool DiffuseCond = NDotL < 0;
+ T Diffuse = select(DiffuseCond, 0, NDotL);
+ vector Result = {1, Diffuse, 0, 1};
+ bo
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,36 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 5
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - |
FileCheck %s
+
+// CHECK
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/134171
>From 719bb94279f64f134c826faa22898e4e549bb23c Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Thu, 27 Mar 2025 14:39:27 -0700
Subject: [PATCH 1/7] finished lit implementation, added codegen and sema tests
---
.../
@@ -253,6 +253,37 @@ const inline float
length(__detail::HLSL_FIXED_VECTOR X) {
return __detail::length_vec_impl(X);
}
+//===--===//
+// lit builtins
+//===--
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/134171
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng created
https://github.com/llvm/llvm-project/pull/134171
Closes #99135.
Tasks completed:
- Wrote implementation in `hlsl_intrinsics.h`/`hlsl_intrinsic_helpers.h` that
matches DXC
- Created overloads in `hlsl_compat_overloads.h` that take doubles/ints and
explicitly
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/132288
>From 1d28510653b39fcabe45ad37197674bdd0217add Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Tue, 18 Mar 2025 13:25:10 -0700
Subject: [PATCH 01/11] create int_spv_smoothstep intrinsic, create smoothstep
lowering &
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/132288
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,60 @@
+; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-unknown %s -o - |
FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o -
-filetype=obj | spirv-val %}
kmpeng wrote:
@s-perron Changing the target envir
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/132288
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/132288
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/132288
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,60 @@
+; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-unknown %s -o - |
FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o -
-filetype=obj | spirv-val %}
kmpeng wrote:
Seems like this change produces thi
https://github.com/kmpeng deleted
https://github.com/llvm/llvm-project/pull/132288
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -101,6 +101,52 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned
BuiltinID,
TheCall->setType(RetTy);
break;
}
+ case SPIRV::BI__builtin_spirv_smoothstep: {
+if (SemaRef.checkArgCount(TheCall, 3))
+ return true;
+
+// check if the all argument
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/132288
>From 1d28510653b39fcabe45ad37197674bdd0217add Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Tue, 18 Mar 2025 13:25:10 -0700
Subject: [PATCH 01/10] create int_spv_smoothstep intrinsic, create smoothstep
lowering &
@@ -0,0 +1,60 @@
+; RUN: llc -O0 -verify-machineinstrs -mtriple=spirv-unknown-unknown %s -o - |
FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o -
-filetype=obj | spirv-val %}
kmpeng wrote:
Code updated with `--target-env vul
https://github.com/kmpeng edited
https://github.com/llvm/llvm-project/pull/132288
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -101,6 +101,52 @@ bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned
BuiltinID,
TheCall->setType(RetTy);
break;
}
+ case SPIRV::BI__builtin_spirv_smoothstep: {
+if (SemaRef.checkArgCount(TheCall, 3))
+ return true;
+
+// check if the all argument
https://github.com/kmpeng updated
https://github.com/llvm/llvm-project/pull/132288
>From 7853b27b8fffa6d2c0393a4004abaac9a7954608 Mon Sep 17 00:00:00 2001
From: kmpeng
Date: Tue, 18 Mar 2025 13:25:10 -0700
Subject: [PATCH 01/10] create int_spv_smoothstep intrinsic, create smoothstep
lowering &
1 - 100 of 137 matches
Mail list logo