Commit d708ce50 by Jakub Jelinek Committed by Jakub Jelinek

re PR target/48678 (unable to find a register to spill in class ‘GENERAL_REGS’)

	PR target/48678
	* config/i386/i386.md (movstrict<mode>): FAIL if operands[0]
	is a SUBREG with non-MODE_INT mode inside of it.

	* gcc.target/i386/pr48678.c: New test.

From-SVN: r172721
parent 49c471e3
2011-04-19 Jakub Jelinek <jakub@redhat.com>
PR target/48678
* config/i386/i386.md (movstrict<mode>): FAIL if operands[0]
is a SUBREG with non-MODE_INT mode inside of it.
2011-04-19 Martin Jambor <mjambor@suse.cz> 2011-04-19 Martin Jambor <mjambor@suse.cz>
* ipa-cp.c (ipcp_process_devirtualization_opportunities): Devirtualize * ipa-cp.c (ipcp_process_devirtualization_opportunities): Devirtualize
......
...@@ -2425,6 +2425,9 @@ ...@@ -2425,6 +2425,9 @@
{ {
if (TARGET_PARTIAL_REG_STALL && optimize_function_for_speed_p (cfun)) if (TARGET_PARTIAL_REG_STALL && optimize_function_for_speed_p (cfun))
FAIL; FAIL;
if (GET_CODE (operands[0]) == SUBREG
&& GET_MODE_CLASS (GET_MODE (SUBREG_REG (operands[0]))) != MODE_INT)
FAIL;
/* Don't generate memory->memory moves, go through a register */ /* Don't generate memory->memory moves, go through a register */
if (MEM_P (operands[0]) && MEM_P (operands[1])) if (MEM_P (operands[0]) && MEM_P (operands[1]))
operands[1] = force_reg (<MODE>mode, operands[1]); operands[1] = force_reg (<MODE>mode, operands[1]);
......
2011-04-19 Jakub Jelinek <jakub@redhat.com>
PR target/48678
* gcc.target/i386/pr48678.c: New test.
2011-04-19 Martin Jambor <mjambor@suse.cz> 2011-04-19 Martin Jambor <mjambor@suse.cz>
* g++.dg/opt/devirt1.C: Bump to -O2, remove XFAIL. * g++.dg/opt/devirt1.C: Bump to -O2, remove XFAIL.
......
/* PR target/48678 */
/* { dg-do compile } */
/* { dg-options "-O2 -msse2" } */
#include <emmintrin.h>
typedef short T __attribute__((may_alias));
struct S { __m128i d; };
__m128i
foo (short *x, struct S *y, __m128i *z)
{
struct S s = *y;
((T *) &s.d)[0] = *x;
return _mm_cmpeq_epi16 (s.d, *z);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment