Skip to content

Commit bbf3800

Browse files
committed
Revert "Fix OpGroupNonUniformBroadcast version requirement (#2378)"
This reverts commit 1d53bf4.
1 parent 5c14376 commit bbf3800

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

llvm-spirv/lib/SPIRV/libSPIRV/SPIRVInstruction.h

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,6 @@ class SPIRVInstTemplateBase : public SPIRVInstruction {
276276
} else
277277
SPIRVEntry::setWordCount(WC);
278278
Ops = TheOps;
279-
// The required SPIR-V version depends on the operands for some
280-
// instructions.
281-
updateModuleVersion();
282279
}
283280
void setWordCount(SPIRVWord TheWordCount) override {
284281
SPIRVEntry::setWordCount(TheWordCount);
@@ -298,11 +295,6 @@ class SPIRVInstTemplateBase : public SPIRVInstruction {
298295

299296
/// Get operand as value.
300297
/// If the operand is a literal, return it as a uint32 constant.
301-
const SPIRVValue *getOpValue(int I) const {
302-
return isOperandLiteral(I) ? Module->getLiteralAsConstant(Ops[I])
303-
: getValue(Ops[I]);
304-
}
305-
306298
SPIRVValue *getOpValue(int I) {
307299
return isOperandLiteral(I) ? Module->getLiteralAsConstant(Ops[I])
308300
: getValue(Ops[I]);
@@ -323,10 +315,6 @@ class SPIRVInstTemplateBase : public SPIRVInstruction {
323315
return Operands;
324316
}
325317

326-
virtual const SPIRVValue *getOperand(unsigned I) const {
327-
return getOpValue(I);
328-
}
329-
330318
virtual SPIRVValue *getOperand(unsigned I) {
331319
return getOpValue(I);
332320
}
@@ -2515,22 +2503,6 @@ class SPIRVGroupNonUniformBallotInst : public SPIRVInstTemplateBase {
25152503
SPIRVCapVec getRequiredCapability() const override {
25162504
return getVec(CapabilityGroupNonUniformBallot);
25172505
}
2518-
2519-
SPIRVWord getRequiredSPIRVVersion() const override {
2520-
switch (OpCode) {
2521-
case OpGroupNonUniformBroadcast: {
2522-
assert(Ops.size() == 3 && "Expecting (Execution, Value, Id) operands");
2523-
if (!isConstantOpCode(getOperand(2)->getOpCode())) {
2524-
// Before version 1.5, Id must come from a constant instruction.
2525-
return static_cast<SPIRVWord>(VersionNumber::SPIRV_1_5);
2526-
}
2527-
break;
2528-
}
2529-
default:
2530-
break;
2531-
}
2532-
return static_cast<SPIRVWord>(VersionNumber::SPIRV_1_3);
2533-
}
25342506
};
25352507

25362508
#define _SPIRV_OP(x, ...) \

llvm-spirv/test/transcoding/subgroup_spirv_1_5.cl

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)