This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch committed SH] Fix PR target/41813
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 26 Oct 2009 08:12:25 +0900 (JST)
- Subject: [patch committed SH] Fix PR target/41813
Hi,
I've committed the attached patch to fix PR target/41813:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41813
SH backend defines stuff_delay_slot fake insn of which
sub-pattern sets T_REG register. This confused the live
register analysis and made fill_slots_from_thread fill
the delay slot with a wrong insn in the problematic case.
The details are in the above PR's URL.
The attached patch is a minimal fix. It's tested with
bootstrap and regtested on sh4-unknown-linux-gnu with no
new failures.
Regards,
kaz
--
2009-10-25 Kaz Kojima <kkojima@gcc.gnu.org>
PR target/41813
* config/sh/sh.md (stuff_delay_slot): Don't set T_REG in pattern.
--- ORIG/trunk/gcc/config/sh/sh.md 2009-08-13 09:46:10.000000000 +0900
+++ trunk/gcc/config/sh/sh.md 2009-10-23 17:07:19.000000000 +0900
@@ -6825,7 +6825,7 @@ label:
(define_insn "stuff_delay_slot"
[(set (pc)
(unspec [(match_operand:SI 0 "const_int_operand" "") (pc)] UNSPEC_BBR))
- (set (reg:SI T_REG) (match_operand:SI 1 "const_int_operand" ""))]
+ (match_operand:SI 1 "const_int_operand" "")]
"TARGET_SH1"
""
[(set_attr "length" "0")