Skip to content

Commit d06ba37

Browse files
[SPIR-V] Support extension toggling and enabling all (#85503)
1 parent c7198e0 commit d06ba37

Some content is hidden

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

53 files changed

+235
-130
lines changed

llvm/lib/Target/SPIRV/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ add_llvm_target(SPIRVCodeGen
1717
SPIRVAsmPrinter.cpp
1818
SPIRVBuiltins.cpp
1919
SPIRVCallLowering.cpp
20+
SPIRVCommandLine.cpp
2021
SPIRVDuplicatesTracker.cpp
2122
SPIRVEmitIntrinsics.cpp
2223
SPIRVGlobalRegistry.cpp
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
//===--- SPIRVCommandLine.cpp ---- Command Line Options ---------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file contains definitions of classes and functions needed for
10+
// processing, parsing, and using CLI options for the SPIR-V backend.
11+
//
12+
//===----------------------------------------------------------------------===//
13+
14+
#include "SPIRVCommandLine.h"
15+
#include "llvm/ADT/StringRef.h"
16+
#include <algorithm>
17+
#include <map>
18+
19+
#define DEBUG_TYPE "spirv-commandline"
20+
21+
using namespace llvm;
22+
23+
static const std::map<std::string, SPIRV::Extension::Extension>
24+
SPIRVExtensionMap = {
25+
{"SPV_EXT_shader_atomic_float_add",
26+
SPIRV::Extension::Extension::SPV_EXT_shader_atomic_float_add},
27+
{"SPV_EXT_shader_atomic_float16_add",
28+
SPIRV::Extension::Extension::SPV_EXT_shader_atomic_float16_add},
29+
{"SPV_EXT_shader_atomic_float_min_max",
30+
SPIRV::Extension::Extension::SPV_EXT_shader_atomic_float_min_max},
31+
{"SPV_INTEL_arbitrary_precision_integers",
32+
SPIRV::Extension::Extension::SPV_INTEL_arbitrary_precision_integers},
33+
{"SPV_INTEL_optnone", SPIRV::Extension::Extension::SPV_INTEL_optnone},
34+
{"SPV_INTEL_usm_storage_classes",
35+
SPIRV::Extension::Extension::SPV_INTEL_usm_storage_classes},
36+
{"SPV_INTEL_subgroups",
37+
SPIRV::Extension::Extension::SPV_INTEL_subgroups},
38+
{"SPV_KHR_uniform_group_instructions",
39+
SPIRV::Extension::Extension::SPV_KHR_uniform_group_instructions},
40+
{"SPV_KHR_no_integer_wrap_decoration",
41+
SPIRV::Extension::Extension::SPV_KHR_no_integer_wrap_decoration},
42+
{"SPV_KHR_float_controls",
43+
SPIRV::Extension::Extension::SPV_KHR_float_controls},
44+
{"SPV_KHR_expect_assume",
45+
SPIRV::Extension::Extension::SPV_KHR_expect_assume},
46+
{"SPV_KHR_bit_instructions",
47+
SPIRV::Extension::Extension::SPV_KHR_bit_instructions},
48+
{"SPV_KHR_linkonce_odr",
49+
SPIRV::Extension::Extension::SPV_KHR_linkonce_odr},
50+
{"SPV_INTEL_bfloat16_conversion",
51+
SPIRV::Extension::Extension::SPV_INTEL_bfloat16_conversion},
52+
{"SPV_KHR_subgroup_rotate",
53+
SPIRV::Extension::Extension::SPV_KHR_subgroup_rotate},
54+
{"SPV_INTEL_variable_length_array",
55+
SPIRV::Extension::Extension::SPV_INTEL_variable_length_array},
56+
{"SPV_INTEL_function_pointers",
57+
SPIRV::Extension::Extension::SPV_INTEL_function_pointers},
58+
};
59+
60+
bool SPIRVExtensionsParser::parse(cl::Option &O, llvm::StringRef ArgName,
61+
llvm::StringRef ArgValue,
62+
std::set<SPIRV::Extension::Extension> &Vals) {
63+
llvm::SmallVector<llvm::StringRef, 10> Tokens;
64+
ArgValue.split(Tokens, ",", -1, false);
65+
std::sort(Tokens.begin(), Tokens.end());
66+
67+
std::set<SPIRV::Extension::Extension> EnabledExtensions;
68+
69+
for (const auto &Token : Tokens) {
70+
if (Token == "all") {
71+
for (const auto &[ExtensionName, ExtensionEnum] : SPIRVExtensionMap)
72+
EnabledExtensions.insert(ExtensionEnum);
73+
74+
continue;
75+
}
76+
77+
if (Token.empty() || (!Token.starts_with("+") && !Token.starts_with("-")))
78+
return O.error("Invalid extension list format: " + Token.str());
79+
80+
llvm::StringRef ExtensionName = Token.substr(1);
81+
auto NameValuePair = SPIRVExtensionMap.find(ExtensionName.str());
82+
83+
if (NameValuePair == SPIRVExtensionMap.end())
84+
return O.error("Unknown SPIR-V extension: " + Token.str());
85+
86+
if (Token.starts_with("+")) {
87+
EnabledExtensions.insert(NameValuePair->second);
88+
} else if (EnabledExtensions.count(NameValuePair->second)) {
89+
if (std::find(Tokens.begin(), Tokens.end(), "+" + ExtensionName.str()) !=
90+
Tokens.end())
91+
return O.error(
92+
"Extension cannot be allowed and disallowed at the same time: " +
93+
ExtensionName.str());
94+
95+
EnabledExtensions.erase(NameValuePair->second);
96+
}
97+
}
98+
99+
Vals = std::move(EnabledExtensions);
100+
return false;
101+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//===--- SPIRVCommandLine.h ---- Command Line Options -----------*- C++ -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// This file contains classes and functions needed for processing, parsing, and
10+
// using CLI options for the SPIR-V backend.
11+
//
12+
//===----------------------------------------------------------------------===//
13+
14+
#ifndef LLVM_LIB_TARGET_SPIRV_COMMANDLINE_H
15+
#define LLVM_LIB_TARGET_SPIRV_COMMANDLINE_H
16+
17+
#include "MCTargetDesc/SPIRVBaseInfo.h"
18+
#include "llvm/Support/CommandLine.h"
19+
#include <set>
20+
21+
namespace llvm {
22+
23+
/// Command line parser for toggling SPIR-V extensions.
24+
struct SPIRVExtensionsParser
25+
: public cl::parser<std::set<SPIRV::Extension::Extension>> {
26+
public:
27+
SPIRVExtensionsParser(cl::Option &O)
28+
: cl::parser<std::set<SPIRV::Extension::Extension>>(O) {}
29+
30+
/// Parses SPIR-V extension name from CLI arguments.
31+
///
32+
/// \return Returns true on error.
33+
bool parse(cl::Option &O, StringRef ArgName, StringRef ArgValue,
34+
std::set<SPIRV::Extension::Extension> &Vals);
35+
};
36+
37+
} // namespace llvm
38+
#endif // LLVM_LIB_TARGET_SPIRV_COMMANDLINE_H

llvm/lib/Target/SPIRV/SPIRVSubtarget.cpp

Lines changed: 6 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#include "SPIRVSubtarget.h"
1414
#include "SPIRV.h"
15+
#include "SPIRVCommandLine.h"
1516
#include "SPIRVGlobalRegistry.h"
1617
#include "SPIRVLegalizerInfo.h"
1718
#include "SPIRVRegisterBankInfo.h"
@@ -32,80 +33,10 @@ static cl::opt<bool>
3233
cl::desc("SPIR-V Translator compatibility mode"),
3334
cl::Optional, cl::init(false));
3435

35-
cl::list<SPIRV::Extension::Extension> Extensions(
36-
"spirv-extensions", cl::desc("SPIR-V extensions"), cl::ZeroOrMore,
37-
cl::Hidden,
38-
cl::values(
39-
clEnumValN(SPIRV::Extension::SPV_EXT_shader_atomic_float_add,
40-
"SPV_EXT_shader_atomic_float_add",
41-
"Adds atomic add instruction on floating-point numbers."),
42-
clEnumValN(
43-
SPIRV::Extension::SPV_EXT_shader_atomic_float16_add,
44-
"SPV_EXT_shader_atomic_float16_add",
45-
"Extends the SPV_EXT_shader_atomic_float_add extension to support "
46-
"atomically adding to 16-bit floating-point numbers in memory."),
47-
clEnumValN(
48-
SPIRV::Extension::SPV_EXT_shader_atomic_float_min_max,
49-
"SPV_EXT_shader_atomic_float_min_max",
50-
"Adds atomic min and max instruction on floating-point numbers."),
51-
clEnumValN(SPIRV::Extension::SPV_INTEL_arbitrary_precision_integers,
52-
"SPV_INTEL_arbitrary_precision_integers",
53-
"Allows generating arbitrary width integer types."),
54-
clEnumValN(SPIRV::Extension::SPV_INTEL_optnone, "SPV_INTEL_optnone",
55-
"Adds OptNoneINTEL value for Function Control mask that "
56-
"indicates a request to not optimize the function."),
57-
clEnumValN(SPIRV::Extension::SPV_INTEL_usm_storage_classes,
58-
"SPV_INTEL_usm_storage_classes",
59-
"Introduces two new storage classes that are sub classes of "
60-
"the CrossWorkgroup storage class "
61-
"that provides additional information that can enable "
62-
"optimization."),
63-
clEnumValN(SPIRV::Extension::SPV_INTEL_subgroups, "SPV_INTEL_subgroups",
64-
"Allows work items in a subgroup to share data without the "
65-
"use of local memory and work group barriers, and to "
66-
"utilize specialized hardware to load and store blocks of "
67-
"data from images or buffers."),
68-
clEnumValN(SPIRV::Extension::SPV_KHR_uniform_group_instructions,
69-
"SPV_KHR_uniform_group_instructions",
70-
"Allows support for additional group operations within "
71-
"uniform control flow."),
72-
clEnumValN(SPIRV::Extension::SPV_KHR_no_integer_wrap_decoration,
73-
"SPV_KHR_no_integer_wrap_decoration",
74-
"Adds decorations to indicate that a given instruction does "
75-
"not cause integer wrapping."),
76-
clEnumValN(
77-
SPIRV::Extension::SPV_KHR_float_controls, "SPV_KHR_float_controls",
78-
"Provides new execution modes to control floating-point "
79-
"computations by overriding an implementation’s default behavior "
80-
"for rounding modes, denormals, signed zero, and infinities."),
81-
clEnumValN(SPIRV::Extension::SPV_KHR_expect_assume,
82-
"SPV_KHR_expect_assume",
83-
"Provides additional information to a compiler, similar to "
84-
"the llvm.assume and llvm.expect intrinsics."),
85-
clEnumValN(SPIRV::Extension::SPV_KHR_bit_instructions,
86-
"SPV_KHR_bit_instructions",
87-
"This enables bit instructions to be used by SPIR-V modules "
88-
"without requiring the Shader capability."),
89-
clEnumValN(
90-
SPIRV::Extension::SPV_KHR_linkonce_odr, "SPV_KHR_linkonce_odr",
91-
"Allows to use the LinkOnceODR linkage type that is to let "
92-
"a function or global variable to be merged with other functions "
93-
"or global variables of the same name when linkage occurs."),
94-
clEnumValN(SPIRV::Extension::SPV_INTEL_bfloat16_conversion,
95-
"SPV_INTEL_bfloat16_conversion",
96-
"Adds instructions to convert between single-precision "
97-
"32-bit floating-point values and 16-bit bfloat16 values."),
98-
clEnumValN(SPIRV::Extension::SPV_KHR_subgroup_rotate,
99-
"SPV_KHR_subgroup_rotate",
100-
"Adds a new instruction that enables rotating values across "
101-
"invocations within a subgroup."),
102-
clEnumValN(SPIRV::Extension::SPV_INTEL_variable_length_array,
103-
"SPV_INTEL_variable_length_array",
104-
"Allows to allocate local arrays whose number of elements "
105-
"is unknown at compile time."),
106-
clEnumValN(SPIRV::Extension::SPV_INTEL_function_pointers,
107-
"SPV_INTEL_function_pointers",
108-
"Allows translation of function pointers.")));
36+
static cl::opt<std::set<SPIRV::Extension::Extension>, false,
37+
SPIRVExtensionsParser>
38+
Extensions("spirv-ext",
39+
cl::desc("Specify list of enabled SPIR-V extensions"));
10940

11041
// Compare version numbers, but allow 0 to mean unspecified.
11142
static bool isAtLeastVer(uint32_t Target, uint32_t VerToCompareTo) {
@@ -172,8 +103,7 @@ void SPIRVSubtarget::initAvailableExtensions() {
172103
if (!isOpenCLEnv())
173104
return;
174105

175-
for (auto Extension : Extensions)
176-
AvailableExtensions.insert(Extension);
106+
AvailableExtensions.insert(Extensions.begin(), Extensions.end());
177107
}
178108

179109
// TODO: use command line args for this rather than just defaults.

llvm/test/CodeGen/SPIRV/LinkOnceODR.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_KHR_linkonce_odr %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV-EXT
2-
; TODO: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_KHR_linkonce_odr %s -o - -filetype=obj | spirv-val %}
1+
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_KHR_linkonce_odr %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV-EXT
2+
; TODO: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_KHR_linkonce_odr %s -o - -filetype=obj | spirv-val %}
33

44
; CHECK-SPIRV-EXT: Capability Linkage
55
; CHECK-SPIRV-EXT: Extension "SPV_KHR_linkonce_odr"

llvm/test/CodeGen/SPIRV/LinkOnceODRFun.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_KHR_linkonce_odr %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV-EXT
2-
; TODO: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_KHR_linkonce_odr %s -o - -filetype=obj | spirv-val %}
1+
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_KHR_linkonce_odr %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV-EXT
2+
; TODO: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_KHR_linkonce_odr %s -o - -filetype=obj | spirv-val %}
33

