From: Jakub Jelinek Date: Thu, 2 Feb 2017 10:05:26 +0000 (+0100) Subject: re PR target/79197 (ICE in extract_insn in gcc/recog.c:2311) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9f11a4a76fc9c05d1030aca90e43efe13d314739;p=gcc.git re PR target/79197 (ICE in extract_insn in gcc/recog.c:2311) PR target/79197 * config/rs6000/rs6000.md (*fixuns_truncdi2_fctiduz): Rename to ... (fixuns_truncdi2): ... this, remove previous expander. Put all conditions on a single line. * gcc.target/powerpc/pr79197.c: New test. * gcc.c-torture/compile/pr79197.c: New test. From-SVN: r245120 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4e3570d06cd..26da5e89cd7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2017-02-02 Jakub Jelinek + + PR target/79197 + * config/rs6000/rs6000.md (*fixuns_truncdi2_fctiduz): Rename to ... + (fixuns_truncdi2): ... this, remove previous expander. Put all + conditions on a single line. + 2017-02-02 Andreas Krebbel * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 7a908acb88e..bb0927ffb2f 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -5739,17 +5739,10 @@ [(set_attr "length" "12") (set_attr "type" "fp")]) -(define_expand "fixuns_truncdi2" - [(set (match_operand:DI 0 "register_operand" "") - (unsigned_fix:DI (match_operand:SFDF 1 "register_operand" "")))] - "TARGET_HARD_FLOAT && (TARGET_FCTIDUZ || VECTOR_UNIT_VSX_P (mode))" - "") - -(define_insn "*fixuns_truncdi2_fctiduz" +(define_insn "fixuns_truncdi2" [(set (match_operand:DI 0 "gpc_reg_operand" "=d,wi") (unsigned_fix:DI (match_operand:SFDF 1 "gpc_reg_operand" ",")))] - "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && TARGET_FPRS - && TARGET_FCTIDUZ" + "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && TARGET_FPRS && TARGET_FCTIDUZ" "@ fctiduz %0,%1 xscvdpuxds %x0,%x1" diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ecf9aece6e5..cc5da33a72f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2017-02-02 Jakub Jelinek + + PR target/79197 + * gcc.target/powerpc/pr79197.c: New test. + * gcc.c-torture/compile/pr79197.c: New test. + 2017-02-02 Richard Biener * gcc.dg/tree-ssa/pr71078-3.c: Do not rely on math.h. diff --git a/gcc/testsuite/gcc.c-torture/compile/pr79197.c b/gcc/testsuite/gcc.c-torture/compile/pr79197.c new file mode 100644 index 00000000000..f3ac71abdb3 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr79197.c @@ -0,0 +1,10 @@ +/* PR target/79197 */ + +unsigned long b; + +unsigned long +foo (float *a, float *x) +{ + __builtin_memcpy (a, x, sizeof (float)); + return *a; +} diff --git a/gcc/testsuite/gcc.target/powerpc/pr79197.c b/gcc/testsuite/gcc.target/powerpc/pr79197.c new file mode 100644 index 00000000000..659d76c15c1 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr79197.c @@ -0,0 +1,11 @@ +/* PR target/79197 */ +/* { dg-do compile } */ +/* { dg-options "-O0 -mno-popcntd" } */ + +unsigned a; + +void +foo (void) +{ + a = *(double *) (__UINTPTR_TYPE__) 0x400000; +}