Bug 48575 - RTL vector patterns are limited to 26 elements
Summary: RTL vector patterns are limited to 26 elements
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: 4.7.0
Assignee: Not yet assigned to anyone
URL: http://gcc.gnu.org/ml/gcc-patches/201...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 14:38 UTC by H.J. Lu
Modified: 2011-08-25 15:20 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2011-04-12 14:38:05 UTC
genrecog.c uses 26 lower case letters for vector elements.
Patterns like

;;(define_insn "vec_interleave_evenv32qi"
;;  [(set (match_operand:V32QI 0 "register_operand" "=r")
;;    (vec_select:V32QI
;;      (vec_concat:V64QI
;;        (match_operand:V32QI 1 "register_operand" "0")
;;        (match_operand:V32QI 2 "register_operand" "r"))
;;      (parallel [(const_int  0) (const_int 32)
;;             (const_int  2) (const_int 34)
;;             (const_int  4) (const_int 36)
;;             (const_int  6) (const_int 38)
;;             (const_int  8) (const_int 40)
;;             (const_int 10) (const_int 42)
;;             (const_int 12) (const_int 44)
;;             (const_int 14) (const_int 46)
;;             (const_int 16) (const_int 48)
;;             (const_int 18) (const_int 50)
;;             (const_int 20) (const_int 52)
;;             (const_int 22) (const_int 54)
;;             (const_int 24) (const_int 56)
;;             (const_int 26) (const_int 58)
;;             (const_int 28) (const_int 60)
;;             (const_int 30) (const_int 62)])))]
;;  ""
;;  "rimihv\t%0,%2,8,15,8"
;;  [(set_attr "type" "rimi")])

don't work since they have more 26 elements. There is no
fundamental reason to use lower case letters for vector
elements. A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2011-03/msg02105.html

to use [0x80...UCHAR_MAX] for vector elements.
Comment 1 Richard Sandiford 2011-05-26 19:16:10 UTC
Author: rsandifo
Date: Thu May 26 19:16:05 2011
New Revision: 174305

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174305
Log:
gcc/
	PR rtl-optimization/48575
	* genrecog.c (position_type): New enum.
	(position): New structure.
	(decision): Use position structure instead of a string.
	(root_pos, peep2_insn_pos_list): New variables.
	(next_position, compare_positions): New functions.
	(new_decision): Use position structures instead of strings.
	(maybe_both_true): Likewise.
	(change_state): Likewise.
	(write_tree): Likewise.
	(make_insn_sequence): Likewise.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/genrecog.c
Comment 2 H.J. Lu 2011-08-25 15:20:10 UTC
Fixed.