44
; CHECK-SPIRV-EXT: Capability Linkage
55
; CHECK-SPIRV-EXT: Extension "SPV_KHR_linkonce_odr"

llvm/test/CodeGen/SPIRV/assume.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
; RUN: llc -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_KHR_expect_assume < %s | FileCheck --check-prefixes=EXT,CHECK %s
2-
; RUN: llc -mtriple=spirv64-unknown-unknown --spirv-extensions=SPV_KHR_expect_assume < %s | FileCheck --check-prefixes=EXT,CHECK %s
1+
; RUN: llc -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_KHR_expect_assume < %s | FileCheck --check-prefixes=EXT,CHECK %s
2+
; RUN: llc -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_KHR_expect_assume < %s | FileCheck --check-prefixes=EXT,CHECK %s
33
; RUN: llc -mtriple=spirv32-unknown-unknown < %s | FileCheck --check-prefixes=NOEXT,CHECK %s
44
; RUN: llc -mtriple=spirv64-unknown-unknown < %s | FileCheck --check-prefixes=NOEXT,CHECK %s
55

llvm/test/CodeGen/SPIRV/exec_mode_float_control_khr.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefixes=SPV
2-
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s --mattr=+spirv1.3 --spirv-extensions=SPV_KHR_float_controls -o - | FileCheck %s --check-prefixes=SPVEXT
2+
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s --mattr=+spirv1.3 --spirv-ext=+SPV_KHR_float_controls -o - | FileCheck %s --check-prefixes=SPVEXT
33

