This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/17236] inefficient code for long long multiply on x86
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Dec 2007 16:39:27 -0000
- Subject: [Bug rtl-optimization/17236] inefficient code for long long multiply on x86
- References: <bug-17236-1008@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #13 from jakub at gcc dot gnu dot org 2007-12-18 16:39 -------
I think tree level does the right thing, TER fixes this up and expand_expr
is called with
return (int) (b * a)
Later on expand_expr is called with
<mult_expr 0x2aaaae9032c0
type <integer_type 0x2aaaae937840 long long int DI
size <integer_cst 0x2aaaae927c60 constant invariant 64>
unit size <integer_cst 0x2aaaae927c90 constant invariant 8>
align 64 symtab 0 alias set 2 canonical type 0x2aaaae937840 precision
64 min <integer_cst 0x2aaaae927bd0 -9223372036854775808> max <integer_cst
0x2aaaae927c00 9223372036854775807>>
arg 0 <parm_decl 0x2aaaae92d2d0 b type <integer_type 0x2aaaae937840 long
long int>
used DI file pr17236.c line 2 col 30 size <integer_cst 0x2aaaae927c60
64> unit size <integer_cst 0x2aaaae927c90 8>
align 64 context <function_decl 0x2aaaae9e8a90 test> initial
<integer_type 0x2aaaae937840 long long int>
(reg/v:DI 60 [ b ]) arg-type <integer_type 0x2aaaae937840 long long
int>
incoming-rtl (mem/c/i:DI (plus:SI (reg/f:SI 53 virtual-incoming-args)
(const_int 8 [0x8])) [2 b+0 S8 A32])>
arg 1 <parm_decl 0x2aaaae92d240 a type <integer_type 0x2aaaae937840 long
long int>
used DI file pr17236.c line 2 col 17 size <integer_cst 0x2aaaae927c60
64> unit size <integer_cst 0x2aaaae927c90 8>
align 64 context <function_decl 0x2aaaae9e8a90 test> initial
<integer_type 0x2aaaae937840 long long int>
(reg/v:DI 59 [ a ]) arg-type <integer_type 0x2aaaae937840 long long
int>
incoming-rtl (mem/c/i:DI (reg/f:SI 53 virtual-incoming-args) [2 a+0 S8
A32]) chain <parm_decl 0x2aaaae92d2d0 b>>>
and tmode SImode, still enough info to choose a better multiply.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17236