summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2017-07-31 19:07:42 -0700
committerMatt Turner <[email protected]>2017-08-21 14:05:23 -0700
commit3d661e60625492a0e9f7931856c7e97e2eb7ef50 (patch)
tree8bb4cb4b69ebc73fd17e45e7428fb3ede8f5ef07 /src
parent9ff7d9b85312cdfe986dcfded4aac157f441494f (diff)
i965: Test instruction compaction on all supported Gens
Note that there's no point in testing on G45, since its compaction is the same as Gen5. Same logic applies to Gen7 variants and low-power parts. Reviewed-by: Scott D Phillips <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/compiler/test_eu_compact.cpp50
1 files changed, 42 insertions, 8 deletions
diff --git a/src/intel/compiler/test_eu_compact.cpp b/src/intel/compiler/test_eu_compact.cpp
index 1ef7e5ae7f1..668a972bfa6 100644
--- a/src/intel/compiler/test_eu_compact.cpp
+++ b/src/intel/compiler/test_eu_compact.cpp
@@ -74,6 +74,13 @@ clear_pad_bits(const struct gen_device_info *devinfo, brw_inst *inst)
brw_inst_src1_reg_file(devinfo, inst) != BRW_IMMEDIATE_VALUE) {
brw_inst_set_bits(inst, 127, 111, 0);
}
+
+ if (devinfo->gen == 8 && !devinfo->is_cherryview &&
+ is_3src(devinfo, (opcode)brw_inst_opcode(devinfo, inst))) {
+ brw_inst_set_bits(inst, 105, 105, 0);
+ brw_inst_set_bits(inst, 84, 84, 0);
+ brw_inst_set_bits(inst, 36, 35, 0);
+ }
}
static bool
@@ -87,13 +94,41 @@ skip_bit(const struct gen_device_info *devinfo, brw_inst *src, int bit)
if (bit == 29)
return true;
- /* pad bit */
- if (bit == 47)
- return true;
+ if (is_3src(devinfo, (opcode)brw_inst_opcode(devinfo, src))) {
+ if (devinfo->gen >= 9 || devinfo->is_cherryview) {
+ if (bit == 127)
+ return true;
+ } else {
+ if (bit >= 126 && bit <= 127)
+ return true;
- /* pad bits */
- if (bit >= 90 && bit <= 95)
- return true;
+ if (bit == 105)
+ return true;
+
+ if (bit == 84)
+ return true;
+
+ if (bit >= 35 && bit <= 36)
+ return true;
+ }
+ } else {
+ if (bit == 47)
+ return true;
+
+ if (devinfo->gen >= 8) {
+ if (bit == 11)
+ return true;
+
+ if (bit == 95)
+ return true;
+ } else {
+ if (devinfo->gen < 7 && bit == 90)
+ return true;
+
+ if (bit >= 91 && bit <= 95)
+ return true;
+ }
+ }
/* sometimes these are pad bits. */
if (brw_inst_opcode(devinfo, src) != BRW_OPCODE_SEND &&
@@ -289,10 +324,9 @@ int
main(int argc, char **argv)
{
struct gen_device_info *devinfo = (struct gen_device_info *)calloc(1, sizeof(*devinfo));
- devinfo->gen = 6;
bool fail = false;
- for (devinfo->gen = 6; devinfo->gen <= 7; devinfo->gen++) {
+ for (devinfo->gen = 5; devinfo->gen <= 9; devinfo->gen++) {
fail |= run_tests(devinfo);
}