aboutsummaryrefslogtreecommitdiff
path: root/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-5.2/PR67954.patch
blob: 198136b98a5b86b8d3135583730b48336de9a5c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From patchwork Wed Nov 25 17:59:13 2015
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: patch to fix PR67954
From: Vladimir Makarov <vmakarov@redhat.com>
X-Patchwork-Id: 548683
Message-Id: <5655F6F1.4020304@redhat.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Date: Wed, 25 Nov 2015 12:59:13 -0500

The following patch fixes

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67954

The patch was bootstrapped on x86/x86-64.  The test is too big and was 
not included to the patch.

Committed as rev. 230893 to gcc-5 branch and as rev. 230894 to trunk.

Index: lra-constraints.c
===================================================================
--- a/gcc/lra-constraints.c	(revision 230887)
+++ b/gcc/lra-constraints.c	(working copy)
@@ -3738,7 +3738,8 @@ curr_insn_transform (bool check_only_p)
 		 assigment pass and the scratch pseudo will be
 		 spilled.  Spilled scratch pseudos are transformed
 		 back to scratches at the LRA end.  */
-	      && lra_former_scratch_operand_p (curr_insn, i))
+	      && lra_former_scratch_operand_p (curr_insn, i)
+	      && lra_former_scratch_p (REGNO (op)))
 	    {
 	      int regno = REGNO (op);
 	      lra_change_class (regno, NO_REGS, "      Change to", true);
@@ -3747,6 +3748,8 @@ curr_insn_transform (bool check_only_p)
 		   spilled pseudo as there is only one such insn, the
 		   current one.  */
 		reg_renumber[regno] = -1;
+	      lra_assert (bitmap_single_bit_set_p
+			  (&lra_reg_info[REGNO (op)].insn_bitmap));
 	    }
 	  /* We can do an optional reload.  If the pseudo got a hard
 	     reg, we might improve the code through inheritance.  If