This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/67573] [SH] wrong code generated for libstdc++-v3/src/c++11/cxx11-shim_facets.cc at -mlra
- From: "kkojima at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Sep 2015 14:13:22 +0000
- Subject: [Bug target/67573] [SH] wrong code generated for libstdc++-v3/src/c++11/cxx11-shim_facets.cc at -mlra
- Auto-submitted: auto-generated
- References: <bug-67573-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67573
--- Comment #3 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
I've wrongly cut&paste call_value_pcrel. It's
(define_insn_and_split "call_value_pcrel"
[(set (match_operand 0 "" "=rf")
(call (mem:SI (match_operand:SI 1 "symbol_ref_operand" ""))
(match_operand 2 "" "")))
(use (reg:SI FPSCR_MODES_REG))
(use (reg:SI PIC_REG))
(clobber (reg:SI PR_REG))
(clobber (match_scratch:SI 3 "=&r"))]
...
I think that the last clobber should be
(clobber (match_scratch:SI 3 "=&r"))]
i.e. the scratch register is early clobbered. With that change,
it looks the wrong code go away. I'll come up with the tested
patch for all similar *call_*pcrel insns.