farzonl wrote:
> I'd definitely suggest you reduce the scope - maybe always expand the
> reduction serially in the frontend and not create the llvm intrinsic at all?
Between @Il-Capitano and @RKSimon comments I think it makes the most sense to
do a sequential reduction in the frontend. Thats
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/120367
>From e46ef6592aec6a1a0b3f7509eb260bb1e9bda692 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Wed, 18 Dec 2024 01:44:42 -0500
Subject: [PATCH 1/3] [Clang] Add float type support to __builtin_reduce_add
and _
https://github.com/farzonl created
https://github.com/llvm/llvm-project/pull/121842
Fix Tablegen typo to indicate SPIRV and not HLSL
Fix miscellaneous test case typos.
>From 269b25fae5ea78c3c851bd041966d2eff4c01eb1 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Mon, 6 Jan 2025 16:45:14 -050
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/121611
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/121611
>From 7044e856bcd89de7318f7f4970c53beb0fc4 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Tue, 17 Dec 2024 18:30:23 -0500
Subject: [PATCH 1/3] [HLSL] Move length intrinsic to the header
---
clang/includ
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/121611
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
farzonl wrote:
> Thanks for the description. I would find some justification useful even if it
> just repeats the reasoning we've established for all such changes.
@pow2clk added a justification.
https://github.com/llvm/llvm-project/pull/121611
___
c
@@ -33,6 +41,21 @@ constexpr enable_if_t bit_cast(T
F) {
return __builtin_bit_cast(U, F);
}
+template
+constexpr enable_if_t::value || is_same::value, T>
+length_impl(T X) {
+ return __builtin_elementwise_abs(X);
+}
+
+template
+enable_if_t::value || is_same::value, T>
+
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/121842
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1297,27 +1297,16 @@ float4 lerp(float4, float4, float4);
///
/// Length is based on the following formula: sqrt(x[0]^2 + x[1]^2 + ...).
-_HLSL_16BIT_AVAILABILITY(shadermodel, 6.2)
-_HLSL_BUILTIN_ALIAS(__builtin_hlsl_length)
-half length(half);
-_HLSL_16BIT_AVAILABILITY(sha
@@ -1,73 +1,151 @@
-// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,NATIVE_HALF
-// RUN: %clang_cc1 -
@@ -1,32 +1,53 @@
-// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-half-type -disable-llvm-passes
-verify -verify-ignore-unexpected
-
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -fnative-h
https://github.com/farzonl created
https://github.com/llvm/llvm-project/pull/121598
- Update pr labeler so new SPIRV files get properly labeled.
- Add distance target builtin to BuiltinsSPIRV.td.
- Update TargetBuiltins.h to account for spirv builtins.
- Update clang basic CMakeLists.txt to buil
https://github.com/farzonl created
https://github.com/llvm/llvm-project/pull/121611
None
>From 2de0c4911dfbc67b9492eb4f13bcd162e79c3d37 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Tue, 17 Dec 2024 18:30:23 -0500
Subject: [PATCH 1/2] [HLSL] Move length intrinsic to the header
---
clang/
@@ -33,6 +41,23 @@ constexpr enable_if_t bit_cast(T
F) {
return __builtin_bit_cast(U, F);
}
+template
+constexpr enable_if_t::value || is_same::value, T>
+length_impl(T X) {
+ return __builtin_elementwise_abs(X);
+}
+
+template
+enable_if_t::value || is_same::value, T>
+
@@ -1,73 +1,151 @@
-// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
-// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
-// RUN: --check-prefixes=CHECK,NATIVE_HALF
-// RUN: %clang_cc1 -
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/121611
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/121611
>From 2de0c4911dfbc67b9492eb4f13bcd162e79c3d37 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Tue, 17 Dec 2024 18:30:23 -0500
Subject: [PATCH 1/2] [HLSL] Move length intrinsic to the header
---
clang/includ
@@ -20440,6 +20442,26 @@ Value *CodeGenFunction::EmitAMDGPUBuiltinExpr(unsigned
BuiltinID,
}
}
+Value *CodeGenFunction::EmitSPIRVBuiltinExpr(unsigned BuiltinID,
+ const CallExpr *E) {
+ switch (BuiltinID) {
+ case SPIRV::BI__bui
@@ -33,6 +41,23 @@ constexpr enable_if_t bit_cast(T
F) {
return __builtin_bit_cast(U, F);
}
+template
+constexpr enable_if_t::value || is_same::value, T>
+length_impl(T X) {
+ return __builtin_elementwise_abs(X);
+}
+
+template
+enable_if_t::value || is_same::value, T>
+
@@ -33,6 +41,21 @@ constexpr enable_if_t bit_cast(T
F) {
return __builtin_bit_cast(U, F);
}
+template
+constexpr enable_if_t::value || is_same::value, T>
+length_impl(T X) {
+ return __builtin_elementwise_abs(X);
+}
+
+template
+enable_if_t::value || is_same::value, T>
+
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/121611
___
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/121598
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/121598
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/121598
>From 74f86806bbdf1397973f70043ce0856bc6a4a4a7 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Fri, 3 Jan 2025 14:52:31 -0500
Subject: [PATCH 1/2] [SPIRV] Add Target Builtins using Distance ext as an
example
farzonl wrote:
@Endilll It looks like you are the code owner for
`/clang/include/clang/Sema/Sema.h` Are you happy with these changes?
https://github.com/llvm/llvm-project/pull/121598
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://list
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/120367
>From d72983f1666cc6952edd9a721a4f1dc2d1a5a8ed Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Wed, 18 Dec 2024 01:44:42 -0500
Subject: [PATCH 1/2] [Clang] Add float type support to __builtin_reduce_add
and _
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/120367
>From d72983f1666cc6952edd9a721a4f1dc2d1a5a8ed Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Wed, 18 Dec 2024 01:44:42 -0500
Subject: [PATCH 1/2] [Clang] Add float type support to __builtin_reduce_add
and _
@@ -4274,12 +4274,37 @@ RValue CodeGenFunction::EmitBuiltinExpr(const
GlobalDecl GD, unsigned BuiltinID,
*this, E, GetIntrinsicID(E->getArg(0)->getType()), "rdx.min"));
}
- case Builtin::BI__builtin_reduce_add:
+ case Builtin::BI__builtin_reduce_add: {
+// Not
farzonl wrote:
This PR has me thinking about a related problem.
In HLSL we have elementwise builtins like `__builtin_hlsl_elementwise_frac`.
We do not add the `CustomTypeChecking` attribute to these builtins. This puts
us down the variadic type check rules for scalar inputs to these builtins
@@ -2393,8 +2395,10 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
if (CheckVectorElementCallArgs(&SemaRef, TheCall))
return true;
if (SemaRef.BuiltinElementwiseTernaryMath(
-TheCall, /*CheckForFloatArgs*/
-
@@ -10623,7 +10623,7 @@ def err_second_argument_to_cwsc_not_pointer : Error<
"second argument to __builtin_call_with_static_chain must be of pointer
type">;
def err_vector_incorrect_num_elements : Error<
- "%select{too many|too few}0 elements in vector
%select{initializat
@@ -19105,6 +19105,51 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned
BuiltinID,
return nullptr;
switch (BuiltinID) {
+ case Builtin::BI__builtin_hlsl_adduint64: {
farzonl wrote:
So while HLSL does not support pointers we do have a concept of
@@ -10623,7 +10623,7 @@ def err_second_argument_to_cwsc_not_pointer : Error<
"second argument to __builtin_call_with_static_chain must be of pointer
type">;
def err_vector_incorrect_num_elements : Error<
- "%select{too many|too few}0 elements in vector
%select{initializat
@@ -19105,6 +19105,51 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned
BuiltinID,
return nullptr;
switch (BuiltinID) {
+ case Builtin::BI__builtin_hlsl_adduint64: {
farzonl wrote:
So the downside of what I suggested is that it would be a hybrid
https://github.com/farzonl deleted
https://github.com/llvm/llvm-project/pull/125319
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -12553,6 +12553,8 @@ def err_std_initializer_list_malformed : Error<
"%0 layout not recognized. Must be a non-polymorphic class type with no
bases and two fields: a 'const E *' and either another 'const E *' or a
'std::size_t'">;
// HLSL Diagnostics
+def err_hlsl_adduin
@@ -10623,7 +10623,7 @@ def err_second_argument_to_cwsc_not_pointer : Error<
"second argument to __builtin_call_with_static_chain must be of pointer
type">;
def err_vector_incorrect_num_elements : Error<
- "%select{too many|too few}0 elements in vector
%select{initializat
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/125319
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl created
https://github.com/llvm/llvm-project/pull/126758
- Disable `CXXOperatorNames` for HLSL
- Add tests to confirm we can use the alt names as functions
>From 3b7e458bfeb2abab799789d30ebaa4b214e4168e Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Tue, 11 Feb 20
farzonl wrote:
Is it ok to keep the tests as check-label? Tests are still passing with Label?
Or should this change to `// CHECK: FunctionDecl {{.*}} NAME void ()` Which is
how it seems other tests are setup.
https://github.com/llvm/llvm-project/pull/126758
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/126758
>From 3b7e458bfeb2abab799789d30ebaa4b214e4168e Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Tue, 11 Feb 2025 11:07:23 -0500
Subject: [PATCH 1/2] [HLSL] Change clang Driver Options to not set
CXXOperatorNam
@@ -0,0 +1,177 @@
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
UTC_ARGS: --version 5
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: -emit-llvm -O1 -o - | FileChe
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/126758
>From 3b7e458bfeb2abab799789d30ebaa4b214e4168e Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Tue, 11 Feb 2025 11:07:23 -0500
Subject: [PATCH 1/3] [HLSL] Change clang Driver Options to not set
CXXOperatorNam
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/126758
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -212,20 +230,24 @@ PreservedAnalyses ShaderFlagsAnalysisPrinter::run(Module
&M,
bool ShaderFlagsAnalysisWrapper::runOnModule(Module &M) {
DXILResourceTypeMap &DRTM =
getAnalysis().getResourceTypeMap();
+ const ModuleMetadataInfo MMDI =
+ getAnalysis().getModul
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/126813
___
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/126813
___
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/123977
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl approved this pull request.
https://github.com/llvm/llvm-project/pull/126813
___
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/123977
___
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/123977
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2064,6 +2064,9 @@ llvm::Value *CodeGenFunction::EmitToMemory(llvm::Value
*Value, QualType Ty) {
if (Ty->isExtVectorBoolType()) {
farzonl wrote:
you replaced a bunch of `isExtVectorBoolType()` with `isPackedVectorBoolType`.
We are only doing HLSL modif
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/123977
___
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/126813
___
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/123977
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2064,6 +2064,9 @@ llvm::Value *CodeGenFunction::EmitToMemory(llvm::Value
*Value, QualType Ty) {
if (Ty->isExtVectorBoolType()) {
farzonl wrote:
you replaced a bunch of `isExtVectorBoolType()` with `isPackedVectorBoolType`.
We are only doing HLSL modif
@@ -1754,6 +1755,17 @@ static bool interp__builtin_vector_reduce(InterpState
&S, CodePtr OpPC,
PrimType ElemT = *S.getContext().classify(ElemType);
unsigned NumElems = Arg.getNumElems();
+ if (ElemType->isRealFloatingType()) {
+if (ID != Builtin::BI__builtin_reduce_a
farzonl wrote:
@RKSimon It looks like you started this work with:
1. a23291b7db48670f7c57adcfb45877c826a97f22
2. 8a92c45e07dc81c83ca3afda3971d98c512429d4
If you have time could you take a look and let me know what you think?
https://github.com/llvm/llvm-project/pull/120367
___
@@ -6,7 +6,7 @@
// CHECK: %conv2 = fptrunc double %hlsl.dot to float
// CHECK: ret float %conv2
float builtin_bool_to_float_type_promotion ( float p0, bool p1 ) {
- return __builtin_hlsl_dot ( p0, p1 );
+ return __builtin_hlsl_dot ( (double)p0, (double)p1 );
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/120367
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl created
https://github.com/llvm/llvm-project/pull/120367
None
>From bcc2e3e36bd179047237da3ca495220a542dc742 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Wed, 18 Dec 2024 01:44:42 -0500
Subject: [PATCH] [Clang] Add float type support to __builtin_reduce_add and
@@ -30,22 +30,36 @@
#include
#include
+#define GENERATE_HLSL_INTRINSIC_FUNCTION_DEFAULT(FunctionName,
\
+ IntrinsicPostfix)
\
+ GENERATE_HLSL_INTRINSIC_FUNCTION(FunctionName, IntrinsicPostfix, 1,
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/117648
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1754,6 +1755,17 @@ static bool interp__builtin_vector_reduce(InterpState
&S, CodePtr OpPC,
PrimType ElemT = *S.getContext().classify(ElemType);
unsigned NumElems = Arg.getNumElems();
+ if (ElemType->isRealFloatingType()) {
+if (ID != Builtin::BI__builtin_reduce_a
@@ -1949,24 +1949,36 @@ bool SPIRVInstructionSelector::selectSign(Register
ResVReg,
return Result;
}
+bool SPIRVInstructionSelector::selectWaveOpInst(Register ResVReg,
+const SPIRVType *ResType,
+
@@ -853,6 +853,45 @@ float3 degrees(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_degrees)
float4 degrees(float4);
+//===--===//
+// distance builtins
+//===--
https://github.com/farzonl created
https://github.com/llvm/llvm-project/pull/117240
- For the HLSL intrinsic used `const inline` because that seems to be the
pattern `countbits`
- For the helper functions the pattern in `hlsl_detail.h` was to do `constexpr`
like with `bit_cast` and `enable_
@@ -871,6 +871,34 @@ float3 degrees(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_degrees)
float4 degrees(float4);
+//===--===//
+// distance builtins
+//===--
farzonl wrote:
@llvm-beanz I'm really confused what is going on here
The length test case passes in the github action:
https://github.com/llvm/llvm-project/actions/runs/12699150463?pr=122337
It passes locally on:
1. MacOS Intel (Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz)
2. MacOS Apple M3 Max
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/122337
>From a7323e97f09db476e622bee9800e1b3e15441beb Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Thu, 9 Jan 2025 13:11:52 -0500
Subject: [PATCH 1/2] [HLSL] Move length support out of the DirectX Backend
(#1216
@@ -871,6 +871,34 @@ float3 degrees(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_degrees)
float4 degrees(float4);
+//===--===//
+// distance builtins
+//===--
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/122357
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/122357
>From 88e0035ca1c5b326a1579bc777c926c3c48c5c89 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Thu, 9 Jan 2025 14:55:40 -0500
Subject: [PATCH] [HLSL] Implement the HLSL distance intrinsic - Hook of SPIRV
buil
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/122357
___
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/122357
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -871,6 +871,34 @@ float3 degrees(float3);
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_elementwise_degrees)
float4 degrees(float4);
+//===--===//
+// distance builtins
+//===--
@@ -253,12 +257,229 @@ static void validatePackoffset(Sema &S, HLSLBufferDecl
*BufDecl) {
}
}
+// Returns true if the array has a zero size = if any of the dimensions is 0
+static bool isZeroSizedArray(const ConstantArrayType *CAT) {
+ while (CAT && !CAT->isZeroSize())
+
@@ -253,12 +257,229 @@ static void validatePackoffset(Sema &S, HLSLBufferDecl
*BufDecl) {
}
}
+// Returns true if the array has a zero size = if any of the dimensions is 0
+static bool isZeroSizedArray(const ConstantArrayType *CAT) {
+ while (CAT && !CAT->isZeroSize())
+
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/122820
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -253,12 +257,229 @@ static void validatePackoffset(Sema &S, HLSLBufferDecl
*BufDecl) {
}
}
+// Returns true if the array has a zero size = if any of the dimensions is 0
+static bool isZeroSizedArray(const ConstantArrayType *CAT) {
+ while (CAT && !CAT->isZeroSize())
+
farzonl wrote:
@inbelic look into lit `UNSUPPORTED` or `REQUIRES:` There is likely one or a
combination of both we can do to avoid the asan tests.
https://github.com/llvm/llvm-project/pull/123853
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -34,6 +34,7 @@
#include "llvm/IR/IntrinsicsSPIRV.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/raw_ostream.h"
farzonl wrote:
Not sure why you need an include your changes to `selectExtInst` are the same
@@ -3030,6 +3031,15 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register
ResVReg,
return selectExtInst(ResVReg, ResType, I, CL::fract, GL::Fract);
case Intrinsic::spv_normalize:
return selectExtInst(ResVReg, ResType, I, CL::normalize, GL::Normalize);
+ case In
@@ -3030,6 +3039,8 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register
ResVReg,
return selectExtInst(ResVReg, ResType, I, CL::fract, GL::Fract);
case Intrinsic::spv_normalize:
return selectExtInst(ResVReg, ResType, I, CL::normalize, GL::Normalize);
+ case Int
https://github.com/farzonl approved this pull request.
LGTM, but I want to see the `[[maybe_unused]]` and the `#include
"llvm/Support/raw_ostream.h"` removed before you merge.
https://github.com/llvm/llvm-project/pull/122992
___
cfe-commits mailing li
@@ -253,12 +257,229 @@ static void validatePackoffset(Sema &S, HLSLBufferDecl
*BufDecl) {
}
}
+// Returns true if the array has a zero size = if any of the dimensions is 0
+static bool isZeroSizedArray(const ConstantArrayType *CAT) {
+ while (CAT && !CAT->isZeroSize())
+
farzonl wrote:
> Will a follow-up issue be created to move the useful `Sema` helpers into a
> common file?
I'm fine if you want to do this as a follow up.
https://github.com/llvm/llvm-project/pull/122992
___
cfe-commits mailing list
cfe-commits@list
farzonl wrote:
> This pr LGTM once the graceful exit comment is handled.
>
> With respect to [this
> comment](https://github.com/llvm/llvm-project/pull/122992#discussion_r1917127000).
> Is the final solution to just gracefully exit or is this an intermediate
> step and an issue will be used t
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/122772
___
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/122992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,22 @@
+; RUN: not llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s
-o /dev/null 2>&1 | FileCheck %s
+; RUN: not llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s
-o /dev/null 2>&1 | FileCheck %s
+; RUN: not %if spirv-tools %{ llc -O0 -
https://github.com/farzonl edited
https://github.com/llvm/llvm-project/pull/122992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,22 @@
+; RUN: not llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s
-o /dev/null 2>&1 | FileCheck %s
+; RUN: not llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s
-o /dev/null 2>&1 | FileCheck %s
+; RUN: not %if spirv-tools %{ llc -O0 -
@@ -3030,6 +3031,15 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register
ResVReg,
return selectExtInst(ResVReg, ResType, I, CL::fract, GL::Fract);
case Intrinsic::spv_normalize:
return selectExtInst(ResVReg, ResType, I, CL::normalize, GL::Normalize);
+ case In
@@ -0,0 +1,32 @@
+// 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
farzonl wrote:
The clang codgen tests should be suf
https://github.com/farzonl closed
https://github.com/llvm/llvm-project/pull/122839
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/farzonl updated
https://github.com/llvm/llvm-project/pull/122839
>From fb1c27ea34d42b9c141fe9a2d1a5ad8584dfa0a0 Mon Sep 17 00:00:00 2001
From: Farzon Lotfi
Date: Thu, 9 Jan 2025 19:19:27 -0500
Subject: [PATCH 1/7] [SPIRV] add pre legalization instruction combine - Add
the bo
farzonl wrote:
redundant is not the right word here. Irrelevant or not necessary makes more
sense in this context.
https://github.com/llvm/llvm-project/pull/123853
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin
https://github.com/farzonl approved this pull request.
I'm only reviewing commit def10ad82c6e527ba5c3aa29b76041dc94acff1d
The reasoning for the change\fix makes sense. Although I don't like the commit
message. You don't need to amend the commit, but use the github ui to fix up
the commit mess
901 - 1000 of 1332 matches
Mail list logo