This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
expand_binop vs libcalls
- To: gcc at gcc dot gnu dot org
- Subject: expand_binop vs libcalls
- From: DJ Delorie <dj at redhat dot com>
- Date: Tue, 20 Mar 2001 00:01:09 -0500
Why do we force op0 to the right mode, but not op1, like below?
Index: optabs.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/optabs.c,v
retrieving revision 1.89
diff -p -3 -r1.89 optabs.c
*** optabs.c 2001/03/07 19:29:36 1.89
--- optabs.c 2001/03/20 04:58:59
*************** expand_binop (mode, binoptab, op0, op1,
*** 1713,1718 ****
--- 1713,1724 ----
since negative shift counts are meaningless. */
op1x = convert_to_mode (word_mode, op1, 1);
}
+ else
+ {
+ if (GET_MODE (op1) != VOIDmode
+ && GET_MODE (op1) != op1_mode)
+ op1x = convert_to_mode (op1_mode, op1, unsignedp);
+ }
if (GET_MODE (op0) != VOIDmode
&& GET_MODE (op0) != mode)