[Bug target/67573] [SH] wrong code generated for libstdc++-v3/src/c++11/cxx11-shim_facets.cc at -mlra

2015-09-20 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67573 --- Comment #11 from Kazumoto Kojima --- Author: kkojima Date: Sun Sep 20 23:54:03 2015 New Revision: 227953 URL: https://gcc.gnu.org/viewcvs?rev=227953=gcc=rev Log: PR target/67573 * config/sh/sh.md: Add early clobber to scratch operand of

[Bug target/67573] [SH] wrong code generated for libstdc++-v3/src/c++11/cxx11-shim_facets.cc at -mlra

2015-09-19 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67573 --- Comment #10 from Kazumoto Kojima --- (In reply to Oleg Endo from comment #9) > I think this should be backported to GCC 5. Even if it might not be > triggered often, there is a possibility for silent wrong-code bugs. OK, will do.

[Bug target/67573] [SH] wrong code generated for libstdc++-v3/src/c++11/cxx11-shim_facets.cc at -mlra

2015-09-18 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67573 --- Comment #9 from Oleg Endo --- I think this should be backported to GCC 5. Even if it might not be triggered often, there is a possibility for silent wrong-code bugs.

[Bug target/67573] [SH] wrong code generated for libstdc++-v3/src/c++11/cxx11-shim_facets.cc at -mlra

2015-09-17 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67573 --- Comment #8 from Oleg Endo --- (In reply to Kazumoto Kojima from comment #7) > Fixed on trunk. > Oleg, now we can propose to make -mlra default on trunk. Nice, thank you!

[Bug target/67573] [SH] wrong code generated for libstdc++-v3/src/c++11/cxx11-shim_facets.cc at -mlra

2015-09-16 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67573 --- Comment #5 from Kazumoto Kojima --- (In reply to Oleg Endo from comment #4) > Maybe FPSCR_STAT_REG should be in the clobber list, too? Otherwise stores > of FP exception bits etc (get_fpscr builtin) could be wrongly CSE'd across > function

[Bug target/67573] [SH] wrong code generated for libstdc++-v3/src/c++11/cxx11-shim_facets.cc at -mlra

2015-09-16 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67573 Kazumoto Kojima changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug target/67573] [SH] wrong code generated for libstdc++-v3/src/c++11/cxx11-shim_facets.cc at -mlra

2015-09-16 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67573 --- Comment #6 from Kazumoto Kojima --- Author: kkojima Date: Thu Sep 17 00:12:57 2015 New Revision: 227837 URL: https://gcc.gnu.org/viewcvs?rev=227837=gcc=rev Log: PR target/67573 * config/sh/sh.md: Add early clobber to scratch operand of

[Bug target/67573] [SH] wrong code generated for libstdc++-v3/src/c++11/cxx11-shim_facets.cc at -mlra

2015-09-15 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67573 --- Comment #4 from Oleg Endo --- Maybe FPSCR_STAT_REG should be in the clobber list, too? Otherwise stores of FP exception bits etc (get_fpscr builtin) could be wrongly CSE'd across function calls... However, I don't know if this is a problem

[Bug target/67573] [SH] wrong code generated for libstdc++-v3/src/c++11/cxx11-shim_facets.cc at -mlra

2015-09-15 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67573 --- Comment #2 from Kazumoto Kojima --- It seems that LRA allocates r7 for the scratch reg at (define_insn_and_split "call_value_pcrel" [(set (match_operand 0 "" "=rf") (call (mem:SI (match_operand:SI 1 "symbol_ref_operand" ""))

[Bug target/67573] [SH] wrong code generated for libstdc++-v3/src/c++11/cxx11-shim_facets.cc at -mlra

2015-09-15 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67573 --- Comment #3 from Kazumoto Kojima --- I've wrongly cut 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" ""))

[Bug target/67573] [SH] wrong code generated for libstdc++-v3/src/c++11/cxx11-shim_facets.cc at -mlra

2015-09-14 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67573 --- Comment #1 from Kazumoto Kojima --- Created attachment 36333 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36333=edit test case