re PR rtl-optimization/66048 ([i386] ICE in create_pre_exit when both AVX and MPX are used)

gcc/

	PR target/66048
	* function.c (diddle_return_value_1): Process bounds first.
	* config/i38/i386.c (ix86_function_value_regno_p): Add bnd1
	register.

gcc/testsuite/

	PR target/66048
	* gcc.target/i386/mpx/pr66048.cc: New.

From-SVN: r223114
This commit is contained in:
Ilya Enkovich 2015-05-13 07:49:59 +00:00 committed by Ilya Enkovich
parent aa953e2fc5
commit e9ae68afa0
5 changed files with 31 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2015-05-13 Ilya Enkovich <ilya.enkovich@intel.com>
PR target/66048
* function.c (diddle_return_value_1): Process bounds first.
* config/i38/i386.c (ix86_function_value_regno_p): Add bnd1
register.
2015-05-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR rtl-optimization/64616

View File

@ -8216,7 +8216,8 @@ ix86_function_value_regno_p (const unsigned int regno)
case SI_REG:
return TARGET_64BIT && ix86_abi != MS_ABI;
case FIRST_BND_REG:
case BND0_REG:
case BND1_REG:
return chkp_function_instrumented_p (current_function_decl);
/* Complex values are returned in %st(0)/%st(1) pair. */

View File

@ -5224,8 +5224,8 @@ diddle_return_value_1 (void (*doit) (rtx, void *), void *arg, rtx outgoing)
void
diddle_return_value (void (*doit) (rtx, void *), void *arg)
{
diddle_return_value_1 (doit, arg, crtl->return_rtx);
diddle_return_value_1 (doit, arg, crtl->return_bnd);
diddle_return_value_1 (doit, arg, crtl->return_rtx);
}
static void

View File

@ -1,3 +1,8 @@
2015-05-13 Ilya Enkovich <ilya.enkovich@intel.com>
PR target/66048
* gcc.target/i386/mpx/pr66048.cc: New.
2015-05-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR rtl-optimization/64616

View File

@ -0,0 +1,16 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx -march=corei7-avx" } */
struct c1
{
c1 (const c1 &other) : p (other.p) { };
int *p;
};
struct c2 : public c1 { };
c1
test (c2 a)
{
return a;
}