aco: Rework int⟷float conversions
- Fixes i2f32 with large 64-bit inputs, where previously the upper 32 bits would not be taken into account
- E.g.
i2f32 0x100000000
returned 0 instead of the exactly representable floating point value1<<32
.
- E.g.
- Fixes i2f16 with large 32-bit inputs
- 32-bit inputs or larger don't return reliable results (e.g. i2f16 32768 returns -32768 currently)
- Fixes use of nonexisting conversion opcodes on GFX6/7
- Adds docstrings and assertions made throughout the conversion code
Changes on GFX8+ (tested GFX10) due to aco/isel: Fix i64/u64->float32 conversion for large inputs
:
Totals from 3 (0.00% of 146401) affected shaders in rage2:
CodeSize: 21164 -> 21308 (+0.68%)
Instrs: 4062 -> 4086 (+0.59%)
Latency: 20429 -> 21231 (+3.93%)
InvThroughput: 3811 -> 4521 (+18.63%)
Changes on GFX6 (Oland):
Totals from 3 (0.00% of 147787) affected shaders in rage2:
CodeSize: 21328 -> 21472 (+0.68%)
Instrs: 4290 -> 4314 (+0.56%)
Latency: 22541 -> 23162 (+2.75%)
InvThroughput: 8762 -> 9392 (+7.19%)
Edited by Tony Wasserka