aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorVladimir Makarov <vmakarov@redhat.com>2019-11-27 14:24:47 +0000
committerVladimir Makarov <vmakarov@redhat.com>2019-11-27 14:24:47 +0000
commita99ec7a1f44254828f54e855dc9535794fe7a62b (patch)
tree16e8cdcd5a574084b58a563d35df988b36ec72fc /gcc
parentc801f1fa639f9cc2d7b6b62b184f3652231a3207 (diff)
2019-11-27 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/90007 * recog.c (constrain_operands): Permit hard registers too for memory when LRA is used. 2019-11-27 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/90007 * gcc.target/i386/pr90007.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@278770 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/recog.c5
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr90007.c15
4 files changed, 28 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9899c377305..f2cacc047d8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-11-27 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/90007
+ * recog.c (constrain_operands): Permit hard registers too for
+ memory when LRA is used.
+
2019-11-27 Bernd Schmidt <bernds_cb1@t-online.de>
* config/m68k/m68k.c (m68k_output_compare_fp): Restore differences
diff --git a/gcc/recog.c b/gcc/recog.c
index 0482818c453..1b76503323a 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -2740,10 +2740,9 @@ constrain_operands (int strict, alternative_mask alternatives)
/* Before reload, accept what reload can turn
into a mem. */
|| (strict < 0 && CONSTANT_P (op))
- /* Before reload, accept a pseudo,
+ /* Before reload, accept a pseudo or hard register,
since LRA can turn it into a mem. */
- || (strict < 0 && targetm.lra_p () && REG_P (op)
- && REGNO (op) >= FIRST_PSEUDO_REGISTER)
+ || (strict < 0 && targetm.lra_p () && REG_P (op))
/* During reload, accept a pseudo */
|| (reload_in_progress && REG_P (op)
&& REGNO (op) >= FIRST_PSEUDO_REGISTER)))
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4c01d147bf7..39728cf82ca 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-11-27 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/90007
+ * gcc.target/i386/pr90007.c: New test.
+
2019-11-27 Andrew Sutton <asutton@lock3software.com>
Emit hard errors for certain satisfaction errors.
diff --git a/gcc/testsuite/gcc.target/i386/pr90007.c b/gcc/testsuite/gcc.target/i386/pr90007.c
new file mode 100644
index 00000000000..a16eec308fb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr90007.c
@@ -0,0 +1,15 @@
+/* PR rtl-optimization/90007 */
+/* { dg-do compile { target x86_64-*-* } } */
+/* { dg-options "-march=bdver1 -mfpmath=387 -O1 -fschedule-insns -fselective-scheduling" } */
+
+void
+qj (int b9, int r9, int k4, int k0, int e7)
+{
+ (void) b9;
+ (void) r9;
+ (void) k4;
+
+ while (!!k0 == e7 * 1.1)
+ {
+ }
+}