Skip to content

Commit 5f02dab

Browse files
bharadwajyBharadwaj Yadavalli
authored andcommitted
Set DXIL Version based on shader model provided in compilation target profile specified
Update dxil arch string in all HLSL and DirectX tests Separate out normalization tests of triple strings with DXIL Arch that now has version number.
1 parent dbcc454 commit 5f02dab

File tree

182 files changed

+503
-417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+503
-417
lines changed

clang/lib/Driver/ToolChains/HLSL.cpp

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
#include "clang/Driver/DriverDiagnostic.h"
1313
#include "clang/Driver/Job.h"
1414
#include "llvm/ADT/StringSwitch.h"
15+
#include "llvm/Support/ErrorHandling.h"
1516
#include "llvm/TargetParser/Triple.h"
17+
#include <string>
1618

1719
using namespace clang::driver;
1820
using namespace clang::driver::tools;
@@ -98,9 +100,47 @@ std::optional<std::string> tryParseProfile(StringRef Profile) {
98100
else if (llvm::getAsUnsignedInteger(Parts[2], 0, Minor))
99101
return std::nullopt;
100102

101-
// dxil-unknown-shadermodel-hull
103+
// Determine DXIL version number using the minor version number of Shader
104+
// Model version specified in target profile. Prior to decoupling DXIL version
105+
// numbering from that of Shader Model DXIL version 1.Y corresponds to SM 6.Y.
106+
// E.g., dxilv1.Y-unknown-shadermodelX.Y-hull
102107
llvm::Triple T;
103-
T.setArch(Triple::ArchType::dxil);
108+
Triple::SubArchType SubArch = llvm::Triple::NoSubArch;
109+
switch (Minor) {
110+
case 0:
111+
SubArch = llvm::Triple::DXILSubArch_v1_0;
112+
break;
113+
case 1:
114+
SubArch = llvm::Triple::DXILSubArch_v1_1;
115+
break;
116+
case 2:
117+
SubArch = llvm::Triple::DXILSubArch_v1_2;
118+
break;
119+
case 3:
120+
SubArch = llvm::Triple::DXILSubArch_v1_3;
121+
break;
122+
case 4:
123+
SubArch = llvm::Triple::DXILSubArch_v1_4;
124+
break;
125+
case 5:
126+
SubArch = llvm::Triple::DXILSubArch_v1_5;
127+
break;
128+
case 6:
129+
SubArch = llvm::Triple::DXILSubArch_v1_6;
130+
break;
131+
case 7:
132+
SubArch = llvm::Triple::DXILSubArch_v1_7;
133+
break;
134+
case 8:
135+
SubArch = llvm::Triple::DXILSubArch_v1_8;
136+
break;
137+
}
138+
if (SubArch == llvm::Triple::NoSubArch) {
139+
report_fatal_error(
140+
"No DXIL version found for specified Shader Model version",
141+
/*gen_crash_diag*/ false);
142+
}
143+
T.setArch(Triple::ArchType::dxil, SubArch);
104144
T.setOSName(Triple::getOSTypeName(Triple::OSType::ShaderModel).str() +
105145
VersionTuple(Major, Minor).getAsString());
106146
T.setEnvironment(Kind);

clang/test/AST/HLSL/RWBuffer-AST.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -fsyntax-only -ast-dump -DEMPTY %s | FileCheck -check-prefix=EMPTY %s
2-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -fsyntax-only -ast-dump %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-library -x hlsl -fsyntax-only -ast-dump -DEMPTY %s | FileCheck -check-prefix=EMPTY %s
2+
// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-library -x hlsl -fsyntax-only -ast-dump %s | FileCheck %s
33

44

55
// This test tests two different AST generations. The "EMPTY" test mode verifies

clang/test/AST/HLSL/ResourceStruct.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -fsyntax-only -ast-dump %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl -fsyntax-only -ast-dump %s | FileCheck %s
22

33
// CHECK: NamespaceDecl {{.*}} implicit hlsl
44
// CHECK: CXXRecordDecl 0x{{[0-9A-Fa-f]+}} <<invalid sloc>> <invalid sloc> implicit <undeserialized declarations> class Resource definition

clang/test/AST/HLSL/ast-dump-comment-cbuffe-tbufferr.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang_cc1 -Wdocumentation -ast-dump=json -x hlsl -triple dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefix=JSON
2-
// RUN: %clang_cc1 -Wdocumentation -ast-dump -x hlsl -triple dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefix=AST
1+
// RUN: %clang_cc1 -Wdocumentation -ast-dump=json -x hlsl -triple dxilv1.3-pc-shadermodel6.3-library %s | FileCheck %s --check-prefix=JSON
2+
// RUN: %clang_cc1 -Wdocumentation -ast-dump -x hlsl -triple dxilv1.3-pc-shadermodel6.3-library %s | FileCheck %s --check-prefix=AST
33

44
// JSON:"kind": "HLSLBufferDecl",
55
// JSON:"name": "A",

clang/test/AST/HLSL/cbuffer_tbuffer.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.6-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s
22

33
// CHECK:HLSLBufferDecl 0x[[CB:[0-9a-f]+]] {{.*}} line:5:9 cbuffer CB
44
// CHECK-NEXT:VarDecl 0x[[A:[0-9a-f]+]] {{.*}} col:9 used a 'float'

clang/test/AST/HLSL/group_shared.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s
22

33
//CHECK:VarDecl 0x[[A:[0-9a-f]+]] <{{.*}} col:24> col:20 used a 'groupshared float[10]'
44
groupshared float a[10];

clang/test/AST/HLSL/pch.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl \
1+
// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl \
22
// RUN: -finclude-default-header -emit-pch -o %t %S/Inputs/pch.hlsl
3-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl \
3+
// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl \
44
// RUN: -finclude-default-header -include-pch %t -fsyntax-only -ast-dump-all %s \
55
// RUN: | FileCheck %s
66

clang/test/AST/HLSL/pch_hlsl_buffer.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl \
1+
// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl \
22
// RUN: -emit-pch -o %t %s
3-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl \
3+
// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl \
44
// RUN: -include-pch %t -fsyntax-only -ast-dump-all %S/Inputs/empty.hlsl \
55
// RUN: | FileCheck %s
66

clang/test/AST/HLSL/pch_with_buf.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -finclude-default-header -emit-pch -o %t %S/Inputs/pch_with_buf.hlsl
2-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl \
1+
// 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
2+
// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl \
33
// RUN: -finclude-default-header -include-pch %t -fsyntax-only -ast-dump-all %s | FileCheck %s
44

55
// Make sure PCH works by using function declared in PCH header.

clang/test/AST/HLSL/resource_binding_attr.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl -ast-dump -o - %s | FileCheck %s
22

33
// CHECK:HLSLBufferDecl 0x[[CB:[0-9a-f]+]] {{.*}} line:6:9 cbuffer CB
44
// CHECK-NEXT:HLSLResourceBindingAttr 0x{{[0-9a-f]+}} <col:14> "b3" "space2"

clang/test/AST/HLSL/this-reference-template.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-compute -x hlsl -ast-dump -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s
22

33
template<typename K, typename V>
44
struct Pair {

clang/test/AST/HLSL/this-reference.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-compute -x hlsl -ast-dump -disable-llvm-passes -o - -hlsl-entry main %s | FileCheck %s
22

33
class Pair {
44
int First;

clang/test/AST/HLSL/vector-alias.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s
22

33
// CHECK: NamespaceDecl 0x{{[0-9a-fA-F]+}} <<invalid sloc>> <invalid sloc> implicit hlsl
44
// CHECK-NEXT: TypeAliasTemplateDecl 0x{{[0-9a-fA-F]+}} <<invalid sloc>> <invalid sloc> implicit vector

clang/test/AST/HLSL/vector-constructors.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s
22

33
typedef float float2 __attribute__((ext_vector_type(2)));
44
typedef float float3 __attribute__((ext_vector_type(3)));

clang/test/CodeGenHLSL/ArrayTemporary.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
22

33
void fn(float x[2]) { }
44

clang/test/CodeGenHLSL/BasicFeatures/standard_conversion_sequences.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
22

33
// CHECK-LABEL: f3_to_d4
44
// CHECK: [[f3:%.*]] = alloca <3 x float>

clang/test/CodeGenHLSL/GlobalConstructorFunction.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-compute -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s
22

33
int i;
44

clang/test/CodeGenHLSL/GlobalConstructorLib.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s
22

33
// Make sure global variable for ctors exist for lib profile.
44
// CHECK:@llvm.global_ctors

clang/test/CodeGenHLSL/GlobalConstructors.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.0-compute -x hlsl -S -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s
22

33
RWBuffer<float> Buffer;
44

clang/test/CodeGenHLSL/GlobalDestructors.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// 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
2-
// 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
1+
// 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
2+
// 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
33

44
// Make sure global variable for dtors exist for lib profile.
55
// LIB:@llvm.global_dtors

clang/test/CodeGenHLSL/basic-target.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// RUN: %clang -target dxil-pc-shadermodel6.0-pixel -S -emit-llvm -o - %s | FileCheck %s
2-
// RUN: %clang -target dxil-pc-shadermodel6.0-vertex -S -emit-llvm -o - %s | FileCheck %s
3-
// RUN: %clang -target dxil-pc-shadermodel6.0-compute -S -emit-llvm -o - %s | FileCheck %s
4-
// RUN: %clang -target dxil-pc-shadermodel6.0-library -S -emit-llvm -o - %s | FileCheck %s
5-
// RUN: %clang -target dxil-pc-shadermodel6.0-hull -S -emit-llvm -o - %s | FileCheck %s
6-
// RUN: %clang -target dxil-pc-shadermodel6.0-domain -S -emit-llvm -o - %s | FileCheck %s
7-
// RUN: %clang -target dxil-pc-shadermodel6.0-geometry -S -emit-llvm -o - %s | FileCheck %s
1+
// RUN: %clang -target dxilv1.0-pc-shadermodel6.0-pixel -S -emit-llvm -o - %s | FileCheck %s
2+
// RUN: %clang -target dxilv1.0-pc-shadermodel6.0-vertex -S -emit-llvm -o - %s | FileCheck %s
3+
// RUN: %clang -target dxilv1.0-pc-shadermodel6.0-compute -S -emit-llvm -o - %s | FileCheck %s
4+
// RUN: %clang -target dxilv1.0-pc-shadermodel6.0-library -S -emit-llvm -o - %s | FileCheck %s
5+
// RUN: %clang -target dxilv1.0-pc-shadermodel6.0-hull -S -emit-llvm -o - %s | FileCheck %s
6+
// RUN: %clang -target dxilv1.0-pc-shadermodel6.0-domain -S -emit-llvm -o - %s | FileCheck %s
7+
// RUN: %clang -target dxilv1.0-pc-shadermodel6.0-geometry -S -emit-llvm -o - %s | FileCheck %s
88

99
// 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"
10-
// CHECK: target triple = "dxil-pc-shadermodel6.0-{{[a-z]+}}"
10+
// CHECK: target triple = "dxilv1.0-pc-shadermodel6.0-{{[a-z]+}}"

clang/test/CodeGenHLSL/basic_types.hlsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
2-
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
2+
// RUN: dxilv1.3-pc-shadermodel6.3-library %s -fnative-half-type \
33
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s
44
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
5-
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
5+
// RUN: dxilv1.3-pc-shadermodel6.3-library %s -fnative-half-type \
66
// RUN: -emit-llvm -disable-llvm-passes -o - -DNAMESPACED| FileCheck %s
77

88

clang/test/CodeGenHLSL/buffer-array-operator.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
22

33
const RWBuffer<float> In;
44
RWBuffer<float> Out;

clang/test/CodeGenHLSL/builtins/RWBuffer-annotations.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-compute -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
22

33
RWBuffer<float> Buffer1;
44
RWBuffer<vector<float, 4> > BufferArray[4];

clang/test/CodeGenHLSL/builtins/RWBuffer-constructor.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.3-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
22
// RUN: %clang_cc1 -triple spirv-vulkan-library -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=CHECK-SPIRV
33

44
RWBuffer<float> Buf;

clang/test/CodeGenHLSL/builtins/RWBuffer-elementtype.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.2-compute -finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.3-pc-shadermodel6.2-compute -finclude-default-header -fnative-half-type -emit-llvm -o - %s | FileCheck %s
22

33
RWBuffer<int16_t> BufI16;
44
RWBuffer<uint16_t> BufU16;

clang/test/CodeGenHLSL/builtins/RWBuffer-subscript.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -emit-llvm -o - -O0 %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-compute -emit-llvm -o - -O0 %s | FileCheck %s
22

33
RWBuffer<int> In;
44
RWBuffer<int> Out;

clang/test/CodeGenHLSL/builtins/RasterizerOrderedBuffer-annotations.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-pixel -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
1+
// RUN: %clang_cc1 -triple dxilv1.0-pc-shadermodel6.0-pixel -x hlsl -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
22

33
RasterizerOrderedBuffer<float> Buffer1;
44
RasterizerOrderedBuffer<vector<float, 4> > BufferArray[4];

clang/test/CodeGenHLSL/builtins/ScalarSwizzles.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
2-
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
2+
// RUN: dxilv1.3-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
33
// RUN: -o - | FileCheck %s
44

55
// CHECK-LABEL: ToTwoInts

clang/test/CodeGenHLSL/builtins/abs.hlsl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
2-
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
3-
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
2+
// RUN: dxilv1.3-pc-shadermodel6.3-library %s -fnative-half-type \
3+
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
44
// RUN: --check-prefixes=CHECK,NATIVE_HALF
55
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
6-
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
6+
// RUN: dxilv1.3-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
77
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
88

99
using hlsl::abs;

clang/test/CodeGenHLSL/builtins/all.hlsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
22
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
3-
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
3+
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
44
// RUN: --check-prefixes=CHECK,NATIVE_HALF,SPIR_NATIVE_HALF,SPIR_CHECK
55
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
66
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
77
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,SPIR_NO_HALF,SPIR_CHECK
88
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
9-
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
10-
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
9+
// RUN: dxilv1.3-pc-shadermodel6.3-library %s -fnative-half-type \
10+
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
1111
// RUN: --check-prefixes=CHECK,NATIVE_HALF,DXIL_NATIVE_HALF,DXIL_CHECK
1212
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
13-
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
13+
// RUN: dxilv1.3-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
1414
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,DXIL_NO_HALF,DXIL_CHECK
1515

1616
#ifdef __HLSL_ENABLE_16_BIT

clang/test/CodeGenHLSL/builtins/any.hlsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
22
// RUN: spirv-unknown-vulkan-compute %s -fnative-half-type \
3-
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
3+
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
44
// RUN: --check-prefixes=CHECK,NATIVE_HALF,SPIR_NATIVE_HALF,SPIR_CHECK
55
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
66
// RUN: spirv-unknown-vulkan-compute %s -emit-llvm -disable-llvm-passes \
77
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,SPIR_NO_HALF,SPIR_CHECK
88
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
9-
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
10-
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
9+
// RUN: dxilv1.3-pc-shadermodel6.3-library %s -fnative-half-type \
10+
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
1111
// RUN: --check-prefixes=CHECK,NATIVE_HALF,DXIL_NATIVE_HALF,DXIL_CHECK
1212
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
13-
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
13+
// RUN: dxilv1.3-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
1414
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,DXIL_NO_HALF,DXIL_CHECK
1515

1616
#ifdef __HLSL_ENABLE_16_BIT

clang/test/CodeGenHLSL/builtins/ceil.hlsl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
2-
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
3-
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
2+
// RUN: dxilv1.3-pc-shadermodel6.3-library %s -fnative-half-type \
3+
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
44
// RUN: --check-prefixes=CHECK,NATIVE_HALF
55
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
6-
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
6+
// RUN: dxilv1.3-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
77
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
88

99
using hlsl::ceil;

clang/test/CodeGenHLSL/builtins/clamp-builtin.hlsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -o - | FileCheck %s
1+
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxilv1.3-pc-shadermodel6.3-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -o - | FileCheck %s
22

33
// CHECK-LABEL: builtin_test_clamp_int4
44
// CHECK: %dx.clamp = call <4 x i32> @llvm.dx.clamp.v4i32(<4 x i32> %0, <4 x i32> %1, <4 x i32> %2)

clang/test/CodeGenHLSL/builtins/clamp.hlsl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
2-
// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \
3-
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
2+
// RUN: dxilv1.3-pc-shadermodel6.3-library %s -fnative-half-type \
3+
// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \
44
// RUN: --check-prefixes=CHECK,NATIVE_HALF
55
// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \
6-
// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
6+
// RUN: dxilv1.3-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \
77
// RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF
88

99
#ifdef __HLSL_ENABLE_16_BIT

0 commit comments

Comments
 (0)