https://github.com/spall closed https://github.com/llvm/llvm-project/pull/138429
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall created
https://github.com/llvm/llvm-project/pull/140627
In 'EmitStoreThroughExtVectorComponentLValue', move the code which ZExts in the
case the Destination Scalar Type is larger than the Source Scalar Type, to the
top of the function, to ensure each condition is hand
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/138429
>From 1139101e277f8f4d327fd7b422959dc4a3a43dbe Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 18 Mar 2025 11:04:11 -0700
Subject: [PATCH 1/3] update error messaging
---
.../clang/Basic/DiagnosticSemaKinds
@@ -2507,13 +2441,9 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
case Builtin::BI__builtin_hlsl_dot: {
-if (SemaRef.checkArgCount(TheCall, 2))
spall wrote:
BuiltinVectorToScalarMath checks that the a
@@ -2446,37 +2376,41 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
case Builtin::BI__builtin_hlsl_any: {
if (SemaRef.checkArgCount(TheCall, 1))
return true;
+if (CheckAnyScalarOrVector(&SemaRef, TheCall, 0))
+ return t
@@ -158,6 +158,42 @@ namespace hlsl {
return fn((float4)V1, (float4)V2, (float4)V3);
\
}
+#define _DXC_COMPAT_BINARY_VECTOR_SCALAR_OVERLOADS(fn)
\
+ template
\
+ cons
@@ -158,6 +158,42 @@ namespace hlsl {
return fn((float4)V1, (float4)V2, (float4)V3);
\
}
+#define _DXC_COMPAT_BINARY_VECTOR_SCALAR_OVERLOADS(fn)
\
+ template
\
+ cons
@@ -179,3 +179,41 @@ half3 test_lerp_half_scalar(half3 x, half3 y, half s) {
return lerp(x, y, s); }
float3 test_lerp_float_scalar(float3 x, float3 y, float s) {
return lerp(x, y, s);
}
+
+// CHECK: define [[FNATTRS]] <2 x float> @_Z23test_lerp_float_scalar1Dv2_ff(
+// CHECK
@@ -236,6 +257,22 @@ _DXC_COMPAT_UNARY_INTEGER_OVERLOADS(cosh)
_DXC_COMPAT_UNARY_DOUBLE_OVERLOADS(degrees)
_DXC_COMPAT_UNARY_INTEGER_OVERLOADS(degrees)
+//===--===//
+// dot builtins overloads
+//===--
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/138429
>From 1139101e277f8f4d327fd7b422959dc4a3a43dbe Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Tue, 18 Mar 2025 11:04:11 -0700
Subject: [PATCH 1/2] update error messaging
---
.../clang/Basic/DiagnosticSemaKinds
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify -verify-ignore-unexpected
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %
@@ -42,47 +42,47 @@ float2 test_mad_element_type_mismatch(half2 p0, float2 p1) {
float2 test_builtin_mad_float2_splat(float p0, float2 p1) {
return __builtin_hlsl_mad(p0, p1, p1);
- // expected-error@-1 {{all arguments to '__builtin_hlsl_mad' must be
vectors}}
+ // expect
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/138541
___
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/138541
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-ser
@@ -2095,6 +2096,17 @@ Value *ScalarExprEmitter::VisitInitListExpr(InitListExpr
*E) {
assert (Ignore == false && "init list ignored");
unsigned NumInitElements = E->getNumInits();
+ // HLSL initialization lists in the AST are an expansion which can contain
+ // side-eff
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify -verify-ignore-unexpected
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/138541
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-ser
https://github.com/spall created
https://github.com/llvm/llvm-project/pull/138541
When an HLSL Init list is producing a Scalar, handle OpaqueValueExprs in the
Init List with 'emitInitListOpaqueValues'
Copied from 'AggExprEmitter::VisitCXXParenListOrInitListExpr'
Closes #136408
>From 24f4cf687
https://github.com/spall created
https://github.com/llvm/llvm-project/pull/138429
Update how Sema Checking is done for HLSL builtins to allow for better error
messages, mainly using 'err_builtin_invalid_arg_type'.
Try to follow the formula outlined in issue #134721
Closes #134721
>From 113910
@@ -0,0 +1,49 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple
dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm
-disable-llvm-passes -o - | FileCheck %s
spall wrote:
A lot of the builtins that support half and float have tests with
@@ -0,0 +1,39 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only
-disable-llvm-passes -verify
+
+float test_double_inputs(double p0, double p1) {
+ return ldexp(p0, p1);
+ // expected-error@-1 {{no matc
@@ -303,6 +303,48 @@ fmod(__detail::HLSL_FIXED_VECTOR X,
return __detail::fmod_vec_impl(X, Y);
}
+//===--===//
+// ldexp builtins
+//===--=
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/137004
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall created
https://github.com/llvm/llvm-project/pull/137004
Put tests for compatibility overloads for 'clamp', 'isinf', 'min', and 'max' in
own files which guarantee hlsl version 202x.
Closes #133277
>From d0051512fc864c250a3734ac4df0ba09072669ef Mon Sep 17 00:00:00 2001
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/134293
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall approved this pull request.
LGTM based on previous pr approval and looking at the change in the latest
commit
https://github.com/llvm/llvm-project/pull/134293
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
https://github.com/spall approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/133508
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/135848
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/136580
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall created
https://github.com/llvm/llvm-project/pull/136580
Reland #134174
Update Sema Checking to always do an HLSL Array RValue cast in the case we are
dealing with hlsl constant array types
Instead of comparing canonical types, compare canonical unqualified types
Add a
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/136576
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall created
https://github.com/llvm/llvm-project/pull/136576
Reverts llvm/llvm-project#134174
Revert due to test error breaking a lot of bots.
>From e35cf35feff443c6dd9fbc0b5ab00efa8e282fa0 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Mon, 21 Apr 2025 09:27:45 -0700
Su
spall wrote:
> Hi, this turned a few bots red. Can this be fixed forward or should we revert
> in the meantime? Let me know if you need help with the bot setup / build
> config. Thanks!
It can be reverted
https://github.com/llvm/llvm-project/pull/134174
___
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/134174
___
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/134174
>From 5d81a4b7b034dd5999feb6ab37537270d6bae2a8 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Wed, 2 Apr 2025 12:04:18 -0700
Subject: [PATCH 1/2] compare unqualified canonical types and add an hlsl array
rvalue
@@ -2268,17 +2268,15 @@ static bool IsStandardConversion(Sema &S, Expr* From,
QualType ToType,
// handling here.
if (ToType->isArrayParameterType()) {
FromType = S.Context.getArrayParameterType(FromType);
- SCS.First = ICK_HLSL_Array_RValue;
} else if (
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/135848
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/135848
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/135848
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/135848
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall created
https://github.com/llvm/llvm-project/pull/135848
Instead of converting the type in a RawBuffer to its HLSL type using
'ConvertType', use 'ConvertTypeForMem'.
ConvertTypeForMem handles booleans being i32 and boolean vectors being .
Add tests to show booleans and
@@ -605,13 +605,11 @@ void BackendConsumer::UnsupportedDiagHandler(
// Context will be nullptr for IR input files, we will construct the diag
// message from llvm::DiagnosticInfoUnsupported.
- if (Context != nullptr) {
+ if (Context != nullptr)
Loc = getBestLocation
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/134683
>From 87308905daa9093caef9ffb920bf9968c0bfb597 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Mon, 7 Apr 2025 09:31:28 -0700
Subject: [PATCH 1/3] desguar constantarraytype
---
clang/lib/CodeGen/HLSLBufferLayou
https://github.com/spall created
https://github.com/llvm/llvm-project/pull/134683
When calculating the layout for a cbuffer field, if that field is a
ConstantArrayType, desguar it before casting it to a ConstantArrayType.
Closes #134668
>From 87308905daa9093caef9ffb920bf9968c0bfb597 Mon Sep 1
@@ -0,0 +1,110 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.3-library %s \
+// RUN: -fnative-half-type -emit-llvm -disable-llvm-passes -o - | \
+// RUN: FileCheck %s
+// RUN: %clang_cc1 -finclude-default-header -triple
spirv-unknown-vulkan-compu
https://github.com/spall approved this pull request.
https://github.com/llvm/llvm-project/pull/135125
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3249,166 +3249,204 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl
*VD) {
}
}
}
-
-static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E,
-llvm::SmallVectorImpl &List,
-llvm::SmallVectorImpl &Des
@@ -0,0 +1,53 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute
-finclude-default-header -verify -Wdouble-promotion -Wconversion %s
+
spall wrote:
Maybe you should add a test case for an array of arrays, like 'int2[2][]'
https://github.com/llvm/llvm
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/134683
>From 87308905daa9093caef9ffb920bf9968c0bfb597 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Mon, 7 Apr 2025 09:31:28 -0700
Subject: [PATCH 1/2] desguar constantarraytype
---
clang/lib/CodeGen/HLSLBufferLayou
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/134174
>From 5d81a4b7b034dd5999feb6ab37537270d6bae2a8 Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Wed, 2 Apr 2025 12:04:18 -0700
Subject: [PATCH] compare unqualified canonical types and add an hlsl array
rvalue cas
https://github.com/spall ready_for_review
https://github.com/llvm/llvm-project/pull/134174
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
spall wrote:
> this is not NFC, so we should verify that we can call these intrinsics with
> `half` values even if 16-bit types aren't enabled, and that they properly
> codegen to 32-bit varia
> > > > > For example, for `abs`, it still depends on the
> > > > > _HLSL_16BIT_AVAILABILITY availab
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/131666
>From 4d4541232fb8ada1a4a17701919809a2a727d52d Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Mon, 17 Mar 2025 12:01:11 -0700
Subject: [PATCH 1/2] remove Macros implementing overloads for min and max.
Implement
@@ -91,6 +91,137 @@ if.end: ; preds =
%if.else, %if.then
%3 = load i32, ptr %resp, align 4
ret i32 %3
}
+
+; CHECK: define i32 @flatten_switch(i32 %X)
+; CHECK-NOT: hlsl.controlflow.hint
+; CHECK: switch i32 %0, label %sw.epil
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/133508
___
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/132804
>From 140b17c6972ac7f867dc342f29121d71e079c9db Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Mon, 24 Mar 2025 11:38:21 -0700
Subject: [PATCH 1/2] half overloads are defined all the time
---
.../lib/Headers/hl
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/131666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -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
@@ -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/spall created
https://github.com/llvm/llvm-project/pull/134174
Update Sema Checking to always do an HLSL Array RValue cast in the case we are
dealing with hlsl constant array types
Instead of comparing canonical types, compare canonical unqualified types
Add a test to show it
@@ -253,6 +253,37 @@ const inline float
length(__detail::HLSL_FIXED_VECTOR X) {
return __detail::length_vec_impl(X);
}
+//===--===//
+// lit builtins
+//===--
@@ -3249,166 +3249,204 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl
*VD) {
}
}
}
-
-static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E,
-llvm::SmallVectorImpl &List,
-llvm::SmallVectorImpl &Des
@@ -3249,33 +3249,42 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl
*VD) {
}
}
}
+namespace {
+class InitListTransformer {
+ Sema &S;
+ ASTContext &Ctx;
+ QualType InitTy;
+ QualType *DstIt = nullptr;
+ Expr **ArgIt = nullptr;
+ bool Wrap;
@@ -3249,166 +3249,204 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl
*VD) {
}
}
}
-
-static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E,
-llvm::SmallVectorImpl &List,
-llvm::SmallVectorImpl &Des
@@ -3249,166 +3249,204 @@ void SemaHLSL::processExplicitBindingsOnDecl(VarDecl
*VD) {
}
}
}
-
-static bool CastInitializer(Sema &S, ASTContext &Ctx, Expr *E,
-llvm::SmallVectorImpl &List,
-llvm::SmallVectorImpl &Des
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/133520
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall created
https://github.com/llvm/llvm-project/pull/133520
Add WaveReadLaneAt unsigned integer overloads
2nd argument of WaveReadLaneAt should be a uint32_t and not an int32_t
add tests
Closes #133473
>From 69d23f1ba200ceab78d1c108b629875b108689c0 Mon Sep 17 00:00:00 200
https://github.com/spall created
https://github.com/llvm/llvm-project/pull/132804
Finish the work of #81782
Closes #132793
>From 140b17c6972ac7f867dc342f29121d71e079c9db Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Mon, 24 Mar 2025 11:38:21 -0700
Subject: [PATCH] half overloads are defin
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/132979
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
spall wrote:
> > this is not NFC, so we should verify that we can call these intrinsics with
> > `half` values even if 16-bit types aren't enabled, and that they properly
> > codegen to 32-bit varia
>
> > > > > > For example, for `abs`, it still depends on the
> > > > > > _HLSL_16BIT_AVAILABI
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/132979
>From 5facb02ef4df5e0da31b6adef66f0b72309b99df Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Mon, 24 Mar 2025 17:15:54 -0700
Subject: [PATCH 1/5] new double overloads + tests
---
clang/lib/Frontend/InitPrepro
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/132979
>From 5facb02ef4df5e0da31b6adef66f0b72309b99df Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Mon, 24 Mar 2025 17:15:54 -0700
Subject: [PATCH 1/4] new double overloads + tests
---
clang/lib/Frontend/InitPrepro
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/132979
>From 5facb02ef4df5e0da31b6adef66f0b72309b99df Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Mon, 24 Mar 2025 17:15:54 -0700
Subject: [PATCH 1/2] new double overloads + tests
---
clang/lib/Frontend/InitPrepro
https://github.com/spall created
https://github.com/llvm/llvm-project/pull/132979
Add double overloads which cast the double to a float and call the float
builtin.
Makes these double overloads conditional on hlsl version 202x or earlier.
Add tests
Closes #128228
>From 5facb02ef4df5e0da31b6ade
@@ -91,6 +91,137 @@ if.end: ; preds =
%if.else, %if.then
%3 = load i32, ptr %resp, align 4
ret i32 %3
}
+
+; CHECK: define i32 @flatten_switch(i32 %X)
+; CHECK-NOT: hlsl.controlflow.hint
+; CHECK: switch i32 %0, label %sw.epil
@@ -91,6 +91,137 @@ if.end: ; preds =
%if.else, %if.then
%3 = load i32, ptr %resp, align 4
ret i32 %3
}
+
+; CHECK: define i32 @flatten_switch(i32 %X)
+; CHECK-NOT: hlsl.controlflow.hint
+; CHECK: switch i32 %0, label %sw.epil
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/132804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/132804
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
spall wrote:
> Are there any test changes we should consider here? If not could you prefix
> `[NFC]` to the title?
It looked to me like the tests were all correct based on what was done in the
reference PR
https://github.com/llvm/llvm-project/pull/132804
__
spall wrote:
> > > For example, for `abs`, it still depends on the _HLSL_16BIT_AVAILABILITY
> > > availability attribute. Does this PR intend to keep abs overloads using
> > > half "unexposed"? Or should that overload for abs be exposed too?
> >
> >
> > Oh I see what you are referring to. Tha
spall wrote:
> For example, for `abs`, it still depends on the _HLSL_16BIT_AVAILABILITY
> availability attribute. Does this PR intend to keep abs overloads using half
> "unexposed"? Or should that overload for abs be exposed too?
Oh I see what you are referring to. That might be my mistake; le
spall wrote:
> For example, for `abs`, it still depends on the _HLSL_16BIT_AVAILABILITY
> availability attribute. Does this PR intend to keep abs overloads using half
> "unexposed"? Or should that overload for abs be exposed too?
I'm not sure I understand the question, I think abs is the same
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/131666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/131928
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.2-library %s -fnative-half-type -verify
+
+
+int16_t4 test_asint_too_many_arg(uint16_t p0, uint16_t p1)
+{
+return asint16(p0, p1);
+ // expected-error@-1 {{no matching function for ca
@@ -0,0 +1,48 @@
+// 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: define {{.*}}test_ints{{.*}}(i16 {{.*}} [[VAL:%.*]]){{.*}}
+// CHECK-NOT: bitcast
+// CHECK: ret i16 [
@@ -0,0 +1,55 @@
+; 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 %}
+
+; CHECK: OpCapability Int16
+; CHECK: OpCapability Float16
+; CH
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/131666
>From 4d4541232fb8ada1a4a17701919809a2a727d52d Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Mon, 17 Mar 2025 12:01:11 -0700
Subject: [PATCH 1/5] remove Macros implementing overloads for min and max.
Implement
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/131666
>From 4d4541232fb8ada1a4a17701919809a2a727d52d Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Mon, 17 Mar 2025 12:01:11 -0700
Subject: [PATCH 1/4] remove Macros implementing overloads for min and max.
Implement
https://github.com/spall updated
https://github.com/llvm/llvm-project/pull/131666
>From 4d4541232fb8ada1a4a17701919809a2a727d52d Mon Sep 17 00:00:00 2001
From: Sarah Spall
Date: Mon, 17 Mar 2025 12:01:11 -0700
Subject: [PATCH 1/3] remove Macros implementing overloads for min and max.
Implement
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/131666
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -54,5 +54,67 @@ clamp(U p0, V p1, W p2) {
return clamp(p0, (U)p1, (U)p2);
}
+//===--===//
+// max builtin overloads
+//===--===//
+
+tem
spall wrote:
> LGTM! Unfortunate about the macros not working out but this alternative is
> pretty convenient.
They would have worked if we didn't need even more overloads!
https://github.com/llvm/llvm-project/pull/131666
___
cfe-commits mailing list
https://github.com/spall closed https://github.com/llvm/llvm-project/pull/131035
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/spall created
https://github.com/llvm/llvm-project/pull/131666
Replace min and max overload implementation using macros with one using
templates.
Enable new overloads of the forms:
vector min/max(vector p0, U p1)
vector min/max(U p0, vector p1)
vector min/max(vector p0, ve
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/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 approved this pull request.
https://github.com/llvm/llvm-project/pull/131035
___
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/16] extra scalar vector overloads for clamp
---
.../lib/Headers/h
1 - 100 of 366 matches
Mail list logo