https://github.com/pow2clk 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
@@ -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>
+
pow2clk 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.
https://github.com/llvm/llvm-project/pull/121611
___
cfe-commits mailing list
cfe-commits@l
@@ -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
@@ -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 -
https://github.com/pow2clk commented:
I think we require descriptions and not just titles.
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-com
pow2clk wrote:
Will this go in with no description?
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/pow2clk approved this pull request.
Thanks for the fixups!
https://github.com/llvm/llvm-project/pull/115902
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,17 @@
+; 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 %}
+
+; CHECK: %[[#bool:]] = OpTypeBool
+; CHECK: %[[#uint:]] = OpType
@@ -0,0 +1,17 @@
+; 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 %}
+
+; CHECK: %[[#bool:]] = OpTypeBool
+; CHECK: %[[#uint:]] = OpType
@@ -1995,7 +2014,7 @@ bool
SPIRVInstructionSelector::selectWaveReadLaneAt(Register ResVReg,
TII.get(SPIRV::OpGroupNonUniformShuffle))
.addDef(ResVReg)
.addUse(GR.getSPIRVTypeID(ResType))
- .addUse(GR.getOrCreateConstInt(3, I, IntTy, TII))
+
@@ -1949,6 +1952,22 @@ bool SPIRVInstructionSelector::selectSign(Register
ResVReg,
return Result;
}
+bool SPIRVInstructionSelector::selectWaveActiveAnyTrue(Register ResVReg,
+ const SPIRVType
*ResType,
+
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -finclude-default-header -fnative-half-type -triple \
+// RUN: dxil-pc-shadermodel6.3-compute %s -emit-llvm -disable-llvm-passes -o
- | \
+// RUN: FileCheck %s --check-prefixes=CHECK,CHECK-DXIL
+// RUN: %clang_cc1 -finclude-default-header
@@ -1880,6 +1880,31 @@ static bool CheckVectorSelect(Sema *S, CallExpr
*TheCall) {
return false;
}
+static bool CheckResourceHandle(Sema *S, CallExpr *TheCall, unsigned ArgIndex)
{
+ assert(TheCall->getNumArgs() >= ArgIndex);
+ QualType ArgType = TheCall->getArg(ArgIndex
https://github.com/pow2clk approved this pull request.
Thanks for indulging me!
https://github.com/llvm/llvm-project/pull/113643
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -271,53 +246,70 @@ struct BuiltinTypeDeclBuilder {
return *this;
}
+ FieldDecl *getResourceHandleField() {
+FieldDecl *FD = Fields["h"];
+assert(FD && FD->getType()->isHLSLAttributedResourceType() &&
+ "record does not have resource handle");
+r
@@ -271,53 +246,70 @@ struct BuiltinTypeDeclBuilder {
return *this;
}
+ FieldDecl *getResourceHandleField() {
+FieldDecl *FD = Fields["h"];
+assert(FD && FD->getType()->isHLSLAttributedResourceType() &&
+ "record does not have resource handle");
+r
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.6-library %s -emit-llvm-only -disable-llvm-passes -verify
+
+using handle_t = __hlsl_resource_t [[hlsl::resource_class(UAV)]]
[[hlsl::contained_type(int)]];
+
+void test_args(int x, bool b
@@ -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);
@@ -35,6 +35,9 @@ def int_dx_typedBufferLoad_checkbit
def int_dx_typedBufferStore
: DefaultAttrsIntrinsic<[], [llvm_any_ty, llvm_i32_ty, llvm_anyvector_ty]>;
+def int_dx_bufferUpdateCounter
+: DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_any_ty, llvm_i32_ty],
[IntrWrite
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/114148
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,771 @@
+//===--- HLSLExternalSemaSource.cpp - HLSL Sema Source
===//
pow2clk wrote:
I don't think this file should be here.
https://github.com/llvm/llvm-project/pull/114148
___
cfe-commi
@@ -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, Const];
po
https://github.com/pow2clk commented:
#113648 is merged. Should probably update the description as I think the
corresponding inclusion of ROV buffers went in too.
I haven't finished my review, but I thought I'd get these two points in quickly.
https://github.com/llvm/llvm-project/pull/114148
_
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/113643
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/pow2clk commented:
Looks good overall. I am worried about that typedbuffer enum though. Perhaps it
doesn't have much impact as of yet, but perhaps we need to change some
conditionals to accept structuredbuffer enums where appropriate.
https://github.com/llvm/llvm-project/pul
@@ -530,6 +530,28 @@ void
HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() {
.addArraySubscriptOperators()
.completeDefinition();
});
+
+ Decl =
+ BuiltinTypeDeclBuilder(*SemaPtr, HLSLNamespace, "AppendStructuredBuffer")
+ .addS
@@ -0,0 +1,50 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump
-DEMPTY %s | FileCheck -check-prefix=EMPTY %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump %s
| FileCheck %s
+
+
+// This test tests two different AST ge
@@ -0,0 +1,65 @@
+; RUN: llc -O0 -mtriple=spirv1.5-unknown-unknown %s -o - | FileCheck %s
--check-prefixes=CHECK,CHECK-EXP
+; RUN: llc -O0 -mtriple=spirv1.6-unknown-unknown %s -o - | FileCheck %s
--check-prefixes=CHECK,CHECK-DOT
+; RUN: llc -O0 -mtriple=spirv-unknown-unknown
-s
https://github.com/pow2clk commented:
A nitpick, a comment, and a question.
https://github.com/llvm/llvm-project/pull/115068
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,18 @@
+
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN: dxil-pc-shadermodel6.3-compute %s -emit-llvm -disable-llvm-passes -o
- | \
+// RUN: FileCheck %s -DTARGET=dx
+// RUN: %clang_cc1 -finclude-default-header -triple \
+// RUN: spirv-pc-vulkan-co
@@ -942,7 +942,13 @@ uint64_t dot(uint64_t4, uint64_t4);
_HLSL_AVAILABILITY(shadermodel, 6.4)
_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot4add_i8packed)
-int dot4add_i8packed(unsigned int, unsigned int, int);
+int dot4add_i8packed(uint, uint, int);
pow2clk wrote:
I
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/115068
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -852,34 +852,51 @@ void TypePrinter::printExtVectorAfter(const ExtVectorType
*T, raw_ostream &OS) {
void TypePrinter::printConstantMatrixBefore(const ConstantMatrixType *T,
raw_ostream &OS) {
+ if (Policy.UseHLSLTypes)
+OS <
@@ -1,7 +1,5 @@
// RUN: %clang_cc1 -O0 -fenable-matrix -triple x86_64-apple-darwin %s
-emit-llvm -disable-llvm-passes -o - -std=c++11 | FileCheck
--check-prefixes=CHECK,NOOPT %s
// RUN: %clang_cc1 -O1 -fenable-matrix -triple x86_64-apple-darwin %s
-emit-llvm -disable-llvm-pas
@@ -17,12 +17,12 @@ void add(sx10x10_t a, sx5x10_t b, sx10x5_t c) {
// expected-error@-1 {{assigning to 'sx10x10_t' (aka 'float
__attribute__((matrix_type(10, 10)))') from incompatible type 'sx5x10_t' (aka
'float __attribute__((matrix_type(5, 10)))')}}
a = b + &c;
- //
@@ -2527,6 +2640,11 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register
ResVReg,
case Intrinsic::spv_udot:
case Intrinsic::spv_sdot:
return selectIntegerDot(ResVReg, ResType, I);
+ case Intrinsic::spv_dot4add_i8packed:
+if (STI.canUseExtension(SPIRV::Extens
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -triple \
pow2clk wrote:
202x is the default. Is there a reason this requires 2021?
https://github.com/llvm/llvm-project/pull/113623
___
cfe-c
https://github.com/pow2clk approved this pull request.
Looks good! I learned a couple things about SPIR-V by verifying this.
Just one quibble about the language version and a suggested followup.
https://github.com/llvm/llvm-project/pull/113623
___
cf
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/113623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/113382
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1762,6 +1765,36 @@ bool SPIRVInstructionSelector::selectSign(Register
ResVReg,
return Result;
}
+bool SPIRVInstructionSelector::selectWaveActiveCountBits(
+Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const {
+ assert(I.getNumOperands() == 3);
+ as
@@ -1762,6 +1765,36 @@ bool SPIRVInstructionSelector::selectSign(Register
ResVReg,
return Result;
}
+bool SPIRVInstructionSelector::selectWaveActiveCountBits(
+Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const {
+ assert(I.getNumOperands() == 3);
+ as
@@ -820,3 +820,12 @@ def WaveGetLaneIndex : DXILOp<111, waveGetLaneIndex> {
let stages = [Stages];
let attributes = [Attributes];
}
+
+def WaveAllBitCount : DXILOp<135, waveAllOp> {
pow2clk wrote:
Initially, I thought this couldn't be right since the latte
https://github.com/pow2clk commented:
Looks good! The only change I think is essential is the missing
`constrainAllUses`
https://github.com/llvm/llvm-project/pull/113382
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cg
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -triple \
+// RUN: dxil-pc-shadermodel6.3-compute %s -emit-llvm -disable-llvm-passes -o
- | \
+// RUN: FileCheck %s --check-prefixes=CHECK,CHECK-DXIL
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-defaul
@@ -356,6 +426,9 @@ struct TemplateParameterListBuilder {
QualType T = Builder.Template->getInjectedClassNameSpecialization();
T = S.Context.getInjectedClassNameType(Builder.Record, T);
+ArrayRef TempArgs =
+Builder.Template->getInjectedTemplateArgs();
https://github.com/pow2clk closed
https://github.com/llvm/llvm-project/pull/106146
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/pow2clk updated
https://github.com/llvm/llvm-project/pull/106146
>From 40224473a7b43bc4ffe2024ab51196c2130bedc7 Mon Sep 17 00:00:00 2001
From: Greg Roth
Date: Sun, 25 Aug 2024 12:00:03 -0600
Subject: [PATCH 1/7] [DirectX] Remove trivially dead functions at linkage
finalize
https://github.com/pow2clk updated
https://github.com/llvm/llvm-project/pull/106146
>From 40224473a7b43bc4ffe2024ab51196c2130bedc7 Mon Sep 17 00:00:00 2001
From: Greg Roth
Date: Sun, 25 Aug 2024 12:00:03 -0600
Subject: [PATCH 1/6] [DirectX] Remove trivially dead functions at linkage
finalize
https://github.com/pow2clk updated
https://github.com/llvm/llvm-project/pull/106146
>From 40224473a7b43bc4ffe2024ab51196c2130bedc7 Mon Sep 17 00:00:00 2001
From: Greg Roth
Date: Sun, 25 Aug 2024 12:00:03 -0600
Subject: [PATCH 1/6] [DirectX] Remove trivially dead functions at linkage
finalize
@@ -0,0 +1,222 @@
+; RUN: opt -S -dxil-finalize-linkage
-mtriple=dxil-unknown-shadermodel6.5-compute %s | FileCheck %s
+; RUN: llc %s --filetype=asm -o - | FileCheck %s
pow2clk wrote:
Yes, and this test expects them to. The exported functions start at line 137
@@ -1381,7 +1381,7 @@ void ASTContext::InitBuiltinTypes(const TargetInfo
&Target,
if (LangOpts.OpenACC && !LangOpts.OpenMP) {
InitBuiltinType(ArraySectionTy, BuiltinType::ArraySection);
}
- if (LangOpts.MatrixTypes)
+ if (LangOpts.MatrixTypes || LangOpts.HLSL)
--
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/111415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -17,12 +17,12 @@ void add(sx10x10_t a, sx5x10_t b, sx10x5_t c) {
// expected-error@-1 {{assigning to 'sx10x10_t' (aka 'float
__attribute__((matrix_type(10, 10)))') from incompatible type 'sx5x10_t' (aka
'float __attribute__((matrix_type(5, 10)))')}}
a = b + &c;
- //
@@ -0,0 +1,222 @@
+; RUN: opt -S -dxil-finalize-linkage
-mtriple=dxil-unknown-shadermodel6.5-compute %s | FileCheck %s
+; RUN: llc %s --filetype=asm -o - | FileCheck %s
pow2clk wrote:
Done!
https://github.com/llvm/llvm-project/pull/106146
__
https://github.com/pow2clk updated
https://github.com/llvm/llvm-project/pull/106146
>From 40224473a7b43bc4ffe2024ab51196c2130bedc7 Mon Sep 17 00:00:00 2001
From: Greg Roth
Date: Sun, 25 Aug 2024 12:00:03 -0600
Subject: [PATCH 1/5] [DirectX] Remove trivially dead functions at linkage
finalize
@@ -17,12 +17,12 @@ void add(sx10x10_t a, sx5x10_t b, sx10x5_t c) {
// expected-error@-1 {{assigning to 'sx10x10_t' (aka 'float
__attribute__((matrix_type(10, 10)))') from incompatible type 'sx5x10_t' (aka
'float __attribute__((matrix_type(5, 10)))')}}
a = b + &c;
- //
@@ -852,34 +852,50 @@ void TypePrinter::printExtVectorAfter(const ExtVectorType
*T, raw_ostream &OS) {
void TypePrinter::printConstantMatrixBefore(const ConstantMatrixType *T,
raw_ostream &OS) {
+ if (Policy.UseHLSLTypes)
+OS <
@@ -1381,7 +1381,7 @@ void ASTContext::InitBuiltinTypes(const TargetInfo
&Target,
if (LangOpts.OpenACC && !LangOpts.OpenMP) {
InitBuiltinType(ArraySectionTy, BuiltinType::ArraySection);
}
- if (LangOpts.MatrixTypes)
+ if (LangOpts.MatrixTypes || LangOpts.HLSL)
--
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/111415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/111415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -17,12 +17,12 @@ void add(sx10x10_t a, sx5x10_t b, sx10x5_t c) {
// expected-error@-1 {{assigning to 'sx10x10_t' (aka 'float
__attribute__((matrix_type(10, 10)))') from incompatible type 'sx5x10_t' (aka
'float __attribute__((matrix_type(5, 10)))')}}
a = b + &c;
- //
@@ -19,20 +19,20 @@
using namespace llvm;
static bool finalizeLinkage(Module &M) {
- SmallPtrSet EntriesAndExports;
+ SmallPtrSet Funcs;
// Find all entry points and export functions
pow2clk wrote:
Updated
https://github.com/llvm/llvm-project/pull/106
@@ -0,0 +1,80 @@
+; RUN: opt -S -dxil-finalize-linkage
-mtriple=dxil-unknown-shadermodel6.5-compute %s | FileCheck %s
+; RUN: llc %s --filetype=asm -o - | FileCheck %s
+
+target triple = "dxilv1.5-pc-shadermodel6.5-compute"
+
+; Confirm that DXILFinalizeLinkage will remove functi
@@ -0,0 +1,47 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -S -o - %s |
FileCheck %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -S -o - %s |
FileCheck %s
+
+// Verify that internal linkage unused functions are removed
+
+RWBuffer buf;
+
+// Never
@@ -19,20 +19,20 @@
using namespace llvm;
static bool finalizeLinkage(Module &M) {
- SmallPtrSet EntriesAndExports;
+ SmallPtrSet Funcs;
// Find all entry points and export functions
for (Function &EF : M.functions()) {
-if (!EF.hasFnAttribute("hlsl.shader") && !
https://github.com/pow2clk closed
https://github.com/llvm/llvm-project/pull/111632
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,19 +1,20 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm
-disable-llvm-passes -o - %s | FileCheck %s
-// RUN: %clang_cc1 -triple spirv-vulkan-library -x hlsl -emit-llvm
-disable-llvm-passes -o - %s | FileCheck %s --check-prefix=CHECK-SPIRV
@@ -0,0 +1,48 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -disable-llvm-passes
-emit-llvm -finclude-default-header -o - %s | FileCheck %s
+
+// CHECK-LABEL: increment
+void increment(inout int Arr[2]) {
+ for (int I = 0; I < 2; I++)
+Arr[0] += 2;
+}
+
+// C
@@ -0,0 +1,48 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -disable-llvm-passes
-emit-llvm -finclude-default-header -o - %s | FileCheck %s
+
+// CHECK-LABEL: increment
+void increment(inout int Arr[2]) {
+ for (int I = 0; I < 2; I++)
+Arr[0] += 2;
+}
+
+// C
https://github.com/pow2clk commented:
Just a drive by review with one additional note while searching for changes
that will be disrupted by the mangling shift.
https://github.com/llvm/llvm-project/pull/111047
___
cfe-commits mailing list
cfe-commits@l
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/111047
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,9 +1,53 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm
-O1 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library
-finclude-default-header -x hlsl -emit-llvm -o - %s | FileCheck %s
-void foo(__hlsl_resource_t r
@@ -48,11 +48,13 @@ define <4 x i32> @load_static_array_of_vec_test(i32 %index)
{
}
; CHECK-LABEL: multid_load_test
-define <4 x i32> @multid_load_test() {
+define <4 x i32> @multid_load_test() #0 {
; CHECK-COUNT-8: load i32, ptr addrspace(3)
{{(.*@groushared2dArrayofVec
@@ -4492,6 +4492,37 @@ void CXXNameMangler::mangleType(const ArrayParameterType
*T) {
mangleType(cast(T));
}
+void CXXNameMangler::mangleType(const HLSLAttributedResourceType *T) {
+ llvm::SmallString<64> Str("_Res");
+ const HLSLAttributedResourceType::Attributes &Attrs
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/110327
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11533,6 +11539,18 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType
RHS, bool OfBlockPointer,
return {};
return LHS;
}
+ case Type::HLSLAttributedResource: {
+const HLSLAttributedResourceType *LHSTy =
+LHS->castAs();
+const HLSLAttribut
@@ -4493,28 +4493,34 @@ void CXXNameMangler::mangleType(const
ArrayParameterType *T) {
}
void CXXNameMangler::mangleType(const HLSLAttributedResourceType *T) {
- mangleType(T->getWrappedType());
+ llvm::SmallString<64> Str("_Res");
const HLSLAttributedResourceType::Attri
@@ -4493,28 +4493,34 @@ void CXXNameMangler::mangleType(const
ArrayParameterType *T) {
}
void CXXNameMangler::mangleType(const HLSLAttributedResourceType *T) {
- mangleType(T->getWrappedType());
+ llvm::SmallString<64> Str("_Res");
const HLSLAttributedResourceType::Attri
https://github.com/pow2clk commented:
I'm a bit out of my depth here, but I've been trying to understand Itanium
mangling better and I think my suggestion to coalesce the vendor mangled
portions is valid at least.
https://github.com/llvm/llvm-project/pull/110327
___
@@ -0,0 +1,50 @@
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o -
| FileCheck %s
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o -
| FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/111209
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,50 @@
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o -
| FileCheck %s
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o -
| FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/111209
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,68 @@
+; 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 %}
+
+; CHECK-DAG: %[[#op_ext_glsl:]] = OpExtInstImport "GLSL.std.450"
@@ -0,0 +1,26 @@
+// 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
pow2clk wrote:
I'll copy my comment from elsewhere here:
Are you
@@ -0,0 +1,54 @@
+; RUN: opt -S -dxil-intrinsic-expansion -scalarizer -dxil-op-lower
-mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s
+
+; Make sure dxil op function calls for degrees are expanded and lowered as
fmul for float and half.
+
+define noundef half @degrees_h
https://github.com/pow2clk commented:
None of my suggestions are essential, but I'll give you a chance to consider
them even if you reject them all before I approve.
https://github.com/llvm/llvm-project/pull/111209
___
cfe-commits mailing list
cfe-com
@@ -0,0 +1,54 @@
+; RUN: opt -S -dxil-intrinsic-expansion -scalarizer -dxil-op-lower
-mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s
+
+; Make sure dxil op function calls for degrees are expanded and lowered as
fmul for float and half.
+
+define noundef half @degrees_h
@@ -0,0 +1,64 @@
+// 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: -DFNATTRS=n
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/111209
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,6 @@
+// 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
pow2clk wrote:
Are you getting unexpected diagnostics? If so, I'd li
@@ -18827,9 +18827,21 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: {
ArrayRef{Op0, Op1}, nullptr, "hlsl.step");
}
case Builtin::BI__builtin_hlsl_wave_get_lane_index: {
-return EmitRuntimeCall(CGM.CreateRuntimeFunction(
-llvm::FunctionType::get(In
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/111576
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/pow2clk commented:
Small typo in description:
"IntrinscsDirectX"
Looks good, but I have a question about the SPIRV part.
https://github.com/llvm/llvm-project/pull/111576
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/111632
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/pow2clk edited
https://github.com/llvm/llvm-project/pull/111632
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -13,16 +13,16 @@ void InitBuf(RWBuffer buf) {
}
// CHECK-NOT: _Init_thread_epoch
-// CHECK: define internal void @"?main@@YAXXZ"
+// CHECK: define internal void @_Z4mainv
// CHECK-NEXT: entry:
// CHECK-NEXT: [[Tmp1:%.*]] = alloca %"class.hlsl::RWBuffer"
-// CHECK-NEXT: [[
1 - 100 of 247 matches
Mail list logo