summaryrefslogtreecommitdiffstats
path: root/src/intel/compiler/brw_ir_fs.h
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2019-01-16 18:30:08 -0800
committerFrancisco Jerez <[email protected]>2019-02-21 14:07:25 -0800
commitc3c27762f787a93ee3f27189bef8d7cdcb3a6cab (patch)
treeaa51a2a70d64104ff31b4746d79e5cc5aa37b4e6 /src/intel/compiler/brw_ir_fs.h
parentd9e08e753bf4125edcdb561bbe80547999eb8e32 (diff)
intel/fs: Exclude control sources from execution type and region alignment calculations.
Currently the execution type calculation will return a bogus value in cases like: mov_indirect(8) vgrf0:w, vgrf1:w, vgrf2:ud, 32u Which will be considered to have a 32-bit integer execution type even though the actual indirect move operation will be carried out with 16-bit precision. Similarly there's no need to apply the CHV/BXT double-precision region alignment restrictions to such control sources, since they aren't directly involved in the double-precision arithmetic operations emitted by these virtual instructions. Applying the CHV/BXT restrictions to control sources was expected to be harmless if mildly inefficient, but unfortunately it exposed problems at codegen level for virtual instructions (namely the SHUFFLE instruction used for the Vulkan 1.1 subgroup feature) that weren't prepared to accept control sources with an arbitrary strided region. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109328 Reported-by: Mark Janes <[email protected]> Fixes: efa4e4bc5fc "intel/fs: Introduce regioning lowering pass." Tested-by: Anuj Phogat <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_ir_fs.h')
-rw-r--r--src/intel/compiler/brw_ir_fs.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_ir_fs.h b/src/intel/compiler/brw_ir_fs.h
index d05357e822e..c4427a658b0 100644
--- a/src/intel/compiler/brw_ir_fs.h
+++ b/src/intel/compiler/brw_ir_fs.h
@@ -358,6 +358,13 @@ public:
bool has_source_and_destination_hazard() const;
/**
+ * Return whether \p arg is a control source of a virtual instruction which
+ * shouldn't contribute to the execution type and usual regioning
+ * restriction calculations of arithmetic instructions.
+ */
+ bool is_control_source(unsigned arg) const;
+
+ /**
* Return the subset of flag registers read by the instruction as a bitset
* with byte granularity.
*/
@@ -461,7 +468,8 @@ get_exec_type(const fs_inst *inst)
brw_reg_type exec_type = BRW_REGISTER_TYPE_B;
for (int i = 0; i < inst->sources; i++) {
- if (inst->src[i].file != BAD_FILE) {
+ if (inst->src[i].file != BAD_FILE &&
+ !inst->is_control_source(i)) {
const brw_reg_type t = get_exec_type(inst->src[i].type);
if (type_sz(t) > type_sz(exec_type))
exec_type = t;