[Bug target/46716] [4.4/4.5/4.6/4.7 Regression] wrong code generated with -mno-sse2 -m64
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Mar 2 14:36:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46716
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.4/4.5/4.6/4.7/4.8 |[4.4/4.5/4.6/4.7
|Regression] wrong code |Regression] wrong code
|generated with -mno-sse2 |generated with -mno-sse2
|-m64 |-m64
--- Comment #8 from Uros Bizjak <ubizjak at gmail dot com> 2012-03-02 14:35:24 UTC ---
This is just a matter of always forcing the "natural" mode for the register,
even when type system does not agree with this. See the comment for
gen_reg_or_parallel on this issue.
I am testing following patch:
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c (revision 184774)
+++ config/i386/i386.c (working copy)
@@ -6338,15 +6338,16 @@ construct_container (enum machine_mode mode, enum
}
if (n == 2 && regclass[0] == X86_64_SSE_CLASS
&& regclass[1] == X86_64_SSEUP_CLASS && mode != BLKmode)
- return gen_rtx_REG (mode, SSE_REGNO (sse_regno));
+ return gen_reg_or_parallel (mode, orig_mode,
+ SSE_REGNO (sse_regno));
if (n == 4
&& regclass[0] == X86_64_SSE_CLASS
&& regclass[1] == X86_64_SSEUP_CLASS
&& regclass[2] == X86_64_SSEUP_CLASS
&& regclass[3] == X86_64_SSEUP_CLASS
&& mode != BLKmode)
- return gen_rtx_REG (mode, SSE_REGNO (sse_regno));
-
+ return gen_reg_or_parallel (mode, orig_mode,
+ SSE_REGNO (sse_regno));
if (n == 2
&& regclass[0] == X86_64_X87_CLASS && regclass[1] == X86_64_X87UP_CLASS)
return gen_rtx_REG (XFmode, FIRST_STACK_REG);
More information about the Gcc-bugs
mailing list