[clang] [llvm] [DirectX] Set DXIL Version using shader model version in compilation target profile (PR #89823)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 23 13:25:26 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-hlsl
@llvm/pr-subscribers-clang-driver
Author: S. Bharadwaj Yadavalli (bharadwajy)
<details>
<summary>Changes</summary>
An earlier commit provided a way to decouple DXIL version from Shader Model
version by representing the DXIL version as `SubArch` in the DXIL Target Triple
and adding corresponding DXIL `Arch` types as valid.
This change constructs the DXIL target triple with DXIL version that is deduced
from the Shader Model version specified in the compilation target profile in a dxc
driver invocation flow.
Updates to tests necessitated by the above change are also included:
* Arch string `dxil` in all HLSL and DirectX tests is updated to include appropriate
version number string.
* Normalization tests of triple strings with DXIL Arch that now has version number
are separated in `TripleTest.cpp`.
---
Patch is 168.73 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/89823.diff
182 Files Affected:
- (modified) clang/lib/Driver/ToolChains/HLSL.cpp (+42-2)
- (modified) clang/test/AST/HLSL/RWBuffer-AST.hlsl (+2-2)
- (modified) clang/test/AST/HLSL/ResourceStruct.hlsl (+1-1)
- (modified) clang/test/AST/HLSL/ast-dump-comment-cbuffe-tbufferr.hlsl (+2-2)
- (modified) clang/test/AST/HLSL/cbuffer_tbuffer.hlsl (+1-1)
- (modified) clang/test/AST/HLSL/group_shared.hlsl (+1-1)
- (modified) clang/test/AST/HLSL/pch.hlsl (+2-2)
- (modified) clang/test/AST/HLSL/pch_hlsl_buffer.hlsl (+2-2)
- (modified) clang/test/AST/HLSL/pch_with_buf.hlsl (+2-2)
- (modified) clang/test/AST/HLSL/resource_binding_attr.hlsl (+1-1)
- (modified) clang/test/AST/HLSL/this-reference-template.hlsl (+1-1)
- (modified) clang/test/AST/HLSL/this-reference.hlsl (+1-1)
- (modified) clang/test/AST/HLSL/vector-alias.hlsl (+1-1)
- (modified) clang/test/AST/HLSL/vector-constructors.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/ArrayTemporary.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/BasicFeatures/standard_conversion_sequences.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/GlobalConstructorFunction.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/GlobalConstructorLib.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/GlobalConstructors.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/GlobalDestructors.hlsl (+2-2)
- (modified) clang/test/CodeGenHLSL/basic-target.c (+8-8)
- (modified) clang/test/CodeGenHLSL/basic_types.hlsl (+2-2)
- (modified) clang/test/CodeGenHLSL/buffer-array-operator.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/builtins/RWBuffer-annotations.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/builtins/RWBuffer-elementtype.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/builtins/RWBuffer-subscript.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/builtins/RasterizerOrderedBuffer-annotations.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/builtins/ScalarSwizzles.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/builtins/abs.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/all.hlsl (+4-4)
- (modified) clang/test/CodeGenHLSL/builtins/any.hlsl (+4-4)
- (modified) clang/test/CodeGenHLSL/builtins/ceil.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/clamp-builtin.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/builtins/clamp.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/cos.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/create_handle.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/builtins/dot-builtin.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/builtins/dot.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/exp.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/exp2.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/floor.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/frac.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/isinf.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/lerp-builtin.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/builtins/lerp.hlsl (+4-4)
- (modified) clang/test/CodeGenHLSL/builtins/log.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/log10.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/log2.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/mad.hlsl (+4-4)
- (modified) clang/test/CodeGenHLSL/builtins/max.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/min.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/pow.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/rcp.hlsl (+9-9)
- (modified) clang/test/CodeGenHLSL/builtins/reversebits.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/builtins/round.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/rsqrt.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/sin.hlsl (+2-2)
- (modified) clang/test/CodeGenHLSL/builtins/sqrt.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/builtins/trunc.hlsl (+3-3)
- (modified) clang/test/CodeGenHLSL/cbuf.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/cbuf_in_namespace.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/convergent-functions.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/disable_opt.hlsl (+2-2)
- (modified) clang/test/CodeGenHLSL/entry.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/float3.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/group_shared.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/half.hlsl (+2-2)
- (modified) clang/test/CodeGenHLSL/no_int_promotion.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/semantics/DispatchThreadID.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/semantics/GroupIndex-codegen.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/shader_type_attr.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/shift-mask.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/sret_output.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/static_global_and_function_in_cb.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/this-assignment-overload.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/this-assignment.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/this-reference.hlsl (+1-1)
- (modified) clang/test/CodeGenHLSL/validator_version.hlsl (+1-1)
- (modified) clang/test/Driver/dxc_dxv_path.hlsl (+3-3)
- (modified) clang/test/Driver/hlsl-lang-targets-spirv.hlsl (+1-1)
- (modified) clang/test/Driver/hlsl-lang-targets.hlsl (+21-18)
- (modified) clang/test/Driver/hlsl_no_stdinc.hlsl (+3-3)
- (modified) clang/test/Frontend/hlsl-entry.cpp (+1-1)
- (modified) clang/test/Options/enable_16bit_types_validation.hlsl (+2-2)
- (modified) clang/test/ParserHLSL/access_specifiers.hlsl (+2-2)
- (modified) clang/test/ParserHLSL/cb_error.hlsl (+1-1)
- (modified) clang/test/ParserHLSL/group_shared.hlsl (+1-1)
- (modified) clang/test/ParserHLSL/group_shared_202x.hlsl (+1-1)
- (modified) clang/test/ParserHLSL/invalid_inside_cb.hlsl (+1-1)
- (modified) clang/test/ParserHLSL/semantic_parsing.hlsl (+1-1)
- (modified) clang/test/Preprocessor/predefined-macros-hlsl.hlsl (+15-15)
- (modified) clang/test/Preprocessor/predefined-macros-no-warnings.c (+1-1)
- (modified) clang/test/SemaHLSL/ArrayParams.hlsl (+5-5)
- (modified) clang/test/SemaHLSL/ArrayTemporary.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/AvailabilityMarkup.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BitInt128.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BuiltIns/RWBuffers.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BuiltIns/any-errors.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BuiltIns/clamp-errors.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BuiltIns/dot-errors.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BuiltIns/exp-errors.hlsl (+2-2)
- (modified) clang/test/SemaHLSL/BuiltIns/frac-errors.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BuiltIns/half-float-only-errors.hlsl (+12-12)
- (modified) clang/test/SemaHLSL/BuiltIns/isinf-errors.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BuiltIns/lerp-errors.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BuiltIns/mad-errors.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BuiltIns/pow-errors.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BuiltIns/rcp-errors.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BuiltIns/reversebits-errors.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BuiltIns/round-errors.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BuiltIns/rsqrt-errors.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/BuiltIns/vector-errors.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/GlobalConstructors.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/OverloadResolutionBugs.hlsl (+2-2)
- (modified) clang/test/SemaHLSL/Semantics/entry_parameter.hlsl (+2-2)
- (modified) clang/test/SemaHLSL/Semantics/groupindex.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/Semantics/invalid_entry_parameter.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/Semantics/missing_entry_annotation.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/Semantics/valid_entry_parameter.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/Types/BuiltinVector/ScalarSwizzleErrors.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/Types/BuiltinVector/ScalarSwizzles.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/VectorOverloadResolution.hlsl (+2-2)
- (modified) clang/test/SemaHLSL/Wave.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/WaveBuiltinAvailability.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/cb_error.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/entry.hlsl (+2-2)
- (modified) clang/test/SemaHLSL/entry_shader.hlsl (+2-2)
- (modified) clang/test/SemaHLSL/entry_shader_redecl.hlsl (+4-4)
- (modified) clang/test/SemaHLSL/group_shared.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/group_shared_202x.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/literal_suffixes.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/literal_suffixes_no_16bit.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/num_threads.hlsl (+11-11)
- (modified) clang/test/SemaHLSL/parameter_modifiers.hlsl (+2-2)
- (modified) clang/test/SemaHLSL/parameter_modifiers_ast.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/prohibit_pointer.hlsl (+4-4)
- (modified) clang/test/SemaHLSL/prohibit_reference.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/resource_binding_attr_error.hlsl (+1-1)
- (modified) clang/test/SemaHLSL/shader_type_attr.hlsl (+2-2)
- (modified) clang/test/SemaHLSL/standard_conversion_sequences.hlsl (+4-4)
- (modified) clang/test/SemaHLSL/valid-shader-stages.hlsl (+1-1)
- (modified) clang/unittests/Driver/DXCModeTest.cpp (+10-10)
- (modified) llvm/lib/TargetParser/Triple.cpp (+30-7)
- (modified) llvm/test/CodeGen/DirectX/ContainerData/DebugShaderHash.ll (+2-2)
- (modified) llvm/test/CodeGen/DirectX/ContainerData/ShaderHash.ll (+2-2)
- (modified) llvm/test/CodeGen/DirectX/Metadata/shaderModel-as.ll (+2-2)
- (modified) llvm/test/CodeGen/DirectX/Metadata/shaderModel-cs.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/Metadata/shaderModel-gs.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/Metadata/shaderModel-hs.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/Metadata/shaderModel-lib.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/Metadata/shaderModel-ms.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/Metadata/shaderModel-ps.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/Metadata/shaderModel-vs.ll (+2-2)
- (modified) llvm/test/CodeGen/DirectX/ShaderFlags/double-extensions.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/ShaderFlags/doubles.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/ShaderFlags/no_flags.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/UAVMetadata.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/cbuf.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/comput_ids.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/conflicting-bitcast-insert.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/dxil_ver.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/embed-dxil.ll (+2-2)
- (modified) llvm/test/CodeGen/DirectX/exp2.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/fmad.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/fneg-conversion.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/frac.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/imad.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/legacy_cb_layout_0.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/legacy_cb_layout_1.ll (+2-2)
- (modified) llvm/test/CodeGen/DirectX/legacy_cb_layout_2.ll (+3-3)
- (modified) llvm/test/CodeGen/DirectX/legacy_cb_layout_3.ll (+6-6)
- (modified) llvm/test/CodeGen/DirectX/lib_entry.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/min_vec_size.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/omit-bitcast-insert.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/strip-call-attrs.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/strip-fn-attrs.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/typed_ptr.ll (+1-1)
- (modified) llvm/test/CodeGen/DirectX/umad.ll (+1-1)
- (modified) llvm/test/Frontend/HLSL/empty_cs_entry.ll (+1-1)
- (modified) llvm/unittests/TargetParser/TripleTest.cpp (+70-50)
``````````diff
diff --git a/clang/lib/Driver/ToolChains/HLSL.cpp b/clang/lib/Driver/ToolChains/HLSL.cpp
index 1169b5d8c92dd6..51f2680b491c60 100644
--- a/clang/lib/Driver/ToolChains/HLSL.cpp
+++ b/clang/lib/Driver/ToolChains/HLSL.cpp
@@ -12,7 +12,9 @@
#include "clang/Driver/DriverDiagnostic.h"
#include "clang/Driver/Job.h"
#include "llvm/ADT/StringSwitch.h"
+#include "llvm/Support/ErrorHandling.h"
#include "llvm/TargetParser/Triple.h"
+#include <string>
using namespace clang::driver;
using namespace clang::driver::tools;
@@ -98,9 +100,47 @@ std::optional<std::string> tryParseProfile(StringRef Profile) {
else if (llvm::getAsUnsignedInteger(Parts[2], 0, Minor))
return std::nullopt;
- // dxil-unknown-shadermodel-hull
+ // Determine DXIL version number using the minor version number of Shader
+ // Model version specified in target profile. Prior to decoupling DXIL version
+ // numbering from that of Shader Model DXIL version 1.Y corresponds to SM 6.Y.
+ // E.g., dxilv1.Y-unknown-shadermodelX.Y-hull
llvm::Triple T;
- T.setArch(Triple::ArchType::dxil);
+ Triple::SubArchType SubArch = llvm::Triple::NoSubArch;
+ switch (Minor) {
+ case 0:
+ SubArch = llvm::Triple::DXILSubArch_v1_0;
+ break;
+ case 1:
+ SubArch = llvm::Triple::DXILSubArch_v1_1;
+ break;
+ case 2:
+ SubArch = llvm::Triple::DXILSubArch_v1_2;
+ break;
+ case 3:
+ SubArch = llvm::Triple::DXILSubArch_v1_3;
+ break;
+ case 4:
+ SubArch = llvm::Triple::DXILSubArch_v1_4;
+ break;
+ case 5:
+ SubArch = llvm::Triple::DXILSubArch_v1_5;
+ break;
+ case 6:
+ SubArch = llvm::Triple::DXILSubArch_v1_6;
+ break;
+ case 7:
+ SubArch = llvm::Triple::DXILSubArch_v1_7;
+ break;
+ case 8:
+ SubArch = llvm::Triple::DXILSubArch_v1_8;
+ break;
+ }
+ if (SubArch == llvm::Triple::NoSubArch) {
+ report_fatal_error(
+ "No DXIL version found for specified Shader Model version",
+ /*gen_crash_diag*/ false);
+ }
+ T.setArch(Triple::ArchType::dxil, SubArch);
T.setOSName(Triple::getOSTypeName(Triple::OSType::ShaderModel).str() +
VersionTuple(Major, Minor).getAsString());
T.setEnvironment(Kind);
diff --git a/clang/test/AST/HLSL/RWBuffer-AST.hlsl b/clang/test/AST/HLSL/RWBuffer-AST.hlsl
index c1613520a146c8..ca2fd5b8375810 100644
--- a/clang/test/AST/HLSL/RWBuffer-AST.hlsl
+++ b/clang/test/AST/HLSL/RWBuffer-AST.hlsl
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -fsyntax-only -ast-dump -DEMPTY %s | FileCheck -check-prefix=EMPTY %s
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -fsyntax-only -ast-dump %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-library -x hlsl -fsyntax-only -ast-dump -DEMPTY %s | FileCheck -check-prefix=EMPTY %s
+// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-library -x hlsl -fsyntax-only -ast-dump %s | FileCheck %s
// This test tests two different AST generations. The "EMPTY" test mode verifies
diff --git a/clang/test/AST/HLSL/ResourceStruct.hlsl b/clang/test/AST/HLSL/ResourceStruct.hlsl
index 34f1419180d84a..4f9f0d9fc62385 100644
--- a/clang/test/AST/HLSL/ResourceStruct.hlsl
+++ b/clang/test/AST/HLSL/ResourceStruct.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -fsyntax-only -ast-dump %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl -fsyntax-only -ast-dump %s | FileCheck %s
// CHECK: NamespaceDecl {{.*}} implicit hlsl
// CHECK: CXXRecordDecl 0x{{[0-9A-Fa-f]+}} <<invalid sloc>> <invalid sloc> implicit <undeserialized declarations> class Resource definition
diff --git a/clang/test/AST/HLSL/ast-dump-comment-cbuffe-tbufferr.hlsl b/clang/test/AST/HLSL/ast-dump-comment-cbuffe-tbufferr.hlsl
index a98dc0f4ce4312..566f054e788e55 100644
--- a/clang/test/AST/HLSL/ast-dump-comment-cbuffe-tbufferr.hlsl
+++ b/clang/test/AST/HLSL/ast-dump-comment-cbuffe-tbufferr.hlsl
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -Wdocumentation -ast-dump=json -x hlsl -triple dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefix=JSON
-// RUN: %clang_cc1 -Wdocumentation -ast-dump -x hlsl -triple dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefix=AST
+// RUN: %clang_cc1 -Wdocumentation -ast-dump=json -x hlsl -triple dxilv1.3-pc-shadermodel6.3-library %s | FileCheck %s --check-prefix=JSON
+// RUN: %clang_cc1 -Wdocumentation -ast-dump -x hlsl -triple dxilv1.3-pc-shadermodel6.3-library %s | FileCheck %s --check-prefix=AST
// JSON:"kind": "HLSLBufferDecl",
// JSON:"name": "A",
diff --git a/clang/test/AST/HLSL/cbuffer_tbuffer.hlsl b/clang/test/AST/HLSL/cbuffer_tbuffer.hlsl
index 7204dcd16e0a92..4700b3b946a559 100644
--- a/clang/test/AST/HLSL/cbuffer_tbuffer.hlsl
+++ b/clang/test/AST/HLSL/cbuffer_tbuffer.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.6-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s
// CHECK:HLSLBufferDecl 0x[[CB:[0-9a-f]+]] {{.*}} line:5:9 cbuffer CB
// CHECK-NEXT:VarDecl 0x[[A:[0-9a-f]+]] {{.*}} col:9 used a 'float'
diff --git a/clang/test/AST/HLSL/group_shared.hlsl b/clang/test/AST/HLSL/group_shared.hlsl
index fb8a07626c66f2..b3b957f09dcf19 100644
--- a/clang/test/AST/HLSL/group_shared.hlsl
+++ b/clang/test/AST/HLSL/group_shared.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s
//CHECK:VarDecl 0x[[A:[0-9a-f]+]] <{{.*}} col:24> col:20 used a 'groupshared float[10]'
groupshared float a[10];
diff --git a/clang/test/AST/HLSL/pch.hlsl b/clang/test/AST/HLSL/pch.hlsl
index 27fae8f499daac..84641bea66cbc3 100644
--- a/clang/test/AST/HLSL/pch.hlsl
+++ b/clang/test/AST/HLSL/pch.hlsl
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl \
+// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl \
// RUN: -finclude-default-header -emit-pch -o %t %S/Inputs/pch.hlsl
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl \
+// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl \
// RUN: -finclude-default-header -include-pch %t -fsyntax-only -ast-dump-all %s \
// RUN: | FileCheck %s
diff --git a/clang/test/AST/HLSL/pch_hlsl_buffer.hlsl b/clang/test/AST/HLSL/pch_hlsl_buffer.hlsl
index 0277d4756db884..3bd4e92a4941e8 100644
--- a/clang/test/AST/HLSL/pch_hlsl_buffer.hlsl
+++ b/clang/test/AST/HLSL/pch_hlsl_buffer.hlsl
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl \
+// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl \
// RUN: -emit-pch -o %t %s
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl \
+// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl \
// RUN: -include-pch %t -fsyntax-only -ast-dump-all %S/Inputs/empty.hlsl \
// RUN: | FileCheck %s
diff --git a/clang/test/AST/HLSL/pch_with_buf.hlsl b/clang/test/AST/HLSL/pch_with_buf.hlsl
index e8eae533af6294..514e1915bb25b7 100644
--- a/clang/test/AST/HLSL/pch_with_buf.hlsl
+++ b/clang/test/AST/HLSL/pch_with_buf.hlsl
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -finclude-default-header -emit-pch -o %t %S/Inputs/pch_with_buf.hlsl
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl \
+// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl -finclude-default-header -emit-pch -o %t %S/Inputs/pch_with_buf.hlsl
+// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl \
// RUN: -finclude-default-header -include-pch %t -fsyntax-only -ast-dump-all %s | FileCheck %s
// Make sure PCH works by using function declared in PCH header.
diff --git a/clang/test/AST/HLSL/resource_binding_attr.hlsl b/clang/test/AST/HLSL/resource_binding_attr.hlsl
index 71900f2dbda550..28de07c44d2826 100644
--- a/clang/test/AST/HLSL/resource_binding_attr.hlsl
+++ b/clang/test/AST/HLSL/resource_binding_attr.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s
// CHECK:HLSLBufferDecl 0x[[CB:[0-9a-f]+]] {{.*}} line:6:9 cbuffer CB
// CHECK-NEXT:HLSLResourceBindingAttr 0x{{[0-9a-f]+}} <col:14> "b3" "space2"
diff --git a/clang/test/AST/HLSL/this-reference-template.hlsl b/clang/test/AST/HLSL/this-reference-template.hlsl
index 60e057986ebf80..c1090df587f92e 100644
--- a/clang/test/AST/HLSL/this-reference-template.hlsl
+++ b/clang/test/AST/HLSL/this-reference-template.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-compute -x hlsl -ast-dump -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s
template<typename K, typename V>
struct Pair {
diff --git a/clang/test/AST/HLSL/this-reference.hlsl b/clang/test/AST/HLSL/this-reference.hlsl
index 67d8e7b7b9119a..2e1feeb440fcfd 100644
--- a/clang/test/AST/HLSL/this-reference.hlsl
+++ b/clang/test/AST/HLSL/this-reference.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-compute -x hlsl -ast-dump -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s
class Pair {
int First;
diff --git a/clang/test/AST/HLSL/vector-alias.hlsl b/clang/test/AST/HLSL/vector-alias.hlsl
index effa1aa53db49a..86c5117925a9ff 100644
--- a/clang/test/AST/HLSL/vector-alias.hlsl
+++ b/clang/test/AST/HLSL/vector-alias.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s
// CHECK: NamespaceDecl 0x{{[0-9a-fA-F]+}} <<invalid sloc>> <invalid sloc> implicit hlsl
// CHECK-NEXT: TypeAliasTemplateDecl 0x{{[0-9a-fA-F]+}} <<invalid sloc>> <invalid sloc> implicit vector
diff --git a/clang/test/AST/HLSL/vector-constructors.hlsl b/clang/test/AST/HLSL/vector-constructors.hlsl
index 7861d5209b5d3e..b4e9aac1357e66 100644
--- a/clang/test/AST/HLSL/vector-constructors.hlsl
+++ b/clang/test/AST/HLSL/vector-constructors.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s
typedef float float2 __attribute__((ext_vector_type(2)));
typedef float float3 __attribute__((ext_vector_type(3)));
diff --git a/clang/test/CodeGenHLSL/ArrayTemporary.hlsl b/clang/test/CodeGenHLSL/ArrayTemporary.hlsl
index 63a30b61440eb5..6a15e80d2024ef 100644
--- a/clang/test/CodeGenHLSL/ArrayTemporary.hlsl
+++ b/clang/test/CodeGenHLSL/ArrayTemporary.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
void fn(float x[2]) { }
diff --git a/clang/test/CodeGenHLSL/BasicFeatures/standard_conversion_sequences.hlsl b/clang/test/CodeGenHLSL/BasicFeatures/standard_conversion_sequences.hlsl
index 06e3cc5af87e1a..3ba3ae26385591 100644
--- a/clang/test/CodeGenHLSL/BasicFeatures/standard_conversion_sequences.hlsl
+++ b/clang/test/CodeGenHLSL/BasicFeatures/standard_conversion_sequences.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
// CHECK-LABEL: f3_to_d4
// CHECK: [[f3:%.*]] = alloca <3 x float>
diff --git a/clang/test/CodeGenHLSL/GlobalConstructorFunction.hlsl b/clang/test/CodeGenHLSL/GlobalConstructorFunction.hlsl
index d65dec4a1ddf43..351a704a25349e 100644
--- a/clang/test/CodeGenHLSL/GlobalConstructorFunction.hlsl
+++ b/clang/test/CodeGenHLSL/GlobalConstructorFunction.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-compute -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s
int i;
diff --git a/clang/test/CodeGenHLSL/GlobalConstructorLib.hlsl b/clang/test/CodeGenHLSL/GlobalConstructorLib.hlsl
index e7fe4e0c4caf7d..9528aa91989df0 100644
--- a/clang/test/CodeGenHLSL/GlobalConstructorLib.hlsl
+++ b/clang/test/CodeGenHLSL/GlobalConstructorLib.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s
// Make sure global variable for ctors exist for lib profile.
// CHECK:@llvm.global_ctors
diff --git a/clang/test/CodeGenHLSL/GlobalConstructors.hlsl b/clang/test/CodeGenHLSL/GlobalConstructors.hlsl
index 332302e1a8bb05..31ca7f877babb9 100644
--- a/clang/test/CodeGenHLSL/GlobalConstructors.hlsl
+++ b/clang/test/CodeGenHLSL/GlobalConstructors.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.0-compute -x hlsl -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s
RWBuffer<float> Buffer;
diff --git a/clang/test/CodeGenHLSL/GlobalDestructors.hlsl b/clang/test/CodeGenHLSL/GlobalDestructors.hlsl
index b245af7c0f7b11..44c13c72b32b95 100644
--- a/clang/test/CodeGenHLSL/GlobalDestructors.hlsl
+++ b/clang/test/CodeGenHLSL/GlobalDestructors.hlsl
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -std=hlsl202x -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s --check-prefixes=CS,CHECK
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -std=hlsl202x -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s --check-prefixes=LIB,CHECK
+// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-compute -std=hlsl202x -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s --check-prefixes=CS,CHECK
+// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.3-library -std=hlsl202x -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s --check-prefixes=LIB,CHECK
// Make sure global variable for dtors exist for lib profile.
// LIB:@llvm.global_dtors
diff --git a/clang/test/CodeGenHLSL/basic-target.c b/clang/test/CodeGenHLSL/basic-target.c
index 8db711c3f2a5b1..23188fcbcf0cbc 100644
--- a/clang/test/CodeGenHLSL/basic-target.c
+++ b/clang/test/CodeGenHLSL/basic-target.c
@@ -1,10 +1,10 @@
-// RUN: %clang -target dxil-pc-shadermodel6.0-pixel -S -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang -target dxil-pc-shadermodel6.0-vertex -S -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang -target dxil-pc-shadermodel6.0-compute -S -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang -target dxil-pc-shadermodel6.0-library -S -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang -target dxil-pc-shadermodel6.0-hull -S -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang -target dxil-pc-shadermodel6.0-domain -S -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang -target dxil-pc-shadermodel6.0-geometry -S -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang -target dxilv1.0-pc-shadermodel6.0-pixel -S -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang -target dxilv1.0-pc-shadermodel6.0-vertex -S -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang -target dxilv1.0-pc-shadermodel6.0-compute -S -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang -target dxilv1.0-pc-shadermodel6.0-library -S -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang -target dxilv1.0-pc-shadermodel6.0-hull -S -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang -target dxilv1.0-pc-shadermodel6.0-domain -S -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang -target dxilv1.0-pc-shadermodel6.0-geometry -S -emit-llvm -o - %s | FileCheck %s
// CHECK: target datalayout = "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
-// CHECK: target triple = "dxil-pc-shadermodel6.0-{{[a-z]+}}"
+// CHECK: target triple = "dxilv1.0-pc-shadermodel6.0-{{[a-z]+}}"
diff --git a/clang/test/CodeGenHLSL/basic_types.hlsl b/clang/test/CodeGenHLSL/basic_types.hlsl
index 15c963dfa666f4..31cbc0fdebee66 100644
--- a/clang/test/CodeGenHLSL/basic_types.hlsl
+++ b/clang/test/CodeGenHLSL/basic_types.hlsl
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: dxilv1.3-pc-shadermodel6.3-library %s -fnative-half-type \
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
-// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
+// RUN: dxilv1.3-pc-shadermodel6.3-library %s -fnative-half-type \
// RUN: -emit-llvm -disable-llvm-passes -o - -DNAMESPACED| FileCheck %s
diff --git a/clang/test/CodeGenHLSL/buffer-array-operator.hlsl b/clang/test/CodeGenHLSL/buffer-array-operator.hlsl
index 6bcb06106bf1cf..959100ec946860 100644
--- a/clang/test/CodeGenHLSL/buffer-array-operator.hlsl
+++ b/clang/test/CodeGenHLSL/buffer-array-operator.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
const RWBuffer<float> In;
RWBuffer<float> Out;
diff --git a/clang/test/CodeGenHLSL/builtins/RWBuffer-annotations.hlsl b/clang/test/CodeGenHLSL/builtins/RWBuffer-annotations.hlsl
index 7ca78e60fb9c59..90ff6d3003e123 100644
--- a/clang/test/CodeGenHLSL/builtins/RWBuffer-annotations.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/RWBuffer-annotations.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-compute -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
RWBuffer<float> Buffer1;
RWBuffer<vector<float, 4> > BufferArray[4];
diff --git a/clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl b/clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl
index 74b3f59bf7600f..508b91743ef28c 100644
--- a/clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.3-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
RWBuffer<float> Buf;
diff --git a/clang/test/CodeGenHLSL/builtins/RWBuffer-elementtype.hlsl b/clang/test/CodeGenHLSL/builtins/RWBuffer-elementtype.hlsl
index 036c9c28ef2779..846459c572e0bd 100644
--- a/clang/test/CodeGenHLSL/builtins/RWBuffer-elementtype.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/RWBuffer-elementtype.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute -finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.2-compute -finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s
RWBuffer<int16_t> BufI16;
RWBuffer<uint16_t> BufU16;
diff --git a/clang/test/CodeGenHLSL/builtins/RWBuffer-subscript.hlsl b/clang/test/CodeGenHLSL/builtins/RWBuffer-subscript.hlsl
index da8a1e538ec5e7..be0d2f8cd955c1 100644
--- a/clang/test/CodeGenHLSL/builtins/RWBuffer-subscript.hlsl
+++ b/clang/test/CodeGenHLSL/builtins/RWBuffer-subscript.hlsl
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -emit-llvm -o ...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/89823
More information about the cfe-commits
mailing list