Files
mesa/src/intel/Makefile.compiler.am
T
Ian Romanick 440c051340 i965/vec4/dce: Don't narrow the write mask if the flags are used
In an instruction sequence like

            cmp(8).ge.f0.0 vgrf17:D, vgrf2.xxxx:D, vgrf9.xxxx:D
    (+f0.0) sel(8) vgrf1:UD, vgrf8.xyzw:UD, vgrf1.xyzw:UD

The other fields of vgrf17 may be unused, but the CMP still needs to
generate the other flag bits.

To my surprise, nothing in shader-db or any test suite appears to hit
this.  However, I have a change to brw_vec4_cmod_propagation that
creates cases where this can happen.  This fix prevents a couple dozen
regressions in that patch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 5df88c20 ("i965/vec4: Rewrite dead code elimination to use live in/out.")
2018-12-17 13:47:06 -08:00

114 lines
4.2 KiB
Makefile

# Copyright 2015-2016 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
noinst_LTLIBRARIES += compiler/libintel_compiler.la
compiler_libintel_compiler_la_CPPFLAGS = \
-I$(top_builddir)/src/intel/compiler \
-I$(top_srcdir)/src/intel/compiler \
$(AM_CPPFLAGS)
compiler_libintel_compiler_la_SOURCES = \
$(COMPILER_FILES) \
$(COMPILER_GENERATED_FILES)
BUILT_SOURCES += $(COMPILER_GENERATED_FILES)
compiler/brw_nir_trig_workarounds.c: compiler/brw_nir_trig_workarounds.py \
$(top_srcdir)/src/compiler/nir/nir_algebraic.py
$(MKDIR_GEN)
$(AM_V_GEN) $(PYTHON) $(PYTHON_FLAGS) $(srcdir)/compiler/brw_nir_trig_workarounds.py -p $(top_srcdir)/src/compiler/nir > $@ || ($(RM) $@; false)
EXTRA_DIST += \
compiler/brw_nir_trig_workarounds.py
# ----------------------------------------------------------------------------
# Tests
# ----------------------------------------------------------------------------
TEST_LIBS = \
$(top_builddir)/src/gtest/libgtest.la \
compiler/libintel_compiler.la \
common/libintel_common.la \
dev/libintel_dev.la \
$(top_builddir)/src/compiler/nir/libnir.la \
$(top_builddir)/src/intel/isl/libisl.la \
$(top_builddir)/src/util/libmesautil.la \
$(PTHREAD_LIBS) \
$(DLOPEN_LIBS)
COMPILER_TESTS = \
compiler/test_fs_cmod_propagation \
compiler/test_fs_copy_propagation \
compiler/test_fs_saturate_propagation \
compiler/test_eu_compact \
compiler/test_eu_validate \
compiler/test_vf_float_conversions \
compiler/test_vec4_cmod_propagation \
compiler/test_vec4_copy_propagation \
compiler/test_vec4_dead_code_eliminate \
compiler/test_vec4_register_coalesce
TESTS += $(COMPILER_TESTS)
check_PROGRAMS += $(COMPILER_TESTS)
compiler_test_fs_cmod_propagation_SOURCES = \
compiler/test_fs_cmod_propagation.cpp
compiler_test_fs_cmod_propagation_LDADD = $(TEST_LIBS)
compiler_test_fs_copy_propagation_SOURCES = \
compiler/test_fs_copy_propagation.cpp
compiler_test_fs_copy_propagation_LDADD = $(TEST_LIBS)
compiler_test_fs_saturate_propagation_SOURCES = \
compiler/test_fs_saturate_propagation.cpp
compiler_test_fs_saturate_propagation_LDADD = $(TEST_LIBS)
compiler_test_vf_float_conversions_SOURCES = \
compiler/test_vf_float_conversions.cpp
compiler_test_vf_float_conversions_LDADD = $(TEST_LIBS)
compiler_test_vec4_register_coalesce_SOURCES = \
compiler/test_vec4_register_coalesce.cpp
compiler_test_vec4_register_coalesce_LDADD = $(TEST_LIBS)
compiler_test_vec4_copy_propagation_SOURCES = \
compiler/test_vec4_copy_propagation.cpp
compiler_test_vec4_copy_propagation_LDADD = $(TEST_LIBS)
compiler_test_vec4_cmod_propagation_SOURCES = \
compiler/test_vec4_cmod_propagation.cpp
compiler_test_vec4_cmod_propagation_LDADD = $(TEST_LIBS)
compiler_test_vec4_dead_code_eliminate_SOURCES = \
compiler/test_vec4_dead_code_eliminate.cpp
compiler_test_vec4_dead_code_eliminate_LDADD = $(TEST_LIBS)
# Strictly speaking this is neither a C++ test nor using gtest - we can address
# address that at a later point. Until then, this allows us a to simplify things.
compiler_test_eu_compact_SOURCES = \
compiler/test_eu_compact.cpp
compiler_test_eu_compact_LDADD = $(TEST_LIBS)
compiler_test_eu_validate_SOURCES = \
compiler/test_eu_validate.cpp
compiler_test_eu_validate_LDADD = $(TEST_LIBS)