public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/114247] RISC-V: miscompile at -O3 and IPA SRA Date: Wed, 15 May 2024 13:46:50 +0000 [thread overview] Message-ID: <bug-114247-4-4Cn0Smv3hx@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114247-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114247 --- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Martin Jambor <jamborm@gcc.gnu.org>: https://gcc.gnu.org/g:44191982c6bd41db1c9d126ea2f15febec3c1f81 commit r12-10442-g44191982c6bd41db1c9d126ea2f15febec3c1f81 Author: Martin Jambor <mjambor@suse.cz> Date: Tue May 14 14:13:36 2024 +0200 ipa: Force args obtined through pass-through maps to the expected type (PR 114247) Interactions of IPA-CP and IPA-SRA on the same data is a rather big source of issues, I'm afraid. PR 113964 is a situation where IPA-CP propagates an unsigned short in a union parameter into a function which itself calls a different function which has a same union parameter and both these union parameters are split with IPA-SRA. The leaf function however uses a signed short member of the union. In the calling function, we get the unsigned constant as the replacement for the union and it is then passed in the call without any type compatibility checks. Apparently on riscv64 it matters whether the parameter is signed or unsigned short and so the leaf function can see different values. Fixed by using useless_type_conversion_p at the appropriate place and if it fails, use force_value_to type as elsewhere in similar situations. gcc/ChangeLog: 2024-04-04 Martin Jambor <mjambor@suse.cz> PR ipa/114247 * ipa-param-manipulation.cc (ipa_param_adjustments::modify_call): Force values obtined through pass-through maps to the expected split type. gcc/testsuite/ChangeLog: 2024-04-04 Patrick O'Neill <patrick@rivosinc.com> Martin Jambor <mjambor@suse.cz> PR ipa/114247 * gcc.dg/ipa/pr114247.c: New test. (cherry picked from commit 8cd0d29270d4ed86c69b80c08de66dcb6c1e22fe)
next prev parent reply other threads:[~2024-05-15 13:46 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-05 22:12 [Bug target/114247] New: RISC-V: miscompile at -O3 patrick at rivosinc dot com 2024-03-05 23:29 ` [Bug ipa/114247] RISC-V: miscompile at -O3 and IPA SRA pinskia at gcc dot gnu.org 2024-03-06 8:00 ` rguenth at gcc dot gnu.org 2024-04-03 15:33 ` jamborm at gcc dot gnu.org 2024-04-04 12:12 ` jamborm at gcc dot gnu.org 2024-04-04 12:14 ` rdapp at gcc dot gnu.org 2024-04-04 13:04 ` rdapp at gcc dot gnu.org 2024-04-04 21:39 ` jamborm at gcc dot gnu.org 2024-04-04 21:44 ` patrick at rivosinc dot com 2024-04-05 16:26 ` jamborm at gcc dot gnu.org 2024-05-15 13:46 ` cvs-commit at gcc dot gnu.org [this message] 2024-05-15 13:47 ` jamborm 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-114247-4-4Cn0Smv3hx@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).