Skip to content

nir,aco: add and use nir_opt_apply_nuw_to_offsets

Rhys Perry requested to merge pendingchaos/mesa:nir_aco_smem_add_combine into master

This adds a simple unsigned value range analysis helper. This helper is used in a new pass (nir_opt_apply_nuw_to_offsets) for setting no_unsigned_wrap on additions used for some loads/stores, which is needed in some cases for the backend to correctly combine them into the load/store.

This then uses the new pass in ACO to fix dEQP-VK.transform_feedback.simple.multistreams_1 and dEQP-VK.transform_feedback.simple.multistreams_3

shader-db for this series (Navi):

Totals from 21435 (17.08% of 125503) affected shaders:
SGPRs: 1567832 -> 1563120 (-0.30%); split: -0.42%, +0.12%
VGPRs: 1020216 -> 1020208 (-0.00%)
CodeSize: 113402684 -> 113934532 (+0.47%); split: -0.02%, +0.49%
Instrs: 22036773 -> 22131415 (+0.43%); split: -0.03%, +0.46%
Cycles: 1898251896 -> 1899284032 (+0.05%); split: -0.04%, +0.10%
VMEM: 8678259 -> 8749717 (+0.82%); split: +0.87%, -0.05%
SMEM: 1111644 -> 1146272 (+3.12%); split: +3.23%, -0.11%
VClause: 357624 -> 357693 (+0.02%); split: -0.02%, +0.04%
SClause: 718474 -> 768140 (+6.91%); split: -0.03%, +6.94%
Copies: 2498099 -> 2494649 (-0.14%); split: -0.34%, +0.20%
Branches: 776905 -> 776948 (+0.01%); split: -0.02%, +0.02%
PreSGPRs: 1159997 -> 1160383 (+0.03%)
Edited by Rhys Perry

Merge request reports

Loading