44
define dso_local dllexport spir_kernel void @k_float_controls_0(i32 %ibuf, i32 %obuf) local_unnamed_addr {
55
entry:

llvm/test/CodeGen/SPIRV/expect.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
; RUN: llc -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_KHR_expect_assume < %s | FileCheck --check-prefixes=CHECK,EXT %s
2-
; RUN: llc -mtriple=spirv64-unknown-unknown --spirv-extensions=SPV_KHR_expect_assume < %s | FileCheck --check-prefixes=CHECK,EXT %s
1+
; RUN: llc -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_KHR_expect_assume < %s | FileCheck --check-prefixes=CHECK,EXT %s
2+
; RUN: llc -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_KHR_expect_assume < %s | FileCheck --check-prefixes=CHECK,EXT %s
33
; RUN: llc -mtriple=spirv32-unknown-unknown < %s | FileCheck --check-prefixes=CHECK,NOEXT %s
44
; RUN: llc -mtriple=spirv64-unknown-unknown < %s | FileCheck --check-prefixes=CHECK,NOEXT %s
55

llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_atomic_float_add/atomicrmw_faddfsub_double.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; RUN: not llc -O0 -mtriple=spirv32-unknown-unknown %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
22

3-
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_EXT_shader_atomic_float_add %s -o - | FileCheck %s
3+
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_EXT_shader_atomic_float_add %s -o - | FileCheck %s
44

55
; CHECK-ERROR: LLVM ERROR: The atomic float instruction requires the following SPIR-V extension: SPV_EXT_shader_atomic_float_add
66

llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_atomic_float_add/atomicrmw_faddfsub_float.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; RUN: not llc -O0 -mtriple=spirv32-unknown-unknown %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
22

3-
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_EXT_shader_atomic_float_add %s -o - | FileCheck %s
3+
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_EXT_shader_atomic_float_add %s -o - | FileCheck %s
44

55
; CHECK-ERROR: LLVM ERROR: The atomic float instruction requires the following SPIR-V extension: SPV_EXT_shader_atomic_float_add
66

llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_atomic_float_add/atomicrmw_faddfsub_half.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; RUN: not llc -O0 -mtriple=spirv32-unknown-unknown %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR1
2-
; RUN: not llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_EXT_shader_atomic_float_add %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR2
2+
; RUN: not llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_EXT_shader_atomic_float_add %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR2
33

4-
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_EXT_shader_atomic_float_add --spirv-extensions=SPV_EXT_shader_atomic_float16_add %s -o - | FileCheck %s
4+
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_EXT_shader_atomic_float_add,+SPV_EXT_shader_atomic_float16_add %s -o - | FileCheck %s
55

66
; CHECK-ERROR1: LLVM ERROR: The atomic float instruction requires the following SPIR-V extension: SPV_EXT_shader_atomic_float_add
77
; CHECK-ERROR2: LLVM ERROR: The atomic float instruction requires the following SPIR-V extension: SPV_EXT_shader_atomic_float16_add

llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_atomic_float_min_max/atomicrmw_fminfmax_double.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; RUN: not llc -O0 -mtriple=spirv32-unknown-unknown %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
22

3-
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_EXT_shader_atomic_float_min_max %s -o - | FileCheck %s
3+
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_EXT_shader_atomic_float_min_max %s -o - | FileCheck %s
44

55
; CHECK-ERROR: LLVM ERROR: The atomic float instruction requires the following SPIR-V extension: SPV_EXT_shader_atomic_float_min_max
66

llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_atomic_float_min_max/atomicrmw_fminfmax_float.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; RUN: not llc -O0 -mtriple=spirv32-unknown-unknown %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
22

3-
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_EXT_shader_atomic_float_min_max %s -o - | FileCheck %s
3+
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_EXT_shader_atomic_float_min_max %s -o - | FileCheck %s
44

55
; CHECK-ERROR: LLVM ERROR: The atomic float instruction requires the following SPIR-V extension: SPV_EXT_shader_atomic_float_min_max
66

llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_atomic_float_min_max/atomicrmw_fminfmax_half.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; RUN: not llc -O0 -mtriple=spirv32-unknown-unknown %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
22

3-
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_EXT_shader_atomic_float_min_max %s -o - | FileCheck %s
3+
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_EXT_shader_atomic_float_min_max %s -o - | FileCheck %s
44

55
; CHECK-ERROR: LLVM ERROR: The atomic float instruction requires the following SPIR-V extension: SPV_EXT_shader_atomic_float_min_max
66

llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_arbitrary_precision_integers.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_INTEL_arbitrary_precision_integers %s -o - | FileCheck %s
1+
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_INTEL_arbitrary_precision_integers %s -o - | FileCheck %s
22

33
define i6 @getConstantI6() {
44
ret i6 2

llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_bfloat16_conversion/bfloat16-conv-negative1.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: not llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_INTEL_bfloat16_conversion %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
1+
; RUN: not llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_INTEL_bfloat16_conversion %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
22
; CHECK-ERROR: result and argument must have the same number of components
33

44
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64"

llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_bfloat16_conversion/bfloat16-conv-negative2.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: not llc -O0 -mtriple=spirv32-unknown-unknown --spirv-extensions=SPV_INTEL_bfloat16_conversion %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
1+
; RUN: not llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_INTEL_bfloat16_conversion %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
22
; CHECK-ERROR: result and argument must have the same number of components
33

44
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64"

0 commit comments

Comments
 (0)