public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "wilson at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/65932] [5 Regression] Linux-3.10.75 on arm926ej-s does not boot due to wrong code generation Date: Sat, 13 Jun 2015 00:58:00 -0000 [thread overview] Message-ID: <bug-65932-4-UwRdugtvqk@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-65932-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932 --- Comment #12 from Jim Wilson <wilson at gcc dot gnu.org> --- Part of the problem here is that the arm port defines PROMOTE_MODE to force short local variables to unsigned, but arm_promote_function_mode doesn't change signedness. So a signed short parameter and a signed short local have different representations in a register. Another part of the problem is that the eipa_sra pass is creating phi nodes that mix parameters and local variables. Copying a signed short local into a signed short parameter requires a conversion, even though they have the same type, because they get different in register promotion. Another part of the problem is that the out-of-ssa pass when evaluating phi nodes doesn't go through expand_expr, and hence doesn't handle mode promotion. The code is copying DECL_RTL directly into SA.partition_to_pseudo, and then using SA.partition_to_pseudo when emitting the copy instructions. Thus these phi nodes won't emit any conversion instructions even though one is apparently required. I can get correct code if I pass DECL_RTL through expand_expr before storing it into SA.partition_to_pseudo for VAR_DECLs. However, if I then do the same thing for PARM_DECLS, then I get a movhi insn instead of a conversion, because both the source and dest are promoted subregs. I think the problem here is that emit_partition_copy doesn't handle promoted subregs. I think we need something like what store_expr_with_bounds does, when the dest is a promoted subreg, to do the copy to the smaller mode, and then convert to the wider mode. But I have a few too many suppositions at this point and am not sure if this makes sense. It might be simpler to change the arm port so that promote_mode and function_promote_mode match.
next prev parent reply other threads:[~2015-06-13 0:58 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-04-29 15:59 [Bug target/65932] New: [5.1 " christian.eggers at kathrein dot de 2015-04-30 7:45 ` [Bug target/65932] [5 " rguenth at gcc dot gnu.org 2015-04-30 10:10 ` rearnsha at gcc dot gnu.org 2015-04-30 15:21 ` [Bug rtl-optimization/65932] " rearnsha at gcc dot gnu.org 2015-04-30 17:28 ` ceggers at gmx dot de 2015-04-30 19:34 ` jakub at gcc dot gnu.org 2015-05-05 8:51 ` christian.eggers at kathrein dot de 2015-06-05 11:32 ` gcc_email at congenio dot de 2015-06-05 18:07 ` aaro.koskinen at iki dot fi 2015-06-08 2:41 ` gccbugs at rooted dot tk 2015-06-08 9:31 ` miyuki at gcc dot gnu.org 2015-06-08 9:35 ` miyuki at gcc dot gnu.org 2015-06-12 22:35 ` wilson at gcc dot gnu.org 2015-06-13 0:58 ` wilson at gcc dot gnu.org [this message] 2015-06-13 1:07 ` wilson at gcc dot gnu.org 2015-06-14 0:34 ` wilson at gcc dot gnu.org 2015-06-22 12:13 ` rguenth at gcc dot gnu.org 2015-06-23 21:27 ` wilson at gcc dot gnu.org 2015-07-16 9:13 ` rguenth at gcc dot gnu.org 2015-09-02 16:12 ` wilson at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-65932-4-UwRdugtvqk@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).