@@ -0,0 +1,316 @@
+===
+HLSL Function Calls
+===
+
+.. contents::
+ :local:
+
+Introduction
+
+
+This document describes the design and implementation of HLSL's function call
+semantics in Clang. This includes details related to argume
@@ -0,0 +1,316 @@
+===
+HLSL Function Calls
+===
+
+.. contents::
+ :local:
+
+Introduction
+
+
+This document describes the design and implementation of HLSL's function call
+semantics in Clang. This includes details related to argume
@@ -0,0 +1,316 @@
+===
+HLSL Function Calls
+===
+
+.. contents::
+ :local:
+
+Introduction
+
+
+This document describes the design and implementation of HLSL's function call
+semantics in Clang. This includes details related to argume
@@ -0,0 +1,316 @@
+===
+HLSL Function Calls
+===
+
+.. contents::
+ :local:
+
+Introduction
+
+
+This document describes the design and implementation of HLSL's function call
+semantics in Clang. This includes details related to argume
@@ -0,0 +1,316 @@
+===
+HLSL Function Calls
+===
+
+.. contents::
+ :local:
+
+Introduction
+
+
+This document describes the design and implementation of HLSL's function call
+semantics in Clang. This includes details related to argume
@@ -0,0 +1,316 @@
+===
+HLSL Function Calls
+===
+
+.. contents::
+ :local:
+
+Introduction
+
+
+This document describes the design and implementation of HLSL's function call
+semantics in Clang. This includes details related to argume
https://github.com/tex3d created
https://github.com/llvm/llvm-project/pull/107923
Issue: #70096
Changes:
- Doc updates:
- `clang/docs/LanguageExtensions.rst` - Document the new elementwise atan2
builtin.
- `llvm/docs/LangRef.rst` - Document the atan2 intrinsic
- TableGen:
- `clang/includ
https://github.com/tex3d updated
https://github.com/llvm/llvm-project/pull/107923
>From af680b05eb1c83810d6eb044144283ac66d232ec Mon Sep 17 00:00:00 2001
From: Tex Riddell
Date: Mon, 9 Sep 2024 14:39:18 -0700
Subject: [PATCH 1/2] [clang][hlsl] Add atan2 intrinsic part 1
Issue: #70096
Changes:
https://github.com/tex3d updated
https://github.com/llvm/llvm-project/pull/107923
>From 44b355687a3e148bfe3d5e4f95efd39363b58b07 Mon Sep 17 00:00:00 2001
From: Tex Riddell
Date: Mon, 9 Sep 2024 14:39:18 -0700
Subject: [PATCH 1/2] [clang][hlsl] Add atan2 intrinsic part 1
Issue: #70096
Changes:
tex3d wrote:
@farzonl
> since this is a new builtin it would make sense to add it to
> `clang/docs/ReleaseNotes.rst`. There should be some examples from Josh's PRs.
I can't find the examples you're referring to. Do you think you could point
one out? Also, what about the other builtins that
@@ -635,6 +635,17 @@ void LoopInfoStack::push(BasicBlock *Header,
clang::ASTContext &Ctx,
Option = LoopHintAttr::UnrollCount;
State = LoopHintAttr::Numeric;
}
+} else if (HLSLLoopHint) {
+ ValueInt = HLSLLoopHint->getDirective();
+ if (HLSLL
https://github.com/tex3d approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/89788
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -68,25 +68,25 @@ TEST(DxcModeTest, TargetProfileValidation) {
IntrusiveRefCntPtr DiagOpts = new DiagnosticOptions();
DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagConsumer);
- validateTargetProfile("-Tvs_6_0", "dxil--shadermodel6.0-vertex",
+ validateTargetProfile("
@@ -0,0 +1,74 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// the below will cause an llvm unreachable, because RWBuffers don't have
resource attributes yet
+// NOT YET IMPLEMENTED : {{invalid register name prefix 'b' for
@@ -0,0 +1,74 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// the below will cause an llvm unreachable, because RWBuffers don't have
resource attributes yet
+// NOT YET IMPLEMENTED : {{invalid register name prefix 'b' for
@@ -0,0 +1,74 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// the below will cause an llvm unreachable, because RWBuffers don't have
resource attributes yet
+// NOT YET IMPLEMENTED : {{invalid register name prefix 'b' for
@@ -0,0 +1,74 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o -
-fsyntax-only %s -verify
+
+// the below will cause an llvm unreachable, because RWBuffers don't have
resource attributes yet
+// NOT YET IMPLEMENTED : {{invalid register name prefix 'b' for
@@ -44,7 +44,7 @@ void foo2() {
// expected-warning@+1 {{'register' attribute only applies to
cbuffer/tbuffer and external global variables}}
extern RWBuffer U2 : register(u5);
}
-// FIXME: expect-error once fix
https://github.com/llvm/llvm-project/issues/57886.
+// expec
@@ -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/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/tex3d updated
https://github.com/llvm/llvm-project/pull/107923
>From 44b355687a3e148bfe3d5e4f95efd39363b58b07 Mon Sep 17 00:00:00 2001
From: Tex Riddell
Date: Mon, 9 Sep 2024 14:39:18 -0700
Subject: [PATCH 1/3] [clang][hlsl] Add atan2 intrinsic part 1
Issue: #70096
Changes:
tex3d wrote:
Abandoning this PR in favor of a better sequence of steps starting with #108865.
https://github.com/llvm/llvm-project/pull/107923
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
https://github.com/tex3d closed https://github.com/llvm/llvm-project/pull/107923
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tex3d wrote:
Test fix has re-landed: fea18afeed39fe4435d67eee1834f0f34b23013d.
https://github.com/llvm/llvm-project/pull/110198
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: Tex Riddell
Date: 2024-10-01T18:26:05-07:00
New Revision: fea18afeed39fe4435d67eee1834f0f34b23013d
URL:
https://github.com/llvm/llvm-project/commit/fea18afeed39fe4435d67eee1834f0f34b23013d
DIFF:
https://github.com/llvm/llvm-project/commit/fea18afeed39fe4435d67eee1834f0f34b23013d.diff
L
tex3d wrote:
Unfortunately, I didn't see your revert, and my pull didn't show any changes
from main before I quickly committed the test change. So my test change would
also break the build with your revert. So I reverted the test change just now!
Revert: 5d308af894ccc3f7a288d6abd6f9097b4cbc8
tex3d wrote:
> But IIUC, the diagnostic message change from this PR might be unintentional.
> The expected error message in
> [793ded7](https://github.com/llvm/llvm-project/commit/793ded7d0b7f1407636a98007f83074b8dd5f765)
> doesn't align to the error message from other tests in the same file.
@@ -2015,6 +2015,13 @@ _HLSL_AVAILABILITY(shadermodel, 6.0)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_wave_is_first_lane)
__attribute__((convergent)) bool WaveIsFirstLane();
+// \brief Returns the value of the expression for the given lane index within
+// the specified wave.
+templa
@@ -18952,6 +18955,142 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
CGM.getHLSLRuntime().getRadiansIntrinsic(), ArrayRef{Op0},
nullptr, "hlsl.radians");
}
+ case Builtin::BI__builtin_hlsl_splitdouble: {
tex3d wrote:
This is quite a
@@ -18952,6 +18955,142 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
CGM.getHLSLRuntime().getRadiansIntrinsic(), ArrayRef{Op0},
nullptr, "hlsl.radians");
}
+ case Builtin::BI__builtin_hlsl_splitdouble: {
+
+assert((E->getArg(0)->getType()->hasFlo
@@ -4871,6 +4871,12 @@ def HLSLRadians : LangBuiltin<"HLSL_LANG"> {
let Prototype = "void(...)";
}
+def HLSLSplitDouble: LangBuiltin<"HLSL_LANG"> {
+ let Spellings = ["__builtin_hlsl_splitdouble"];
tex3d wrote:
Are we inconsistent on the use of "elementwis
@@ -4681,6 +4601,87 @@ void CallArg::copyInto(CodeGenFunction &CGF, Address
Addr) const {
IsUsed = true;
}
+/// Emit the actual writing-back of a writeback.
+void CodeGenFunction::EmitWriteback(CodeGenFunction &CGF,
tex3d wrote:
Moving this function makes
@@ -5149,6 +5152,12 @@ class CodeGenFunction : public CodeGenTypeCache {
SourceLocation ArgLoc, AbstractCallee AC,
unsigned ParmNum);
+ /// EmitWriteback - Emit callbacks for function.
+ void EmitWritebacks(CodeGenFunctio
@@ -2074,6 +2083,35 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
return true;
break;
}
+ case Builtin::BI__builtin_hlsl_splitdouble: {
+if (SemaRef.checkArgCount(TheCall, 3))
+ return true;
+
+Expr *Op0 = TheCall
@@ -18952,6 +18955,142 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
CGM.getHLSLRuntime().getRadiansIntrinsic(), ArrayRef{Op0},
nullptr, "hlsl.radians");
}
+ case Builtin::BI__builtin_hlsl_splitdouble: {
+
+assert((E->getArg(0)->getType()->hasFlo
@@ -438,6 +438,24 @@ template constexpr uint asuint(T F) {
return __detail::bit_cast(F);
}
+//===--===//
+// asuint splitdouble builtins
+//===---
@@ -0,0 +1,50 @@
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - |
FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o -
-filetype=obj | spirv-val %}
+
+; Make sure lowering is correctly generating spirv code.
---
@@ -18952,6 +18955,142 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
CGM.getHLSLRuntime().getRadiansIntrinsic(), ArrayRef{Op0},
nullptr, "hlsl.radians");
}
+ case Builtin::BI__builtin_hlsl_splitdouble: {
+
+assert((E->getArg(0)->getType()->hasFlo
@@ -0,0 +1,50 @@
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - |
FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o -
-filetype=obj | spirv-val %}
+
+; Make sure lowering is correctly generating spirv code.
---
@@ -1698,18 +1698,27 @@ static bool CheckVectorElementCallArgs(Sema *S,
CallExpr *TheCall) {
return true;
}
-static bool CheckArgsTypesAreCorrect(
+bool CheckArgTypeIsIncorrect(
tex3d wrote:
This switches the naming pattern from the existing convention. W
tex3d wrote:
@francisvm
This changed diagnostics, but didn't update all the affected tests.
See: https://github.com/llvm/llvm-project/pull/110187#issuecomment-2387260975
https://github.com/llvm/llvm-project/pull/110198
___
cfe-commits mailing list
cf
@@ -95,6 +99,157 @@ static void initializeAlloca(CodeGenFunction &CGF,
AllocaInst *AI, Value *Size,
I->addAnnotationMetadata("auto-init");
}
+static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) {
+ Value *Op0 = CGF->EmitScalarExpr(E->getArg(0));
+
@@ -4681,6 +4676,12 @@ void CallArg::copyInto(CodeGenFunction &CGF, Address
Addr) const {
IsUsed = true;
}
+void CodeGenFunction::EmitWritebacks(CodeGenFunction &CGF,
+ const CallArgList &args) {
+ for (const auto &I : args.writebacks())
@@ -5149,6 +5152,9 @@ class CodeGenFunction : public CodeGenTypeCache {
SourceLocation ArgLoc, AbstractCallee AC,
unsigned ParmNum);
+ /// EmitWriteback - Emit callbacks for function.
+ void EmitWritebacks(CodeGenFunction
@@ -18952,6 +18955,142 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
CGM.getHLSLRuntime().getRadiansIntrinsic(), ArrayRef{Op0},
nullptr, "hlsl.radians");
}
+ case Builtin::BI__builtin_hlsl_splitdouble: {
+
+assert((E->getArg(0)->getType()->hasFlo
@@ -18952,6 +18955,142 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
CGM.getHLSLRuntime().getRadiansIntrinsic(), ArrayRef{Op0},
nullptr, "hlsl.radians");
}
+ case Builtin::BI__builtin_hlsl_splitdouble: {
+
+assert((E->getArg(0)->getType()->hasFlo
@@ -2074,6 +2083,35 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
return true;
break;
}
+ case Builtin::BI__builtin_hlsl_elementwise_splitdouble: {
+if (SemaRef.checkArgCount(TheCall, 3))
+ return true;
+
+Expr *O
@@ -0,0 +1,102 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - |
FileCheck %s
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
spirv-vulkan-library %s -fnative-half-type -emit-l
@@ -0,0 +1,50 @@
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - |
FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o -
-filetype=obj | spirv-val %}
+
+; Make sure lowering is correctly generating spirv code.
+
+; CH
@@ -18952,6 +18955,142 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
CGM.getHLSLRuntime().getRadiansIntrinsic(), ArrayRef{Op0},
nullptr, "hlsl.radians");
}
+ case Builtin::BI__builtin_hlsl_splitdouble: {
+
+assert((E->getArg(0)->getType()->hasFlo
https://github.com/tex3d updated
https://github.com/llvm/llvm-project/pull/113636
>From 7c7b72b48e07e0f34c2ee65e11e70db37f8c88b3 Mon Sep 17 00:00:00 2001
From: Tex Riddell
Date: Tue, 15 Oct 2024 16:18:44 -0700
Subject: [PATCH 1/3] Emit constrained atan2 intrinsic for clang builtin
This change
https://github.com/tex3d created
https://github.com/llvm/llvm-project/pull/113636
This change is part of this proposal:
https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294
- `Builtins.td` - Add f16 support for libm atan2 builtin
- `CGBuiltin.cpp` - Emit constraint atan2 intrinsic fo
https://github.com/tex3d updated
https://github.com/llvm/llvm-project/pull/113636
>From 0c9dfb67a7371b9c4087d7b54e6f93e780038117 Mon Sep 17 00:00:00 2001
From: Tex Riddell
Date: Tue, 15 Oct 2024 16:18:44 -0700
Subject: [PATCH 1/3] Emit constrained atan2 intrinsic for clang builtin
This change
https://github.com/tex3d approved this pull request.
https://github.com/llvm/llvm-project/pull/109331
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -95,6 +99,133 @@ static void initializeAlloca(CodeGenFunction &CGF,
AllocaInst *AI, Value *Size,
I->addAnnotationMetadata("auto-init");
}
+static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) {
+ Value *Op0 = CGF->EmitScalarExpr(E->getArg(0));
+
https://github.com/tex3d approved this pull request.
https://github.com/llvm/llvm-project/pull/113649
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tex3d edited https://github.com/llvm/llvm-project/pull/113636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tex3d edited https://github.com/llvm/llvm-project/pull/113636
___
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/113397
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -17,7 +17,7 @@
// EMPTY-NEXT: FinalAttr 0x{{[0-9A-Fa-f]+}} <> Implicit final
// There should be no more occurrances of StructuredBuffer
-// EMPTY-NOT: StructuredBuffer
+// EMPTY-NOT: {{/s}}StructuredBuffer
tex3d wrote:
How do you know that "/s" is space?
@@ -0,0 +1,70 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute
-finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s
+
+// NOTE: The number in type name and whether the struct is packed or not will
mostly
+// likely change once subscript oper
@@ -17,7 +17,7 @@
// EMPTY-NEXT: FinalAttr 0x{{[0-9A-Fa-f]+}} <> Implicit final
// There should be no more occurrances of StructuredBuffer
-// EMPTY-NOT: StructuredBuffer
+// EMPTY-NOT: {{/s}}StructuredBuffer
tex3d wrote:
Oh yeah, I think you could also use `
tex3d wrote:
@farzonl
> Here are just a handful of tests that we might want to update, but there are
> others:
I'm updating these tests that were called out. What others do I need to look
for? How do I know if I've found all the tests I need to update?
https://github.com/llvm/llvm-project/
https://github.com/tex3d updated
https://github.com/llvm/llvm-project/pull/113636
>From a6776121bb118fe4083ccb94fa582cca1aef7f9b Mon Sep 17 00:00:00 2001
From: Tex Riddell
Date: Tue, 15 Oct 2024 16:18:44 -0700
Subject: [PATCH 1/4] Emit constrained atan2 intrinsic for clang builtin
This change
@@ -13,7 +13,7 @@ using size_t = unsigned long;
#endif // SPIR
} // namespace std
-float __builtin_atan2f(float, float);
+float __builtin_erff(float);
tex3d wrote:
Right, I hope I captured that in the PR description above. If that's not clear
enough let me
https://github.com/tex3d updated
https://github.com/llvm/llvm-project/pull/113636
>From a6776121bb118fe4083ccb94fa582cca1aef7f9b Mon Sep 17 00:00:00 2001
From: Tex Riddell
Date: Tue, 15 Oct 2024 16:18:44 -0700
Subject: [PATCH 1/6] Emit constrained atan2 intrinsic for clang builtin
This change
https://github.com/tex3d updated
https://github.com/llvm/llvm-project/pull/113636
>From 661bd4ceba1e60bc12e1e85bffc53edfd13f5494 Mon Sep 17 00:00:00 2001
From: Tex Riddell
Date: Tue, 15 Oct 2024 16:18:44 -0700
Subject: [PATCH 1/6] Emit constrained atan2 intrinsic for clang builtin
This change
@@ -17,7 +17,7 @@
// EMPTY-NEXT: FinalAttr 0x{{[0-9A-Fa-f]+}} <> Implicit final
// There should be no more occurrances of StructuredBuffer
-// EMPTY-NOT: StructuredBuffer
+// EMPTY-NOT: {{^\W}}StructuredBuffer
tex3d wrote:
This still doesn't look right. Did
@@ -17,7 +17,7 @@
// EMPTY-NEXT: FinalAttr 0x{{[0-9A-Fa-f]+}} <> Implicit final
// There should be no more occurrances of StructuredBuffer
-// EMPTY-NOT: StructuredBuffer
+// EMPTY-NOT: {{^\W}}StructuredBuffer
tex3d wrote:
By the way, my suggestion of `{{[^W]
@@ -95,6 +99,144 @@ static void initializeAlloca(CodeGenFunction &CGF,
AllocaInst *AI, Value *Size,
I->addAnnotationMetadata("auto-init");
}
+static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) {
+ Value *Op0 = CGF->EmitScalarExpr(E->getArg(0));
+
@@ -95,6 +99,144 @@ static void initializeAlloca(CodeGenFunction &CGF,
AllocaInst *AI, Value *Size,
I->addAnnotationMetadata("auto-init");
}
+static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) {
+ Value *Op0 = CGF->EmitScalarExpr(E->getArg(0));
+
@@ -95,6 +99,144 @@ static void initializeAlloca(CodeGenFunction &CGF,
AllocaInst *AI, Value *Size,
I->addAnnotationMetadata("auto-init");
}
+static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) {
+ Value *Op0 = CGF->EmitScalarExpr(E->getArg(0));
+
@@ -95,6 +99,144 @@ static void initializeAlloca(CodeGenFunction &CGF,
AllocaInst *AI, Value *Size,
I->addAnnotationMetadata("auto-init");
}
+static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) {
+ Value *Op0 = CGF->EmitScalarExpr(E->getArg(0));
+
@@ -95,6 +99,133 @@ static void initializeAlloca(CodeGenFunction &CGF,
AllocaInst *AI, Value *Size,
I->addAnnotationMetadata("auto-init");
}
+static Value *handleHlslSplitdouble(const CallExpr *E, CodeGenFunction *CGF) {
+ Value *Op0 = CGF->EmitScalarExpr(E->getArg(0));
+
@@ -0,0 +1,98 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - |
FileCheck %s
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
spirv-vulkan-library %s -fnative-half-type -emit-ll
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -verify
+
+void test_no_second_arg(double D) {
+ __builtin_hlsl_elementwise_splitdouble(D);
+ // expected-error@-1 {{too few arguments to function call, exp
https://github.com/tex3d approved this pull request.
Looks good.
https://github.com/llvm/llvm-project/pull/113477
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,54 @@
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - |
FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o -
-filetype=obj | spirv-val %}
+
+; Make sure lowering is correctly generating spirv code.
+
+; CH
@@ -0,0 +1,98 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - |
FileCheck %s
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
spirv-vulkan-library %s -fnative-half-type -emit-ll
@@ -0,0 +1,98 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - |
FileCheck %s
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
spirv-vulkan-library %s -fnative-half-type -emit-ll
@@ -0,0 +1,99 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -O1 -o - |
FileCheck %s
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
spirv-vulkan-library %s -fnative-half-type -emit-ll
https://github.com/tex3d closed https://github.com/llvm/llvm-project/pull/113636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tex3d edited https://github.com/llvm/llvm-project/pull/113636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tex3d closed https://github.com/llvm/llvm-project/pull/112461
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tex3d created
https://github.com/llvm/llvm-project/pull/110187
This change is part of this proposal:
https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294
- Add HLSL frontend for atan2
- Add clang Builtin, map to new llvm.atan2
- SemaChecking restrict to floating po
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_atan2
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermode
https://github.com/tex3d updated
https://github.com/llvm/llvm-project/pull/110187
>From 3669af3b40c85f1287f2c2fcb27bfc4282babd6a Mon Sep 17 00:00:00 2001
From: Tex Riddell
Date: Fri, 13 Sep 2024 18:56:58 -0700
Subject: [PATCH] [HLSL][clang] Add elementwise builtin for atan2 (p3)
This change is
https://github.com/tex3d closed https://github.com/llvm/llvm-project/pull/110187
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tex3d wrote:
You should be able to re-land your change if you add the test fix to it.
https://github.com/llvm/llvm-project/pull/110198
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tex3d wrote:
I just pushed a fix for the test:
https://github.com/llvm/llvm-project/commit/793ded7d0b7f1407636a98007f83074b8dd5f765
https://github.com/llvm/llvm-project/pull/110198
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.
tex3d wrote:
Oh dang. That's why I didn't see an update. Because the revert wasn't pushed
to llvm/main, it was a revert on another repo. Looks like I could re-apply the
test fix again unless you're planning on doing a revert on llvm/main.
https://github.com/llvm/llvm-project/pull/110198
___
Author: Tex Riddell
Date: 2024-10-01T18:05:05-07:00
New Revision: 793ded7d0b7f1407636a98007f83074b8dd5f765
URL:
https://github.com/llvm/llvm-project/commit/793ded7d0b7f1407636a98007f83074b8dd5f765
DIFF:
https://github.com/llvm/llvm-project/commit/793ded7d0b7f1407636a98007f83074b8dd5f765.diff
L
Author: Tex Riddell
Date: 2024-10-01T18:11:20-07:00
New Revision: 5d308af894ccc3f7a288d6abd6f9097b4cbc8cf4
URL:
https://github.com/llvm/llvm-project/commit/5d308af894ccc3f7a288d6abd6f9097b4cbc8cf4
DIFF:
https://github.com/llvm/llvm-project/commit/5d308af894ccc3f7a288d6abd6f9097b4cbc8cf4.diff
L
@@ -343,27 +336,224 @@ struct TemplateParameterListBuilder {
Params.clear();
QualType T = Builder.Template->getInjectedClassNameSpecialization();
-T = S.Context.getInjectedClassNameType(Builder.Record, T);
+T = AST.getInjectedClassNameType(Builder.Record, T);
@@ -4883,6 +4882,12 @@ def HLSLRadians : LangBuiltin<"HLSL_LANG"> {
let Prototype = "void(...)";
}
+def HLSLBufferUpdateCounter : LangBuiltin<"HLSL_LANG"> {
+ let Spellings = ["__builtin_hlsl_buffer_update_counter"];
+ let Attributes = [NoThrow];
+ let Prototype = "uint32
@@ -109,22 +116,16 @@ struct BuiltinTypeDeclBuilder {
}
BuiltinTypeDeclBuilder &
- addHandleMember(Sema &S, ResourceClass RC, ResourceKind RK, bool IsROV,
- bool RawBuffer,
+ addHandleMember(ResourceClass RC, ResourceKind RK, bool IsROV, bool
RawBuffer,
@@ -271,53 +246,70 @@ struct BuiltinTypeDeclBuilder {
return *this;
}
+ FieldDecl *getResourceHandleField() {
+FieldDecl *FD = Fields["h"];
tex3d wrote:
Won't this add "h" when accessed this way?
How about:
```suggestion
FieldDecl *FD = Fields.
https://github.com/tex3d approved this pull request.
https://github.com/llvm/llvm-project/pull/109331
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2074,6 +2083,19 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
return true;
break;
}
+ case Builtin::BI__builtin_hlsl_elementwise_splitdouble: {
+if (SemaRef.checkArgCount(TheCall, 3))
+ return true;
+
+if (Che
https://github.com/tex3d requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/109331
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 142 matches
Mail list logo