summaryrefslogtreecommitdiffstats
path: root/src/mapi/es1api
diff options
context:
space:
mode:
authorEduardo Lima Mitev <[email protected]>2019-05-13 00:23:58 +0200
committerEduardo Lima Mitev <[email protected]>2019-06-07 08:45:05 +0200
commit340277ad719526cd4c02583a08151473cc0a6904 (patch)
tree57f80b5b01f5ba8103e6124a5fccd509f1b2f137 /src/mapi/es1api
parent3addd7c8d9da9fd050e91738110b6e0a22b9023c (diff)
ir3/nir: Add new NIR AlgebraicPass for lowering imul
Currently, ir3 backend compiler is lowering integer multiplication from: dst = a * b to: dst = (al * bl) + (ah * bl << 16) + (al * bh << 16) by emitting this code: mull.u tmp0, a, b ; mul low, i.e. al * bl madsh.m16 tmp1, a, b, tmp0 ; mul-add shift high mix, i.e. ah * bl << 16 madsh.m16 dst, b, a, tmp1 ; i.e. al * bh << 16 which at that point has very low chances of being optimized. This patch adds a new nir_algebraic.AlgebraicPass to performs this lowering during NIR algebraic optimization passes, giving it a better chance for optimizing the resulting code. Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mapi/es1api')
0 files changed, 0 insertions, 0 deletions