We also have never handled this for SelectionDAG, which needs
additional work.
Details
Diff Detail
Event Timeline
There's an annoying asymmetry where we have signed saturating for
packed operations, but not for scalar 16-bit.
My Vega Instruction Set Architecture Reference Guide says:
"V_ADD_I16
D.i16 = S0.i16 + S1.i16.
Supports saturation (signed 16-bit integer domain)."
The same text is in the GFX10 "RDNA 1.0 Instruction Set Architecture Reference Guide" too, but with the instructions renamed to v_add_nc_i16 and v_add_nc_u16.
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp | ||
---|---|---|
424 | I don't think this change has any effect, does it? This whole hunk already makes loads of assumptions about which features were introduced at the same time as other features. | |
llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h | ||
589 ↗ | (On Diff #278055) | What does this name mean? My understanding is that gfx9 (a) added add/sub instructions with no carry-out and (b) added "i16" and "i32" add/sub instructions (which let you do signed saturation). But I'm not sure how to parse "NoCarryAddSubSat". Maybe at least add a comment? |
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp | ||
---|---|---|
424 | If you were directly specifying subtarget target features, yes. If you fallback to the base path I would expect everything to work if not be ideal | |
llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h | ||
589 ↗ | (On Diff #278055) | I guess I can logically lump all of these with the no carry instructions |
I don't think this change has any effect, does it? This whole hunk already makes loads of assumptions about which features were introduced at the same time as other features.