From: Pat Haugen Date: Fri, 10 Mar 2017 14:32:42 +0000 (+0000) Subject: re PR target/79907 (ICE in extract_constrain_insn, at recog.c:2213 on ppc64le) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fc8f6304a9ce1869fd60db6b1863938d85e017d3;p=gcc.git re PR target/79907 (ICE in extract_constrain_insn, at recog.c:2213 on ppc64le) PR target/79907 * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Test TARGET_UPPER_REGS_DI when setting 'wi' constraint regclass. * gcc.target/powerpc/pr79907.c: New. From-SVN: r246029 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 306b5f140b6..34c6f291421 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-03-10 Pat Haugen + + PR target/79907 + * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Test + TARGET_UPPER_REGS_DI when setting 'wi' constraint regclass. + 2017-03-10 Martin Liska PR target/65705 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index e528bdf8973..c6ba091baed 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3182,7 +3182,7 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p) else rs6000_constraints[RS6000_CONSTRAINT_ws] = FLOAT_REGS; - if (TARGET_UPPER_REGS_DF) /* DImode */ + if (TARGET_UPPER_REGS_DI) /* DImode */ rs6000_constraints[RS6000_CONSTRAINT_wi] = VSX_REGS; else rs6000_constraints[RS6000_CONSTRAINT_wi] = FLOAT_REGS; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b17299b9400..ef5609cd769 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-03-10 Pat Haugen + + PR target/79907 + * gcc.target/powerpc/pr79907.c: New. + 2017-03-10 Olivier Hainque * gnat.dg/opt64.adb: New test. diff --git a/gcc/testsuite/gcc.target/powerpc/pr79907.c b/gcc/testsuite/gcc.target/powerpc/pr79907.c new file mode 100644 index 00000000000..c0e669b3264 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr79907.c @@ -0,0 +1,15 @@ +/* { dg-do compile { target { powerpc*-*-* } } } */ +/* { dg-require-effective-target powerpc_p8vector_ok } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */ +/* { dg-options "-mcpu=power8 -O3 -mno-upper-regs-df" } */ + +int foo (short a[], int x) +{ + unsigned int i; + for (i = 0; i < 1000; i++) + { + x = a[i]; + a[i] = (x <= 0 ? 0 : x); + } + return x; +}