Skip to content

Commit 1c49dd0

Browse files
committed
Bug fix
1 parent ecb8d1e commit 1c49dd0

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

llvm/lib/Target/DirectX/DXIL.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ class DXILOp {
309309
list<LLVMType> result = [];
310310

311311
// List of constraints predicated on Shader Model version.
312-
// If no contraints are specified,
312+
// If no constraints are specified,
313313
// a) operation is assumed to be supported in Shader Model 6.0 and later.
314314
// b) has no overload types
315315
// c) is supported in all shader stage kinds

llvm/utils/TableGen/DXILEmitter.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,22 +299,22 @@ static std::string getOverloadKindStr(const Record *R) {
299299
static std::string getConstraintString(const SmallVector<Record *> Recs) {
300300
std::string ConstraintString = "";
301301
std::string Prefix = "";
302-
ConstraintString.append("{{");
302+
ConstraintString.append("{");
303303
// If no constraints were specified, assume the operation
304304
// a) to be supported in SM 6.0 and later
305305
// b) has no overload types
306306
// c) is supported in all shader stage kinds
307307
if (Recs.empty()) {
308308
ConstraintString.append(
309-
"{6, 0}, OverloadKind::UNDEFINED, ShaderKind::allKinds}");
309+
"{{6, 0}, OverloadKind::UNDEFINED, ShaderKind::allKinds}}");
310310
}
311311
for (auto ConstrRec : Recs) {
312312
auto SMConstrRec = ConstrRec->getValueAsDef("pred");
313313
unsigned Major =
314314
SMConstrRec->getValueAsDef("sm_version")->getValueAsInt("Major");
315315
unsigned Minor =
316316
SMConstrRec->getValueAsDef("sm_version")->getValueAsInt("Minor");
317-
ConstraintString.append("{")
317+
ConstraintString.append(Prefix).append("{{")
318318
.append(std::to_string(Major))
319319
.append(", ")
320320
.append(std::to_string(Minor).append("}, "));
@@ -364,6 +364,7 @@ static std::string getConstraintString(const SmallVector<Record *> Recs) {
364364
.append(", ")
365365
.append(StageMaskString);
366366
ConstraintString.append("}");
367+
Prefix = ", ";
367368
}
368369
ConstraintString.append("}");
369370
return ConstraintString;

0 commit comments

Comments
 (0)