This patch enables divergence predicates for min/max nodes.
It makes ISD::MIN/MAX selected to S_MIN_I(U)32/S_MAX_I(U)32 or V_MIN_I(U)32_e64/V_MAX_I(U)32_e64
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Do you also need to use DivergentBinFrag on the definition of V_MIN_I32 (etc)?
defm V_MIN_I32 : VOP2Inst <"v_min_i32", VOP_PAT_GEN<VOP_I32_I32_I32>, smin>;
If you don't do that, for a uniform smin, the instruction selector could choose either S_MIN or V_MIN. Does it know that it should prefer S_MIN? How?