Fix IRA issue, PR79728

Uros Bizjak ubizjak@gmail.com
Tue Mar 7 09:46:00 GMT 2017


Hello!

> This is an ICE where setup_pressure_classes fails if xmm0 is a global reg. Instead of
> GENERAL/FLOAT/SSE/MMX_REGS, it computes only SSE_FIRST_REG as the third register
> class. The problem is that the costs for moving between SSE_FIRST_REG and SSE_REGS are
> inflated because we think we have no available registers in SSE_FIRST_REG (since the only
> register in that class is global), and that somewhat confuses the algorithm.

Index: gcc/testsuite/gcc.target/i386/sse-globalreg.c
===================================================================
--- gcc/testsuite/gcc.target/i386/sse-globalreg.c (nonexistent)
+++ gcc/testsuite/gcc.target/i386/sse-globalreg.c (working copy)
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse2 -w" } */
+/* { dg-require-effective-target sse2 } */

There is no need for effective-target checks for compile-only testcase.

Uros.



More information about the Gcc-patches mailing list