@@ -5178,6 +5179,29 @@ class HLSLBufferDecl final : public NamedDecl, public
DeclContext {
friend class ASTDeclWriter;
};
+class HLSLRootSignatureDecl final : public NamedDecl {
+ ArrayRef RootElements;
llvm-beanz wrote:
This should probably be a `Trailin
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/137690
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz commented:
A few comments, but I think this is mostly the right direction.
https://github.com/llvm/llvm-project/pull/137690
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/lis
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/135830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/135909
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -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
https://github.com/llvm-beanz approved this pull request.
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/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/133508
>From 6234f442adfebaaf73328d2c09ee443facc848b0 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Thu, 27 Mar 2025 09:26:31 -0500
Subject: [PATCH 1/6] [HLSL] Handle incomplete array types
This refactors the
https://github.com/llvm-beanz closed
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/llvm-beanz created
https://github.com/llvm/llvm-project/pull/135830
The address space of a source value for an implicit cast isn't really relevant
when emitting conversion warnings. Since the lvalue->rvalue cast effectively
removes the address space they don't factor in, but
@@ -11360,6 +11360,14 @@ static void AnalyzeAssignment(Sema &S, BinaryOperator
*E) {
static void DiagnoseImpCast(Sema &S, Expr *E, QualType SourceType, QualType T,
SourceLocation CContext, unsigned diag,
bool pruneControl
@@ -11360,6 +11360,14 @@ static void AnalyzeAssignment(Sema &S, BinaryOperator
*E) {
static void DiagnoseImpCast(Sema &S, Expr *E, QualType SourceType, QualType T,
SourceLocation CContext, unsigned diag,
bool pruneControl
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/136234
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,28 @@
+//===- hlsl_spirv.h - HLSL definitions for SPIR-V target
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -6330,6 +6331,140 @@ class HLSLAttributedResourceType : public Type, public
llvm::FoldingSetNode {
findHandleTypeOnResource(const Type *RT);
};
+/// Instances of this class represent operands to a SPIR-V type instruction.
+class SpirvOperand {
+public:
+ enum SpirvOpera
@@ -3332,6 +3388,39 @@ checkBuiltinTemplateIdType(Sema &SemaRef,
BuiltinTemplateDecl *BTD,
}
return HasNoTypeMember;
}
+
+ case BTK__hlsl_spirv_type: {
+assert(Converted.size() == 4);
+
+if (!Context.getTargetInfo().getTriple().isSPIRV()) {
+ SemaRef.Di
@@ -3332,6 +3388,39 @@ checkBuiltinTemplateIdType(Sema &SemaRef,
BuiltinTemplateDecl *BTD,
}
return HasNoTypeMember;
}
+
+ case BTK__hlsl_spirv_type: {
+assert(Converted.size() == 4);
+
+if (!Context.getTargetInfo().getTriple().isSPIRV()) {
+ SemaRef.Di
@@ -3228,6 +3228,62 @@ static QualType builtinCommonTypeImpl(Sema &S,
TemplateName BaseTemplate,
}
}
+static bool isInVkNamespace(const RecordType *RT) {
+ DeclContext *DC = RT->getDecl()->getDeclContext();
+ if (!DC)
+return false;
+
+ NamespaceDecl *ND = dyn_cast(D
llvm-beanz wrote:
Please move to SemaHLSL.
https://github.com/llvm/llvm-project/pull/134034
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN: dxil-pc-shadermodel6.0-compute %s \
+// RUN: -fsyntax-only -verify
+
+typedef vk::SpirvType<12, 2, 4, float> InvalidType1; // expected-error {{use
of undeclared identifier 'vk'}}
+vk::Li
@@ -6330,6 +6331,140 @@ class HLSLAttributedResourceType : public Type, public
llvm::FoldingSetNode {
findHandleTypeOnResource(const Type *RT);
};
+/// Instances of this class represent operands to a SPIR-V type instruction.
+class SpirvOperand {
+public:
+ enum SpirvOpera
@@ -877,6 +878,11 @@ bool CodeGenTypes::isZeroInitializable(QualType T) {
if (const MemberPointerType *MPT = T->getAs())
return getCXXABI().isZeroInitializable(MPT);
+ // HLSL Inline SPIR-V types are non-zero-initializable.
+ if (T->getAs()) {
+return false;
+ }
-
@@ -3228,6 +3228,62 @@ static QualType builtinCommonTypeImpl(Sema &S,
TemplateName BaseTemplate,
}
}
+static bool isInVkNamespace(const RecordType *RT) {
+ DeclContext *DC = RT->getDecl()->getDeclContext();
+ if (!DC)
+return false;
+
+ NamespaceDecl *ND = dyn_cast(D
@@ -5444,6 +5459,31 @@ QualType ASTContext::getHLSLAttributedResourceType(
return QualType(Ty, 0);
}
+
+QualType ASTContext::getHLSLInlineSpirvType(uint32_t Opcode, uint32_t Size,
+uint32_t Alignment,
+
https://github.com/llvm-beanz commented:
A few substantive comments, but mostly coding standard nits.
https://github.com/llvm/llvm-project/pull/134034
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
@@ -369,14 +369,102 @@ llvm::Type
*CommonSPIRTargetCodeGenInfo::getOpenCLType(CodeGenModule &CGM,
return nullptr;
}
+// Gets a spirv.IntegralConstant or spirv.Literal. If IntegralType is present,
+// returns an IntegralConstant, otherwise returns a Literal.
+static llvm::Ty
@@ -6330,6 +6331,140 @@ class HLSLAttributedResourceType : public Type, public
llvm::FoldingSetNode {
findHandleTypeOnResource(const Type *RT);
};
+/// Instances of this class represent operands to a SPIR-V type instruction.
+class SpirvOperand {
+public:
+ enum SpirvOpera
llvm-beanz wrote:
Cool... cool... This is fine, but it looks like #130910 rewrote the line
endings on some test files to CRLF.
@hekota might be worth checking your editor settings and cleaning up the test
files to avoid every edit rewriting every line of the
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/134034
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -6165,6 +6254,18 @@ bool
UnnamedLocalNoLinkageFinder::VisitHLSLAttributedResourceType(
return Visit(T->getWrappedType());
}
+bool UnnamedLocalNoLinkageFinder::VisitHLSLInlineSpirvType(
+const HLSLInlineSpirvType *T) {
+ for (auto &Operand : T->getOperands()) {
+
@@ -2245,6 +2245,36 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
llvm-beanz wrote:
For this issue I think there is a clear path forward to use the utilities that
the `__builtin_hlsl_select` builtin uses to validate its arguments. I've filed
https://github.com/llvm/llvm-project/issues/127512 to revisit all the other
builtins that are using the pattern which
@@ -6585,6 +6585,18 @@ void InitializationSequence::InitializeFrom(Sema &S,
}
}
+if (S.getLangOpts().HLSL && Initializer && isa(DestAT))
{
llvm-beanz wrote:
Looking at this a bit. `canPerformArrayCopy` fails in cases that would
otherwise be va
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/127557
>From 54ba5ffea82a9613fd343750ec36242e1494f5e4 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Mon, 17 Feb 2025 20:41:18 -0600
Subject: [PATCH 1/2] [HLSL] Allow arrays to copy-initialize
This change allo
@@ -94,6 +94,11 @@ bool Qualifiers::isTargetAddressSpaceSupersetOf(LangAS A,
LangAS B,
(A == LangAS::Default &&
(B == LangAS::cuda_constant || B == LangAS::cuda_device ||
B == LangAS::cuda_shared)) ||
+ // In HLSL, the this pointer for mem
@@ -12411,16 +12411,13 @@ def err_builtin_is_within_lifetime_invalid_arg :
Error<
"%select{non-|function }0pointer argument to '__builtin_is_within_lifetime' "
"is not allowed">;
-def err_builtin_invalid_arg_type: Error <
- "%ordinal0 argument must be "
- "%select{a vec
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/127557
This change allows array variables to copy-initialize from other arrays. It
also corrects a small error in HLSL C-Style casting that did not error on
casting to arrays if elementwise and splat conversions fa
@@ -2245,6 +2245,36 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
@@ -2245,6 +2245,36 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
@@ -2245,6 +2245,36 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
@@ -2245,6 +2245,36 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
@@ -2245,6 +2245,36 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/121515
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/130173
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/129396
>From 7620f9fac9932a13f1da0468b02c1aeceb212a0b Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Wed, 19 Feb 2025 17:18:20 -0600
Subject: [PATCH 1/3] [HLSL] select scalar overloads for vector conditions
Th
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/129396
>From 999c9253dc69c43f2d5d686bb4e9a9fd2f8783d4 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Wed, 19 Feb 2025 17:18:20 -0600
Subject: [PATCH 1/2] [HLSL] select scalar overloads for vector conditions
Th
@@ -0,0 +1,71 @@
+//===- hlsl_intrinsic_helpers.h - HLSL helpers intrinsics
-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -4790,7 +4790,7 @@ def HLSLPackOffset: HLSLAnnotationAttr {
}
def HLSLSV_DispatchThreadID: HLSLAnnotationAttr {
- let Spellings = [HLSLAnnotation<"SV_DispatchThreadID">];
+ let Spellings = [HLSLAnnotation<"sv_dispatchthreadid">];
llvm-beanz wrote:
Can we
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/130436
This updates the DXV and Metal Converter actions to properly use temporary
files created by the driver. I've abstracted away a check to determine if an
action is the last in the sequence because we may have
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/129396
>From 7620f9fac9932a13f1da0468b02c1aeceb212a0b Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Wed, 19 Feb 2025 17:18:20 -0600
Subject: [PATCH 1/6] [HLSL] select scalar overloads for vector conditions
Th
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/129396
>From 7620f9fac9932a13f1da0468b02c1aeceb212a0b Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Wed, 19 Feb 2025 17:18:20 -0600
Subject: [PATCH 1/5] [HLSL] select scalar overloads for vector conditions
Th
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/129396
>From 7620f9fac9932a13f1da0468b02c1aeceb212a0b Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Wed, 19 Feb 2025 17:18:20 -0600
Subject: [PATCH 1/4] [HLSL] select scalar overloads for vector conditions
Th
@@ -1817,5 +1817,9 @@ def ext_hlsl_access_specifiers : ExtWarn<
InGroup;
def err_hlsl_unsupported_component : Error<"invalid component '%0' used;
expected 'x', 'y', 'z', or 'w'">;
def err_hlsl_packoffset_invalid_reg : Error<"invalid resource class specifier
'%0' for packoff
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/127346
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/130173
This adds a flag to the DXC driver to enable calling the metal shader converter
if it is available to convert the final shader output for metal.
>From 0e5a24665c3a9522263b2ddfbce5f46e6a0e33c9 Mon Sep 17 00:0
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/130436
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Nathan =?utf-8?q?Gauër?=
Message-ID:
In-Reply-To:
llvm-beanz wrote:
Is there a reason we can't do this in Sema? It would probably be ideal to have
the AST represent the address spaces of values accurately.
https://github.com/llvm/llvm-project/pull/122103
_
llvm-beanz wrote:
> > nit: is there a way to check that the spelling is consistent in the error
> > messages? Asking since I am no familiar with this part of the code.
>
> I'm not sure I understand what you mean.
I think the point (and my earlier comment) is to use the spelling as it is
writt
@@ -14017,6 +14017,24 @@ void Sema::CheckCastAlign(Expr *Op, QualType T,
SourceRange TRange) {
<< TRange << Op->getSourceRange();
}
+void Sema::CheckVectorAccess(const Expr *BaseExpr, const Expr *IndexExpr) {
+ const VectorType *VTy = BaseExpr->getType()->getAs();
+ if
@@ -10635,6 +10635,12 @@ def err_block_on_vm : Error<
def err_sizeless_nonlocal : Error<
"non-local variable with sizeless type %0">;
+def err_vector_index_out_of_range : Error<
+ "vector element index %0 is out of bounds">;
+def warn_vector_index_out_of_range : Warning<
+
@@ -0,0 +1,417 @@
+#include "clang/Parse/ParseHLSLRootSignature.h"
llvm-beanz wrote:
This is the file with the missing license header that @bob80905 pointed out.
https://github.com/llvm/llvm-project/pull/122982
___
cfe
@@ -0,0 +1,375 @@
+//=== ParseHLSLRootSignatureTest.cpp - Parse Root Signature tests
-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
llvm-beanz wro
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/129396
This PR adds scalar/vector overloads for vector conditions to the `select`
builtin, and updates the sema checking and codegen to allow scalars to extend
to vectors.
Fixes #126570
>From 999c9253dc69c43f2d5d
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/129773
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14017,6 +14017,24 @@ void Sema::CheckCastAlign(Expr *Op, QualType T,
SourceRange TRange) {
<< TRange << Op->getSourceRange();
}
+void Sema::CheckVectorAccess(const Expr *BaseExpr, const Expr *IndexExpr) {
+ const VectorType *VTy = BaseExpr->getType()->getAs();
+ if
https://github.com/llvm-beanz approved this pull request.
One small formatting cleanup in a suggestion. LGTM.
https://github.com/llvm/llvm-project/pull/122981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
@@ -0,0 +1,124 @@
+//===--- HLSLRootSignature.def - Tokens and Enum Database ---*- C++
-*-===//
+
+//
llvm-beanz wrote:
nit:
```suggestion
//
```
https://github.com/llvm/llvm-project/pull/122981
___
cfe-commits ma
@@ -4931,7 +4931,9 @@ static TypeSourceInfo
*GetFullTypeForDeclarator(TypeProcessingState &state,
// C99 6.7.5.3p1: The return type may not be a function or array type.
// For conversion functions, we'll diagnose this particular error later.
- if (!D.isInvali
@@ -2527,7 +2527,7 @@ QualType Sema::BuildMatrixType(QualType ElementTy, Expr
*NumRows, Expr *NumCols,
}
bool Sema::CheckFunctionReturnType(QualType T, SourceLocation Loc) {
- if (T->isArrayType() || T->isFunctionType()) {
+ if ((!getLangOpts().HLSL && T->isArrayType()) ||
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/122981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,89 @@
+//===--- ParseHLSLRootSignature.h ---*- C++
-*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/llvm-beanz commented:
My last real question here is whether this belongs in clang/Parse or if it
should be in clang/Lex. Since it is now strictly Lexing it shouldn't have any
dependencies on the parse or AST libraries right?
https://github.com/llvm/llvm-project/pull/122981
_
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/122981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/118992
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/106860
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,194 @@
+#include "clang/Parse/ParseHLSLRootSignature.h"
+
+namespace clang {
+namespace hlsl {
+
+// Lexer Definitions
+
+static bool IsNumberChar(char C) {
+ // TODO(#126565): extend for float support exponents
+ return isdigit(C); // integer support
+}
+
+bool RootS
@@ -2245,6 +2245,36 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
@@ -2245,6 +2245,36 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
https://github.com/llvm-beanz edited
https://github.com/llvm/llvm-project/pull/127098
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2245,6 +2245,36 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned
BuiltinID, CallExpr *TheCall) {
break;
}
+ case Builtin::BI__builtin_hlsl_and: {
+if (SemaRef.checkArgCount(TheCall, 2))
+ return true;
+if (CheckVectorElementCallArgs(&SemaRef, TheCal
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - -Wstack-exhausted
llvm-beanz wrote:
What if rather than removing the test we just add a `REQUIRES: slow_tests`
line, and have a CMake option to enable the "slow_tests" feature?
That would be a really small
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/128257
This seems silly, but DXC supports unsigned integer versions of abs that are
just no-ops. This adds the overloads for source compatability because
apparently users actually use them...
Fixes #128249
>From
https://github.com/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/128246
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/128250
We do handle EmptyDecls in codegen already as of #124886, but we were blocking
them in Sema. EmptyDecls tend to be caused by extra semicolons which are not
illegal.
Fixes #128238
>From 98d8a84c508d743cb366
https://github.com/llvm-beanz approved this pull request.
Looks reasonable to me, sorry for the review delay.
https://github.com/llvm/llvm-project/pull/121515
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
@@ -2803,6 +2803,10 @@ class ASTContext : public RefCountedBase {
return getUnqualifiedArrayType(T, Quals);
}
+ // Determine whether an array is a valid return type
+ // Array is a valid return type for HLSL
+ bool isReturnableArrayType() const { return getLangOpts().
@@ -20760,7 +20761,8 @@ ExprResult
RebuildUnknownAnyExpr::VisitCallExpr(CallExpr *E) {
ExprResult RebuildUnknownAnyExpr::VisitObjCMessageExpr(ObjCMessageExpr *E) {
// Verify that this is a legal result type of a call.
- if (DestType->isArrayType() || DestType->isFunctionTy
@@ -2803,6 +2803,10 @@ class ASTContext : public RefCountedBase {
return getUnqualifiedArrayType(T, Quals);
}
+ // Determine whether an array is a valid return type
+ // Array is a valid return type for HLSL
+ bool isReturnableArrayType() const { return getLangOpts().
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/128047
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz approved this pull request.
Looks reasonable
https://github.com/llvm/llvm-project/pull/127896
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/llvm-beanz created
https://github.com/llvm/llvm-project/pull/128894
If you have zlib (not standard) on Windows, this test runs, and it was missing
a match for the file extension on lld.
>From da4f0de19daaed0a30b3dfe985e6920e89a07c7d Mon Sep 17 00:00:00 2001
From: Chris B
Da
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/128250
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -94,3 +122,60 @@ double3 test_abs_double3(double3 p0) { return abs(p0); }
// CHECK-LABEL: define noundef nofpclass(nan inf) <4 x double>
@_Z16test_abs_double4
// CHECK: call reassoc nnan ninf nsz arcp afn <4 x double> @llvm.fabs.v4f64(
double4 test_abs_double4(double4 p0) {
https://github.com/llvm-beanz closed
https://github.com/llvm/llvm-project/pull/128257
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14017,6 +14017,24 @@ void Sema::CheckCastAlign(Expr *Op, QualType T,
SourceRange TRange) {
<< TRange << Op->getSourceRange();
}
+void Sema::CheckVectorAccess(const Expr *BaseExpr, const Expr *IndexExpr) {
+ const VectorType *VTy = BaseExpr->getType()->getAs();
+ if
https://github.com/llvm-beanz updated
https://github.com/llvm/llvm-project/pull/133508
>From 6234f442adfebaaf73328d2c09ee443facc848b0 Mon Sep 17 00:00:00 2001
From: Chris Bieneman
Date: Thu, 27 Mar 2025 09:26:31 -0500
Subject: [PATCH 1/4] [HLSL] Handle incomplete array types
This refactors the
https://github.com/llvm-beanz approved this pull request.
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/llvm-beanz approved this pull request.
https://github.com/llvm/llvm-project/pull/140627
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
901 - 998 of 998 matches
Mail list logo