[hsw][bisected][regression] dEQP-VK.reconvergence.*nesting* failures
Issues began with mesa=e43007af:
Author: Rhys Perry <pendingchaos02@gmail.com>
Date: Wed Aug 18 19:08:54 2021 +0100
nir/opt_if: add opt_if_rewrite_uniform_uses
Turns:
if (a == (b=readfirstlane(a)))
use(a)
into:
if (a == (b=readfirstlane(a)))
use(b)
Improves divergence analysis and lets us scalarize use(a). Improves
Cyberpunk 2077 performance.
fossil-db (Sienna Cichlid, Cyberpunk 2077):
Totals from 57 (10.56% of 540) affected shaders:
VGPRs: 4904 -> 4040 (-17.62%)
CodeSize: 624360 -> 626828 (+0.40%); split: -0.06%, +0.46%
MaxWaves: 656 -> 824 (+25.61%)
Instrs: 119770 -> 119447 (-0.27%); split: -0.49%, +0.22%
Latency: 1950256 -> 1633110 (-16.26%); split: -16.26%, +0.00%
InvThroughput: 364852 -> 292089 (-19.94%)
VClause: 1512 -> 1008 (-33.33%)
SClause: 2693 -> 3196 (+18.68%)
Copies: 10050 -> 9955 (-0.95%); split: -3.34%, +2.40%
Branches: 3476 -> 3547 (+2.04%)
PreSGPRs: 4003 -> 5076 (+26.80%)
PreVGPRs: 4709 -> 3810 (-19.09%)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12472>
@idr bisected this as leading to this problem. stderr shows an assertion failure for these tests (https://mesa-ci.01.org/vulkancts/builds/22580/results/10272614484):
deqp-vk: ../src/intel/compiler/brw_fs_generator.cpp:2728: int fs_generator::generate_code(const cfg_t*, int, shader_stats, const brw::performance&, brw_compile_stats*): Assertion `p->next_insn_offset == last_insn_offset + 16 || !"conditional_mod, no_dd_check, or no_dd_clear set for IR " "emitting more than 1 instruction"' failed.