mesa/src/intel/compiler
Ian Romanick 9a83c3d3b3 i965/fs: Eliminate unary op on operand of compare-with-zero
The (-abs(x) >= 0) => (x == 0) optimization is removed from the vec4 and
scalar parts. In the VS part, adding the new pattern was not
helpful. The pattern that is removed is really old, and it has been
handled by NIR for ages.

All Gen7+ platforms had similar results. (Broadwell shown)
total instructions in shared programs: 14715715 -> 14715709 (<.01%)
instructions in affected programs: 474 -> 468 (-1.27%)
helped: 6
HURT: 0
helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
helped stats (rel) min: 1.12% max: 1.35% x̄: 1.28% x̃: 1.35%
95% mean confidence interval for instructions value: -1.00 -1.00
95% mean confidence interval for instructions %-change: -1.40% -1.15%
Instructions are helped.

total cycles in shared programs: 559569911 -> 559569809 (<.01%)
cycles in affected programs: 5963 -> 5861 (-1.71%)
helped: 6
HURT: 0
helped stats (abs) min: 16 max: 18 x̄: 17.00 x̃: 17
helped stats (rel) min: 1.45% max: 1.88% x̄: 1.73% x̃: 1.85%
95% mean confidence interval for cycles value: -18.15 -15.85
95% mean confidence interval for cycles %-change: -1.95% -1.51%
Cycles are helped.

Iron Lake and Sandy Bridge had similar results. (Iron Lake shown)
total instructions in shared programs: 7780915 -> 7780913 (<.01%)
instructions in affected programs: 246 -> 244 (-0.81%)
helped: 2
HURT: 0

total cycles in shared programs: 177876108 -> 177876106 (<.01%)
cycles in affected programs: 3636 -> 3634 (-0.06%)
helped: 1
HURT: 0

GM45
total instructions in shared programs: 4799152 -> 4799151 (<.01%)
instructions in affected programs: 126 -> 125 (-0.79%)
helped: 1
HURT: 0

