From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11339 invoked by alias); 16 Nov 2012 22:59:09 -0000 Received: (qmail 11300 invoked by uid 48); 16 Nov 2012 22:58:48 -0000 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54342] OImode is used for _m256 types when using unions in a function call. Date: Fri, 16 Nov 2012 22:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Component Target Milestone Summary Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg01562.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54342 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Component|rtl-optimization |target Target Milestone|4.8.0 |--- Summary|[4.8 Regression] Wrong mode |OImode is used for _m256 |of call argument |types when using unions in | |a function call. --- Comment #13 from Andrew Pinski 2012-11-16 22:58:46 UTC --- >(insn 10 9 11 3 (set (reg:OI 21 xmm0) (reg:OI 64)) er.c:14 -1 (nil)) This above is generated by the back-end's call by construct_container. So this is not a middle-end issue even if the middle-end says the mode on the union is BLKmode. It is up to the back-end to do the correct thing when it is doing a function call and converting the BLKmode of the union to the correct mode. case 4: gcc_assert (i == 0 && regclass[1] == X86_64_SSEUP_CLASS && regclass[2] == X86_64_SSEUP_CLASS && regclass[3] == X86_64_SSEUP_CLASS); tmpmode = OImode; Is where the OImode is being generated. The comment in ix86_hard_regno_mode_ok says: /* We implement the move patterns for all vector modes into and out of SSE registers, even when no operation instructions are available. OImode move is available only when AVX is enabled. */ So really I don't think this is a bug in the code itself but rather the patch which you are working on which did not take into account OImode being an AVX mode.