Reject integer atomicrmw operations without a SPIR-V opcode #4064
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 201 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.318
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4064"
general
weight: 0.35
MrSidims
The writer decides whether an integer
atomicrmwis supported with a deny list (nand, and since #3964uinc_wrap/udec_wrap). Every other integer operation is assumed to have an entry inLLVMSPIRVAtomicRmwOpCodeMap, butusub_condandusub_satdon't.SPIRVMap::mapthen returns a default opcode that has no instruction factory, and the translator crashes (a call through a null pointer, or theInvalid keyassertion in builds with assertions) instead of reporting an error:This PR replaces the deny list with a lookup in the opcode map: an operation is supported iff it has an opcode, or it is
fsub, which has no map entry and is lowered throughOpFNegate+OpAtomicFAddEXT. That accepts the same floating-point operations as before (fadd,fsub,fmin,fmax) and exactly the integer operations with an opcode. Anything else, including operations LLVM adds in the future, gets the usualInvalidInstruction: ... Atomic usub_sat is not supported in SPIR-V!diagnostic. AMD targets are unaffected: there, SPIRVRegularizeLLVM rewritesuinc_wrap/udec_wrapinto helper calls before the writer sees them.The new test
negative/atomicrmw-unsupported-int.llcoversusub_condandusub_sat(nand,uinc_wrapandudec_wrapare already covered by existing tests). It fails without the change and passes with it. The rest of the lit suite gives the same results with and without the change.