OSDN Git Service

nir/algebraic: Fix up extract_[iu]8 after loop unrolling
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 28 Feb 2019 03:52:12 +0000 (19:52 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 28 Mar 2019 22:35:52 +0000 (15:35 -0700)
commitc152672e68d7dacee50ab93e4bf176f6db2d49fb
tree64b3c1b6e963483e57785e65ce93235b98f82621
parentb779baa9bf95ca259779fa028a7b822bf8a17f46
nir/algebraic: Fix up extract_[iu]8 after loop unrolling

Skylake, Broadwell, and Haswell had similar results. (Skylake shown)
total instructions in shared programs: 15256840 -> 15256837 (<.01%)
instructions in affected programs: 4713 -> 4710 (-0.06%)
helped: 3
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 0.06% max: 0.08% x̄: 0.06% x̃: 0.06%

total cycles in shared programs: 372286583 -> 372286583 (0.00%)
cycles in affected programs: 198516 -> 198516 (0.00%)
helped: 1
HURT: 1
helped stats (abs) min: 10 max: 10 x̄: 10.00 x̃: 10
helped stats (rel) min: <.01% max: <.01% x̄: <.01% x̃: <.01%
HURT stats (abs)   min: 10 max: 10 x̄: 10.00 x̃: 10
HURT stats (rel)   min: 0.01% max: 0.01% x̄: 0.01% x̃: 0.01%

No changes on any other Intel platform.

v2: Use a loop to generate patterns.  Suggested by Jason.

v3: Fix a copy-and-paste bug in the extract_[ui] of ishl loop that would
replace an extract_i8 with and extract_u8.  This broke ~180 tests.  This
bug was introduced in v2.

Reviewed-by: Matt Turner <mattst88@gmail.com> [v1]
Reviewed-by: Dylan Baker <dylan@pnwbakers.com> [v2]
Acked-by: Jason Ekstrand <jason@jlekstrand.net> [v2]
src/compiler/nir/nir_opt_algebraic.py