From 4199c859ac95ee15433902b5d2a3a537b36e4752 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 25 Feb 2019 10:51:27 +0100 Subject: [PATCH] re PR target/89438 (ICE in glibc/sysdeps/ieee754/dbl-64/e_pow.c (internal compiler error: in decompose, at rtl.h:2266)) PR target/89438 * config/arm.vfp.md (*negdf2_vfp): Use gen_int_mode (0x80000000, SImode) instead of GEN_INT (0x80000000). * config/arm/neon.md (neon_copysignf): Likewise. * gcc.dg/pr89438.c: New test. From-SVN: r269185 --- gcc/ChangeLog | 7 +++++++ gcc/config/arm/neon.md | 2 +- gcc/config/arm/vfp.md | 5 +++-- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/pr89438.c | 22 ++++++++++++++++++++++ 5 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/pr89438.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 21850194880..932861814ad 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-02-25 Jakub Jelinek + + PR target/89438 + * config/arm.vfp.md (*negdf2_vfp): Use + gen_int_mode (0x80000000, SImode) instead of GEN_INT (0x80000000). + * config/arm/neon.md (neon_copysignf): Likewise. + 2019-02-24 Jakub Jelinek PR rtl-optimization/89445 diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md index de9ae438490..c68ae57f6a8 100644 --- a/gcc/config/arm/neon.md +++ b/gcc/config/arm/neon.md @@ -3610,7 +3610,7 @@ "{ rtx v_bitmask_cast; rtx v_bitmask = gen_reg_rtx (mode); - rtx c = GEN_INT (0x80000000); + rtx c = gen_int_mode (0x80000000, SImode); emit_move_insn (v_bitmask, gen_const_vec_duplicate (mode, c)); diff --git a/gcc/config/arm/vfp.md b/gcc/config/arm/vfp.md index e1c39744ceb..e0aaa7b00bb 100644 --- a/gcc/config/arm/vfp.md +++ b/gcc/config/arm/vfp.md @@ -871,14 +871,15 @@ if (REGNO (operands[0]) == REGNO (operands[1])) { operands[0] = gen_highpart (SImode, operands[0]); - operands[1] = gen_rtx_XOR (SImode, operands[0], GEN_INT (0x80000000)); + operands[1] = gen_rtx_XOR (SImode, operands[0], + gen_int_mode (0x80000000, SImode)); } else { rtx in_hi, in_lo, out_hi, out_lo; in_hi = gen_rtx_XOR (SImode, gen_highpart (SImode, operands[1]), - GEN_INT (0x80000000)); + gen_int_mode (0x80000000, SImode)); in_lo = gen_lowpart (SImode, operands[1]); out_hi = gen_highpart (SImode, operands[0]); out_lo = gen_lowpart (SImode, operands[0]); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e55b591a8b0..f872fc4c8f8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-02-25 Jakub Jelinek + + PR target/89438 + * gcc.dg/pr89438.c: New test. + 2019-02-24 Paolo Carlini PR c++/84585 diff --git a/gcc/testsuite/gcc.dg/pr89438.c b/gcc/testsuite/gcc.dg/pr89438.c new file mode 100644 index 00000000000..2db462364db --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr89438.c @@ -0,0 +1,22 @@ +/* PR target/89438 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -g -w" } */ + +struct S { double b, c; struct T { double d, e; } f[16]; } g; +int h, i, j; +double k; + +double +foo (void) +{ + int m; + if (j) + return k; + long a, p = a - 80; + double b, n; + n = b * h + g.f[p].e; + m = n; + double o = 1 ? m : 1.0; + k = i ? -o : o; + return k; +} -- 2.30.2