From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11176 invoked by alias); 7 Jan 2013 14:26:01 -0000 Received: (qmail 11056 invoked by uid 48); 7 Jan 2013 14:25:35 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/55894] No constant propagation in Intel intrinsics Date: Mon, 07 Jan 2013 14:26: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: jakub 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: CC 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: 2013-01/txt/msg00497.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55894 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek 2013-01-07 14:25:33 UTC --- The reason why it doesn't happen during combine is that the insns don't allow constants, they require loads from memory, so while the compiler is aware of the folded constant, e.g. in the g function: (insn 12 7 15 2 (set (reg/i:V2DF 21 xmm0) (subreg:V2DF (reg:V2DI 65 [ D.4526 ]) 0)) pr55894.c:16 1157 {*movv2df_internal} (expr_list:REG_DEAD (reg:V2DI 65 [ D.4526 ]) (expr_list:REG_EQUAL (const_vector:V2DF [ (const_double:DF +QNaN [+QNaN]) (const_double:DF +QNaN [+QNaN]) ]) (nil)))) it fails to match and thus isn't actually used in the code. A pass that would see you load a constant from memory, do some transformations on it which are all foldable by the compiler and transforming that into just load of a different constant could handle this (or do it in combine?), but the problem with that is that it could in theory increase the constant pool too much.