diff options
author | Henry Linjamäki <henry.linjamaki@parmance.com> | 2017-11-16 17:20:45 +0000 |
---|---|---|
committer | Pekka Jääskeläinen <visit0r@gcc.gnu.org> | 2017-11-16 17:20:45 +0000 |
commit | dc03239c2d8607a0f5cdb13a220bcf0c7f8ed7cd (patch) | |
tree | f2316102f532f913f50ba2931a318058c4bc88e0 /gcc/testsuite/brig.dg/test/gimple/packed.hsail | |
parent | 35a282e0bc285f2b62dd29220a6ef3a3ed87a0b3 (diff) | |
download | gcc-dc03239c2d8607a0f5cdb13a220bcf0c7f8ed7cd.zip gcc-dc03239c2d8607a0f5cdb13a220bcf0c7f8ed7cd.tar.gz gcc-dc03239c2d8607a0f5cdb13a220bcf0c7f8ed7cd.tar.bz2 |
[BRIGFE] Reduce the number of type conversions due to
the untyped HSAIL regs.
Instead of always representing the HSAIL's untyped registers as
unsigned int, the gccbrig now pre-analyzes the BRIG code and
builds the register variables as a type used the most when storing
or reading data to/from each register. This reduces the total
conversions which cannot be always optimized away.
From-SVN: r254837
Diffstat (limited to 'gcc/testsuite/brig.dg/test/gimple/packed.hsail')
-rw-r--r-- | gcc/testsuite/brig.dg/test/gimple/packed.hsail | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/gcc/testsuite/brig.dg/test/gimple/packed.hsail b/gcc/testsuite/brig.dg/test/gimple/packed.hsail index 9219ffd4..4cba5fc 100644 --- a/gcc/testsuite/brig.dg/test/gimple/packed.hsail +++ b/gcc/testsuite/brig.dg/test/gimple/packed.hsail @@ -42,7 +42,7 @@ prog kernel &Kernel(kernarg_u64 %input_ptr, kernarg_u64 %output_ptr) ret; }; -/* The b128 load is done using uint128_t*. +/* The b128 load is done using uint128_t*. */ /* { dg-final { scan-tree-dump "q0 = VIEW_CONVERT_EXPR<uint128_t>\\\(mem_read.\[0-9\]+\\\);" "original"} } */ /* Before arithmetics, the uint128_t is casted to a vector datatype. */ @@ -52,27 +52,25 @@ prog kernel &Kernel(kernarg_u64 %input_ptr, kernarg_u64 %output_ptr) /* in comparison to the HSAIL syntax. */ /* { dg-final { scan-tree-dump "\\\+ { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 }" "original"} } */ -/* After arithmetics, the vector DT is casted back to a uint128_t. */ -/* { dg-final { scan-tree-dump "q1 = VIEW_CONVERT_EXPR<uint128_t>" "original"} } */ - /* Broadcasted the constant vector's lowest element and summed it up in the next line. */ -/* { dg-final { scan-tree-dump "= { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 };\[\n \]+_\[0-9\]+ = _\[0-9\]+ \\\+ _\[0-9\]+;" "gimple"} } */ +/* { dg-final { scan-tree-dump "= { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 };\[\n \]+\[a-z0-9_\]+ = \[a-z0-9_\]+ \\\+ \[a-z0-9_\]+;" "gimple"} } */ /* Broadcasted the registers lowest element via a VEC_PERM_EXPR that has an all-zeros mask. */ -/* { dg-final { scan-tree-dump "VEC_PERM_EXPR <_\[0-9\]+, _\[0-9\]+, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }>;" "gimple" } } */ +/* { dg-final { scan-tree-dump "VEC_PERM_EXPR <\[a-z0-9_\]+, \[a-z0-9_\]+, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }>;" "gimple" } } */ /* For the add_ss we assume performing the computation over the whole vector is cheaper than */ /* extracting the scalar and performing a scalar operation. This aims to stay in the vector /* datapath as long as possible. */ -/* { dg-final { scan-tree-dump "_\[0-9\]+ = VIEW_CONVERT_EXPR<vector\\\(16\\\) unsigned char>\\\(q2\\\);\[\n \]+_\[0-9\]+ = VIEW_CONVERT_EXPR<vector\\\(16\\\) unsigned char>\\\(q3\\\);\[\n \]+_\[0-9\]+ = _\[0-9\]+ \\\+ _\[0-9\]+;" "gimple" } } */ +/* { dg-final { scan-tree-dump "_\[0-9\]+ = q2 \\\+ q3;" "gimple" } } */ /* Insert the lowest element of the result to the lowest element of the result register. */ -/* { dg-final { scan-tree-dump "= VEC_PERM_EXPR <_\[0-9\]+, new_output.\[0-9\]+_\[0-9\]+, { 16, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }>;" "gimple" } } */ +/* { dg-final { scan-tree-dump "= VEC_PERM_EXPR <\[a-z0-9_\]+, new_output.\[0-9\]+_\[0-9\]+, { 16, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }>;" "gimple" } } */ -/* { dg-final { scan-tree-dump "q4 = VIEW_CONVERT_EXPR<uint128_t>\\\(s_output.\[0-9\]+_\[0-9\]+\\\);" "gimple" } } */ +/* FIXME */ +/* { dg-final { scan-tree-dump "q4 = \(VIEW_CONVERT_EXPR<uint128_t>\\\()?s_output.\[0-9\]+\(_\[0-9\]+\)*\\\)?;" "gimple" } } */ /* The saturating arithmetics are (curently) implemented using scalar builtin calls. */ /* { dg-final { scan-tree-dump-times "= __builtin___hsail_sat_add_u8" 64 "gimple" } } */ /* A single operand vector instr (neg.) */ -/* { dg-final { scan-tree-dump " = VIEW_CONVERT_EXPR<vector\\\(8\\\) signed short>\\\(q8\\\);\[\n \]+_\[0-9\]+ = -_\[0-9\]+;\[\n \]+" "gimple" } } */ +/* { dg-final { scan-tree-dump "= VIEW_CONVERT_EXPR<vector\\\(8\\\) signed short>\\\(\(s_output.\[0-9\]+_\[0-9\]+|q8\)\\\);\[\n \]+q9 = -_\[0-9\]+;\[\n \]+" "gimple" } } */ |