We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9479076 commit 3fa5900Copy full SHA for 3fa5900
llvm-spirv/lib/SPIRV/libSPIRV/SPIRVInstruction.h
@@ -2799,6 +2799,12 @@ class SPIRVAtomicInstBase : public SPIRVInstTemplateBase {
2799
for (auto RC : getRequiredCapability())
2800
Module->addCapability(RC);
2801
}
2802
+
2803
+ void validate() const override {
2804
+ if (OpCode == OpAtomicCompareExchangeWeak)
2805
+ assert(this->getModule()->getSPIRVVersion() < VersionNumber::SPIRV_1_4 &&
2806
+ "OpAtomicCompareExchangeWeak is removed starting from SPIR-V 1.4");
2807
+ }
2808
};
2809
2810
class SPIRVAtomicStoreInst : public SPIRVAtomicInstBase {
0 commit comments