This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: altivec: vector constant misc
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 16 Feb 2002 09:40:24 +1100
- Subject: Re: altivec: vector constant misc
> *************** rs6000_emit_move (dest, source, mode)
> *** 2187,2194 ****
> /* Handle the case where reload calls us with an invalid address;
> and the case of CONSTANT_P_RTX. */
> if (! general_operand (operands[1], mode)
> ! || ! nonimmediate_operand (operands[0], mode)
> ! || GET_CODE (operands[1]) == CONSTANT_P_RTX)
> {
> emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1]));
> return;
> --- 2210,2218 ----
> /* Handle the case where reload calls us with an invalid address;
> and the case of CONSTANT_P_RTX. */
> if (! general_operand (operands[1], mode)
> ! || (!VECTOR_MODE_P (mode)
> ! && (! nonimmediate_operand (operands[0], mode)
> ! || GET_CODE (operands[1]) == CONSTANT_P_RTX)))
> {
> emit_insn (gen_rtx_SET (VOIDmode, operands[0], operands[1]));
> return;
>
> VECTOR_MODE cannot handle CONSTANT_P_RTX and nonimmediate_operand?
we handle that case further below, in the switch, where we check
whether we can emit a constant more efficiently, and if so,
do it one operation.
otherwise, that "if" you have pointed out, will generate:
(set:VEC (reg:VEC) (const_int blah))
irregardless of if we have an instruction to do so.
btw, i'm revising my patch to remove the (set (reg) (const_int 0))
pattern for vectors in favor of just emit_insn'ing the XOR
directly. duh.
>
> David
>
>
--
Aldy Hernandez E-mail: aldyh@redhat.com
Professional Gypsy Lost in Australia
Red Hat, Inc.