Skip to content

Commit

Permalink
extend spirv-max-version option to versions 1.2 and 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
aratajew authored and AlexeySotkin committed May 26, 2020
1 parent da93f29 commit 54bcbf2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/SPIRV/OCL20ToSPIRV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -953,8 +953,7 @@ void OCL20ToSPIRV::visitCallGroupBuiltin(CallInst *CI,
.Case("ballot_exclusive_scan", "add")
.Default(FuncName.take_back(
3)); // assumes op is three characters
if (GroupOp.startswith("_"))
GroupOp = GroupOp.take_back(2); // when op is two characters
GroupOp.consume_front("_"); // when op is two characters
assert(!GroupOp.empty() && "Invalid OpenCL group builtin function");
char OpTyC = 0;
auto OpTy = F->getReturnType();
Expand Down
4 changes: 3 additions & 1 deletion tools/llvm-spirv/llvm-spirv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ static cl::opt<VersionNumber> MaxSPIRVVersion(
"spirv-max-version",
cl::desc("Choose maximum SPIR-V version which can be emitted"),
cl::values(clEnumValN(VersionNumber::SPIRV_1_0, "1.0", "SPIR-V 1.0"),
clEnumValN(VersionNumber::SPIRV_1_1, "1.1", "SPIR-V 1.1")),
clEnumValN(VersionNumber::SPIRV_1_1, "1.1", "SPIR-V 1.1"),
clEnumValN(VersionNumber::SPIRV_1_2, "1.2", "SPIR-V 1.2"),
clEnumValN(VersionNumber::SPIRV_1_3, "1.3", "SPIR-V 1.3")),
cl::init(VersionNumber::MaximumVersion));

static cl::list<std::string>
Expand Down

0 comments on commit 54bcbf2

Please sign in to comment.