Skip to content

Commit

Permalink
Revert "Fix OpGroupNonUniformBroadcast version requirement (#2378)"
Browse files Browse the repository at this point in the history
This reverts commit 1d53bf4.
  • Loading branch information
sys-ce-bb committed Mar 1, 2024
1 parent 5c14376 commit bbf3800
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 45 deletions.
28 changes: 0 additions & 28 deletions llvm-spirv/lib/SPIRV/libSPIRV/SPIRVInstruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,6 @@ class SPIRVInstTemplateBase : public SPIRVInstruction {
} else
SPIRVEntry::setWordCount(WC);
Ops = TheOps;
// The required SPIR-V version depends on the operands for some
// instructions.
updateModuleVersion();
}
void setWordCount(SPIRVWord TheWordCount) override {
SPIRVEntry::setWordCount(TheWordCount);
Expand All @@ -298,11 +295,6 @@ class SPIRVInstTemplateBase : public SPIRVInstruction {

/// Get operand as value.
/// If the operand is a literal, return it as a uint32 constant.
const SPIRVValue *getOpValue(int I) const {
return isOperandLiteral(I) ? Module->getLiteralAsConstant(Ops[I])
: getValue(Ops[I]);
}

SPIRVValue *getOpValue(int I) {
return isOperandLiteral(I) ? Module->getLiteralAsConstant(Ops[I])
: getValue(Ops[I]);
Expand All @@ -323,10 +315,6 @@ class SPIRVInstTemplateBase : public SPIRVInstruction {
return Operands;
}

virtual const SPIRVValue *getOperand(unsigned I) const {
return getOpValue(I);
}

virtual SPIRVValue *getOperand(unsigned I) {
return getOpValue(I);
}
Expand Down Expand Up @@ -2515,22 +2503,6 @@ class SPIRVGroupNonUniformBallotInst : public SPIRVInstTemplateBase {
SPIRVCapVec getRequiredCapability() const override {
return getVec(CapabilityGroupNonUniformBallot);
}

SPIRVWord getRequiredSPIRVVersion() const override {
switch (OpCode) {
case OpGroupNonUniformBroadcast: {
assert(Ops.size() == 3 && "Expecting (Execution, Value, Id) operands");
if (!isConstantOpCode(getOperand(2)->getOpCode())) {
// Before version 1.5, Id must come from a constant instruction.
return static_cast<SPIRVWord>(VersionNumber::SPIRV_1_5);
}
break;
}
default:
break;
}
return static_cast<SPIRVWord>(VersionNumber::SPIRV_1_3);
}
};

#define _SPIRV_OP(x, ...) \
Expand Down
17 changes: 0 additions & 17 deletions llvm-spirv/test/transcoding/subgroup_spirv_1_5.cl

This file was deleted.

0 comments on commit bbf3800

Please sign in to comment.