This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
vector operations and scalar operands
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc at gcc dot gnu dot org, rth at cygnus dot com
- Date: Sun, 9 Feb 2003 15:46:19 +0100
- Subject: vector operations and scalar operands
Hi,
the pattern:
[(set (match_operand:V4HI 0 "register_operand" "=y")
(ashiftrt:V4HI (match_operand:V4HI 1 "register_operand" "0")
(match_operand:DI 2 "nonmemory_operand" "yi")))]
won't get simplified by my code as it expect vectors in all operands.
Some other places of i386.md does this with vectors:
(define_insn "mmx_uavgv4hi3"
[(set (match_operand:V4HI 0 "register_operand" "=y")
(ashiftrt:V4HI
(plus:V4HI (plus:V4HI
(match_operand:V4HI 1 "register_operand" "0")
(match_operand:V4HI 2 "nonimmediate_operand" "ym"))
(const_vector:V4HI [(const_int 1)
(const_int 1)
(const_int 1)
(const_int 1)]))
(const_int 1)))]
So the question is whether we want to allow scalar operand for shift or
whether I should add vec_duplicate expressions to the patterns.
The second would lead to pretty wide modes - up to V16TI. Would this
hurt something?
Honza