total cycles in shared programs: 122052654 -> 122052652 (<.01%)
cycles in affected programs: 3640 -> 3638 (-0.05%)
helped: 1
HURT: 0

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
2018-12-17 13:47:06 -08:00
..
.gitignore
brw_cfg.cpp intel/cfg: Represent divergent control flow paths caused by non-uniform loop execution. 2017-12-07 18:27:05 -08:00
brw_cfg.h intel/compiler: consistently use ifndef guards over pragma once 2017-03-22 16:55:22 +00:00
brw_clip.h i965: Move clip program compilation to the compiler 2017-05-26 07:58:01 -07:00
brw_clip_line.c i965: Move clip program compilation to the compiler 2017-05-26 07:58:01 -07:00
brw_clip_point.c i965: Move clip program compilation to the compiler 2017-05-26 07:58:01 -07:00
brw_clip_tri.c i965: Don't emit MOVs with undefined registers for Gen4 point clipping. 2018-02-28 15:03:51 -08:00
brw_clip_unfilled.c i965: Move clip program compilation to the compiler 2017-05-26 07:58:01 -07:00
brw_clip_util.c i965: Move clip program compilation to the compiler 2017-05-26 07:58:01 -07:00
brw_compile_clip.c i965: Rewrite disassembly annotation code 2017-11-17 12:14:38 -08:00
brw_compile_sf.c i965: Move SF compilation to the compiler 2017-05-26 07:58:01 -07:00
brw_compiler.c intel,nir: Move gl_LocalInvocationID lowering to nir_lower_system_values 2018-11-19 09:57:41 -06:00
brw_compiler.h i965: Do NIR shader cloning in the caller. 2018-11-20 15:53:46 -08:00
brw_dead_control_flow.cpp
brw_dead_control_flow.h intel/compiler: consistently use ifndef guards over pragma once 2017-03-22 16:55:22 +00:00
brw_disasm.c intel/compiler: Always print flag subregister number 2018-12-10 10:07:11 -08:00
brw_disasm_info.c intel/compiler: Silence unused parameter warnings 2018-08-22 20:31:32 -07:00
brw_disasm_info.h i965: Stop including brw_cfg.h in brw_disasm_info.h 2017-11-17 21:51:16 -08:00
brw_eu.c intel/eu: print bytes instead of 32 bit hex value 2018-08-27 11:07:39 -07:00
brw_eu.h intel/compiler: Silence unused parameter warnings in brw_eu.h 2018-08-28 15:35:38 -07:00
brw_eu_compact.c intel/compiler: Add instruction compaction support on Gen11 2018-02-28 11:15:47 -08:00
brw_eu_defines.h intel/fs: Support min_lod parameters on texture instructions 2018-12-11 21:26:23 -06:00
brw_eu_emit.c intel/compiler: Set swizzle to BRW_SWIZZLE_XXXX for scalar region 2018-12-10 10:06:55 -08:00
brw_eu_util.c intel/compiler: whitespace cleanups 2017-03-13 11:16:35 +00:00
brw_eu_validate.c intel/compiler: relax brw_eu_validate for byte raw movs 2018-07-10 00:14:49 +02:00
brw_fs.cpp i965/fs: Eliminate unary op on operand of compare-with-zero 2018-12-17 13:47:06 -08:00
brw_fs.h intel/fs,vec4: Clean up a repeated pattern with SSBOs 2018-11-08 10:09:06 -06:00
brw_fs_bank_conflicts.cpp i965/fs: unspills shoudn't use grf127 as dest since Gen8+ 2018-07-12 18:02:26 +02:00
brw_fs_builder.h intel/fs: Prevent emission of IR instructions not aligned to their own execution size. 2018-11-09 19:39:22 -08:00
brw_fs_cmod_propagation.cpp i965/fs: Don't propagate conditional modifiers from integer compares to adds 2018-09-17 00:38:22 -07:00
brw_fs_combine_constants.cpp
brw_fs_copy_propagation.cpp intel/compiler: do not copy-propagate strided regions to ddx/ddy arguments 2018-12-12 08:09:45 +01:00
brw_fs_cse.cpp intel/fs: Replace the CINTERP opcode with a simple MOV 2018-05-29 15:44:50 -07:00
brw_fs_dead_code_eliminate.cpp intel/compiler: Implement untyped atomic float min, max, and compare-swap dataport messages 2018-08-22 20:31:32 -07:00
brw_fs_generator.cpp intel/compiler: Change src1 reg type to unsigned doubleword 2018-10-23 12:44:24 -07:00
brw_fs_live_variables.cpp intel/fs: Restrict live intervals to the subset possibly reachable from any definition. 2017-12-07 18:27:04 -08:00
brw_fs_live_variables.h intel/fs: Restrict live intervals to the subset possibly reachable from any definition. 2017-12-07 18:27:04 -08:00
brw_fs_lower_conversions.cpp intel/compiler: fix lower conversions to account for predication 2018-07-27 14:48:29 +02:00
brw_fs_lower_pack.cpp
brw_fs_nir.cpp nir: Rename Boolean-related opcodes to include 32 in the name 2018-12-16 21:03:02 +00:00
brw_fs_reg_allocate.cpp intel/compiler: fix node interference of simd16 instructions 2018-11-09 08:22:08 +01:00
brw_fs_register_coalesce.cpp
brw_fs_saturate_propagation.cpp i965/fs: Handle negating immediates on MADs when propagating saturates 2017-11-21 10:13:07 -08:00
brw_fs_sel_peephole.cpp intel/compiler: fix register allocation in opt_peephole_sel 2018-11-28 08:28:27 +01:00
brw_fs_surface_builder.cpp intel/compiler: Do image load/store lowering to NIR 2018-08-29 14:04:02 -05:00
brw_fs_surface_builder.h intel/compiler: Do image load/store lowering to NIR 2018-08-29 14:04:02 -05:00
brw_fs_validate.cpp intel: disable FS IR validation in release mode. 2018-10-15 18:10:27 -07:00
brw_fs_visitor.cpp intel/compiler/icl: Use barrier id bits 24:30 instead of 24:27,31 2018-09-25 09:59:59 +03:00
brw_inst.h intel/compiler: Expand untyped atomic message type field by a bit 2018-08-22 20:31:32 -07:00
brw_interpolation_map.c
brw_ir_allocator.h intel/ir: Don't allow allocating zero registers 2018-12-11 21:26:23 -06:00
brw_ir_fs.h intel: Don't propagate conditional modifiers if a UD source is negated 2018-10-10 13:13:12 -05:00
brw_ir_vec4.h intel: Don't propagate conditional modifiers if a UD source is negated 2018-10-10 13:13:12 -05:00
brw_nir.c nir: Add a bool to int32 lowering pass 2018-12-16 21:03:02 +00:00
brw_nir.h intel/compiler: Lower SSBO and shared loads/stores in NIR 2018-11-15 19:59:49 -06:00
brw_nir_analyze_boolean_resolves.c nir: Rename Boolean-related opcodes to include 32 in the name 2018-12-16 21:03:02 +00:00
brw_nir_analyze_ubo_ranges.c intel/analyze_ubo_ranges: Use nir_src_is_const and friends 2018-11-08 10:09:25 -06:00
brw_nir_attribute_workarounds.c i965: Drop support for the legacy SNORM -> Float equation. 2018-01-02 16:51:42 -08:00
brw_nir_lower_cs_intrinsics.c intel,nir: Move gl_LocalInvocationID lowering to nir_lower_system_values 2018-11-19 09:57:41 -06:00
brw_nir_lower_image_load_store.c nir: Move intel's half-float image store lowering to to nir_format.h. 2018-12-13 12:24:26 -08:00
brw_nir_lower_mem_access_bit_sizes.c intel/compiler: Lower SSBO and shared loads/stores in NIR 2018-11-15 19:59:49 -06:00
brw_nir_opt_peephole_ffma.c
brw_nir_tcs_workarounds.c util: use C99 declaration in the for-loop set_foreach() macro 2018-10-25 12:43:18 +01:00
brw_nir_trig_workarounds.py python: Use the print function 2018-07-06 10:04:22 -07:00
brw_packed_float.c
brw_predicated_break.cpp
brw_reg.h intel: Don't propagate conditional modifiers if a UD source is negated 2018-10-10 13:13:12 -05:00
brw_reg_type.c intel/compiler: Check for unsupported register sizes. 2018-03-16 09:27:16 -07:00
brw_reg_type.h intel/compiler: Add Gen11+ native float type 2018-02-28 11:15:47 -08:00
brw_schedule_instructions.cpp intel/compiler: Implement untyped atomic float min, max, and compare-swap dataport messages 2018-08-22 20:31:32 -07:00
brw_shader.cpp i965: Do NIR shader cloning in the caller. 2018-11-20 15:53:46 -08:00
brw_shader.h i965/fs: Add 64-bit int immediate support to dump_instructions() 2018-10-16 17:48:17 -07:00
brw_vec4.cpp i965/fs: Eliminate unary op on operand of compare-with-zero 2018-12-17 13:47:06 -08:00
brw_vec4.h intel/fs,vec4: Clean up a repeated pattern with SSBOs 2018-11-08 10:09:06 -06:00
brw_vec4_builder.h intel/compiler: Lower flrp32 on Gen11+ 2018-02-28 11:15:47 -08:00
brw_vec4_cmod_propagation.cpp i965/vec4: Don't cmod propagate from CMP to ADD if the writemask isn't compatible 2018-07-02 19:19:16 -07:00
brw_vec4_copy_propagation.cpp i965: Support copy propagating of untyped atomic surface indexes. 2017-09-26 15:35:14 -07:00
brw_vec4_cse.cpp i965/vec4: Allow CSE on subset VF constant loads 2018-03-08 15:26:26 -08:00
brw_vec4_dead_code_eliminate.cpp i965/vec4/dce: Don't narrow the write mask if the flags are used 2018-12-17 13:47:06 -08:00
brw_vec4_generator.cpp i965/vec4: Correctly handle uniform sources in generate_tes_add_indirect_urb_offset 2018-09-01 00:23:43 -07:00
brw_vec4_gs_nir.cpp intel/vec4: Use the new nir_src_is_const and friends 2018-11-08 10:09:25 -06:00
brw_vec4_gs_visitor.cpp intel/compiler: Use nir's info when checking uses_streams. 2018-11-28 13:35:29 -08:00
brw_vec4_gs_visitor.h i965/vec4: Delete the system value infastructure 2017-05-09 15:08:07 -07:00
brw_vec4_live_variables.cpp
brw_vec4_live_variables.h i965/vec4: consider subregister offset in live variables 2017-04-14 14:56:08 -07:00
brw_vec4_nir.cpp nir: Rename Boolean-related opcodes to include 32 in the name 2018-12-16 21:03:02 +00:00
brw_vec4_reg_allocate.cpp i965/vec4: Return float from spill_cost_for_type() 2017-08-21 14:45:44 -07:00
brw_vec4_surface_builder.cpp i965/vec4: Fix swizzles on atomic sources. 2017-09-26 15:35:11 -07:00
brw_vec4_surface_builder.h
brw_vec4_tcs.cpp i965: Do NIR shader cloning in the caller. 2018-11-20 15:53:46 -08:00
brw_vec4_tcs.h i965/vec4: Delete the system value infastructure 2017-05-09 15:08:07 -07:00
brw_vec4_tes.cpp i965/vec4: Clamp indirect tes input array reads with 0x0fffffff 2018-09-01 00:23:45 -07:00
brw_vec4_tes.h i965/vec4: Delete the system value infastructure 2017-05-09 15:08:07 -07:00
brw_vec4_visitor.cpp i965: Allow only one slot of clip distances to be set on Gen4-5. 2018-11-19 14:33:16 -08:00
brw_vec4_vs.h i965: Drop support for the legacy SNORM -> Float equation. 2018-01-02 16:51:42 -08:00
brw_vec4_vs_visitor.cpp i965: Drop support for the legacy SNORM -> Float equation. 2018-01-02 16:51:42 -08:00
brw_vue_map.c
brw_wm_iz.cpp intel/fs: Extend thread payload layout to SIMD32 2018-06-28 13:19:38 -07:00
gen6_gs_visitor.cpp i965/gen6/gs: Handle case where a GS doesn't allocate VUE 2018-06-26 08:18:55 +02:00
gen6_gs_visitor.h
meson.build i965/vec4/dce: Don't narrow the write mask if the flags are used 2018-12-17 13:47:06 -08:00
test_eu_compact.cpp intel/ir: Fix invalid type aliasing with undefined behavior in test_eu_compact. 2018-02-27 11:42:39 -08:00
test_eu_validate.cpp intel: Introducing Whiskey Lake platform 2018-10-11 10:02:40 -07:00
test_fs_cmod_propagation.cpp i965/fs: Propagate conditional modifiers from compares to adds 2018-03-26 08:50:43 -07:00
test_fs_copy_propagation.cpp
test_fs_saturate_propagation.cpp i965/fs: Check ADD/MAD with immediates in satprop unit test 2017-11-21 10:13:07 -08:00
test_vec4_cmod_propagation.cpp i965/vec4: Silence unused parameter warnings in vec4 compiler tests 2018-12-17 13:47:06 -08:00
test_vec4_copy_propagation.cpp i965/vec4: Silence unused parameter warnings in vec4 compiler tests 2018-12-17 13:47:06 -08:00
test_vec4_dead_code_eliminate.cpp i965/vec4/dce: Don't narrow the write mask if the flags are used 2018-12-17 13:47:06 -08:00
test_vec4_register_coalesce.cpp i965/vec4: Silence unused parameter warnings in vec4 compiler tests 2018-12-17 13:47:06 -08:00
test_vf_float_conversions.cpp