> Uli Weigand discovered that the gcc.target/powerpc/swaps-p8-21.c test
case fails when large and small code models are used, rather than the
default medium code model.  This is because analyze_swaps is determining
whether the mask used for a vperm insn is loaded from the constant pool,
and there is an extra indirection for such loads when the large or small
code model is used.  This patch changes analyze_swaps to handle the
extra indirection correctly.  A new test case variant is added to check
for it.

Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no
regressions.  Ok for trunk?

Thanks,
Bill


[gcc]

2015-12-01  Bill Schmidt  <wschm...@linux.vnet.ibm.com>

* config/rs6000/rs6000.c (const_load_sequence_p): Handle extra
indirection for large and small code models.
(adjust_vperm): Likewise.

[gcc/testsuite]

2015-12-01  Bill Schmidt  <wschm...@linux.vnet.ibm.com>

* gcc.target/powerpc/swaps-p8-22.c: New.

Okay.

Thanks, David

Reply via email to