Merge lp:~ramana/gcc-linaro/backport-neon-shiftimm-take2-4.6 into lp:gcc-linaro/4.6
- backport-neon-shiftimm-take2-4.6
- Merge into 4.6
Status: | Merged |
---|---|
Approved by: | Richard Sandiford |
Approved revision: | no longer in the source branch. |
Merged at revision: | 106772 |
Proposed branch: | lp:~ramana/gcc-linaro/backport-neon-shiftimm-take2-4.6 |
Merge into: | lp:gcc-linaro/4.6 |
Diff against target: |
365 lines (+241/-19) 9 files modified
ChangeLog.linaro (+32/-0) gcc/config/arm/arm-protos.h (+4/-0) gcc/config/arm/arm.c (+82/-0) gcc/config/arm/neon.md (+67/-19) gcc/config/arm/predicates.md (+20/-0) gcc/optabs.c (+3/-0) gcc/testsuite/gcc.target/arm/neon-vlshr-imm-1.c (+11/-0) gcc/testsuite/gcc.target/arm/neon-vshl-imm-1.c (+11/-0) gcc/testsuite/gcc.target/arm/neon-vshr-imm-1.c (+11/-0) |
To merge this branch: | bzr merge lp:~ramana/gcc-linaro/backport-neon-shiftimm-take2-4.6 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Richard Sandiford | Approve | ||
Review via email: mp+66796@code.launchpad.net |
Commit message
Description of the change
Proposed for merge to get testing coverage based on comments in review from previous iteration.
Ramana
Linaro Toolchain Builder (cbuild) wrote : | # |
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on x86_64-
The build results are available at:
http://
The test suite results were unchanged compared to the branch point lp:gcc-linaro/4.6+bzr106767.
The full testsuite results are at:
http://
cbuild-checked: x86_64-
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on armv7l-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro/4.6+bzr106767:
+PASS: gcc.target/
+PASS: gcc.target/
+PASS: gcc.target/
+PASS: gcc.target/
+PASS: gcc.target/
+PASS: gcc.target/
The full testsuite results are at:
http://
cbuild-checked: armv7l-
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on i686-natty-
The build results are available at:
http://
The test suite results were unchanged compared to the branch point lp:gcc-linaro/4.6+bzr106767.
The full testsuite results are at:
http://
cbuild-checked: i686-natty-
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on armv7l-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro/4.6+bzr106767:
+PASS: gcc.target/
+PASS: gcc.target/
+PASS: gcc.target/
+PASS: gcc.target/
+PASS: gcc.target/
+PASS: gcc.target/
The full testsuite results are at:
http://
cbuild-checked: armv7l-
Linaro Toolchain Builder (cbuild) wrote : | # |
cbuild successfully built this on armv7l-
The build results are available at:
http://
The test suite results changed compared to the branch point lp:gcc-linaro/4.6+bzr106767:
+PASS: gcc.target/
+PASS: gcc.target/
+PASS: gcc.target/
+PASS: gcc.target/
+PASS: gcc.target/
+PASS: gcc.target/
The full testsuite results are at:
http://
cbuild-checked: armv7l-
Preview Diff
1 | === modified file 'ChangeLog.linaro' | |||
2 | --- ChangeLog.linaro 2011-07-04 11:13:51 +0000 | |||
3 | +++ ChangeLog.linaro 2011-07-04 14:15:56 +0000 | |||
4 | @@ -1,3 +1,35 @@ | |||
5 | 1 | 2011-07-04 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org> | ||
6 | 2 | |||
7 | 3 | gcc/ | ||
8 | 4 | 2011-06-22 Dmitry Plotnikov <dplotnikov@ispras.ru> | ||
9 | 5 | Dmitry Melnik <dm@ispras.ru> | ||
10 | 6 | |||
11 | 7 | * config/arm/arm.c (neon_immediate_valid_for_shift): New function. | ||
12 | 8 | (neon_output_shift_immediate): Ditto. | ||
13 | 9 | * config/arm/arm-protos.h (neon_immediate_valid_for_shift): New | ||
14 | 10 | prototype. | ||
15 | 11 | (neon_output_shift_immediate): Ditto. | ||
16 | 12 | * config/arm/neon.md (vashl<mode>3): Modified constraint. | ||
17 | 13 | (vashr<mode>3_imm): New insn pattern. | ||
18 | 14 | (vlshr<mode>3_imm): Ditto. | ||
19 | 15 | (vashr<mode>3): Modified constraint. | ||
20 | 16 | (vlshr<mode>3): Ditto. | ||
21 | 17 | * config/arm/predicates.md (imm_for_neon_lshift_operand): New | ||
22 | 18 | predicate. | ||
23 | 19 | (imm_for_neon_rshift_operand): Ditto. | ||
24 | 20 | (imm_lshift_or_reg_neon): Ditto. | ||
25 | 21 | (imm_rshift_or_reg_neon): Ditto. | ||
26 | 22 | |||
27 | 23 | * optabs.c (init_optabs): Init optab codes for vashl, vashr, vlshr. | ||
28 | 24 | |||
29 | 25 | gcc/testsuite | ||
30 | 26 | 2011-06-22 Dmitry Plotnikov <dplotnikov@ispras.ru> | ||
31 | 27 | Dmitry Melnik <dm@ispras.ru> | ||
32 | 28 | |||
33 | 29 | * gcc.target/arm/neon-vshr-imm-1.c: New testcase. | ||
34 | 30 | * gcc.target/arm/neon-vshl-imm-1.c: New testcase. | ||
35 | 31 | * gcc.target/arm/neon-vlshr-imm-1.c: New testcase. | ||
36 | 32 | |||
37 | 1 | 2011-07-01 Andrew Stubbs <ams@codesourcery.com> | 33 | 2011-07-01 Andrew Stubbs <ams@codesourcery.com> |
38 | 2 | 34 | ||
39 | 3 | Merge from FSF GCC 4.6.1 (svn branches/gcc-4_6-branch 175677). | 35 | Merge from FSF GCC 4.6.1 (svn branches/gcc-4_6-branch 175677). |
40 | 4 | 36 | ||
41 | === modified file 'gcc/config/arm/arm-protos.h' | |||
42 | --- gcc/config/arm/arm-protos.h 2011-06-14 16:00:30 +0000 | |||
43 | +++ gcc/config/arm/arm-protos.h 2011-07-04 14:15:56 +0000 | |||
44 | @@ -64,8 +64,12 @@ | |||
45 | 64 | extern int neon_immediate_valid_for_move (rtx, enum machine_mode, rtx *, int *); | 64 | extern int neon_immediate_valid_for_move (rtx, enum machine_mode, rtx *, int *); |
46 | 65 | extern int neon_immediate_valid_for_logic (rtx, enum machine_mode, int, rtx *, | 65 | extern int neon_immediate_valid_for_logic (rtx, enum machine_mode, int, rtx *, |
47 | 66 | int *); | 66 | int *); |
48 | 67 | extern int neon_immediate_valid_for_shift (rtx, enum machine_mode, rtx *, | ||
49 | 68 | int *, bool); | ||
50 | 67 | extern char *neon_output_logic_immediate (const char *, rtx *, | 69 | extern char *neon_output_logic_immediate (const char *, rtx *, |
51 | 68 | enum machine_mode, int, int); | 70 | enum machine_mode, int, int); |
52 | 71 | extern char *neon_output_shift_immediate (const char *, char, rtx *, | ||
53 | 72 | enum machine_mode, int, bool); | ||
54 | 69 | extern void neon_pairwise_reduce (rtx, rtx, enum machine_mode, | 73 | extern void neon_pairwise_reduce (rtx, rtx, enum machine_mode, |
55 | 70 | rtx (*) (rtx, rtx, rtx)); | 74 | rtx (*) (rtx, rtx, rtx)); |
56 | 71 | extern rtx neon_make_constant (rtx); | 75 | extern rtx neon_make_constant (rtx); |
57 | 72 | 76 | ||
58 | === modified file 'gcc/config/arm/arm.c' | |||
59 | --- gcc/config/arm/arm.c 2011-06-29 09:13:17 +0000 | |||
60 | +++ gcc/config/arm/arm.c 2011-07-04 14:15:56 +0000 | |||
61 | @@ -8863,6 +8863,66 @@ | |||
62 | 8863 | return 1; | 8863 | return 1; |
63 | 8864 | } | 8864 | } |
64 | 8865 | 8865 | ||
65 | 8866 | /* Return TRUE if rtx OP is legal for use in a VSHR or VSHL instruction. If | ||
66 | 8867 | the immediate is valid, write a constant suitable for using as an operand | ||
67 | 8868 | to VSHR/VSHL to *MODCONST and the corresponding element width to | ||
68 | 8869 | *ELEMENTWIDTH. ISLEFTSHIFT is for determine left or right shift, | ||
69 | 8870 | because they have different limitations. */ | ||
70 | 8871 | |||
71 | 8872 | int | ||
72 | 8873 | neon_immediate_valid_for_shift (rtx op, enum machine_mode mode, | ||
73 | 8874 | rtx *modconst, int *elementwidth, | ||
74 | 8875 | bool isleftshift) | ||
75 | 8876 | { | ||
76 | 8877 | unsigned int innersize = GET_MODE_SIZE (GET_MODE_INNER (mode)); | ||
77 | 8878 | unsigned int n_elts = CONST_VECTOR_NUNITS (op), i; | ||
78 | 8879 | unsigned HOST_WIDE_INT last_elt = 0; | ||
79 | 8880 | unsigned HOST_WIDE_INT maxshift; | ||
80 | 8881 | |||
81 | 8882 | /* Split vector constant out into a byte vector. */ | ||
82 | 8883 | for (i = 0; i < n_elts; i++) | ||
83 | 8884 | { | ||
84 | 8885 | rtx el = CONST_VECTOR_ELT (op, i); | ||
85 | 8886 | unsigned HOST_WIDE_INT elpart; | ||
86 | 8887 | |||
87 | 8888 | if (GET_CODE (el) == CONST_INT) | ||
88 | 8889 | elpart = INTVAL (el); | ||
89 | 8890 | else if (GET_CODE (el) == CONST_DOUBLE) | ||
90 | 8891 | return 0; | ||
91 | 8892 | else | ||
92 | 8893 | gcc_unreachable (); | ||
93 | 8894 | |||
94 | 8895 | if (i != 0 && elpart != last_elt) | ||
95 | 8896 | return 0; | ||
96 | 8897 | |||
97 | 8898 | last_elt = elpart; | ||
98 | 8899 | } | ||
99 | 8900 | |||
100 | 8901 | /* Shift less than element size. */ | ||
101 | 8902 | maxshift = innersize * 8; | ||
102 | 8903 | |||
103 | 8904 | if (isleftshift) | ||
104 | 8905 | { | ||
105 | 8906 | /* Left shift immediate value can be from 0 to <size>-1. */ | ||
106 | 8907 | if (last_elt >= maxshift) | ||
107 | 8908 | return 0; | ||
108 | 8909 | } | ||
109 | 8910 | else | ||
110 | 8911 | { | ||
111 | 8912 | /* Right shift immediate value can be from 1 to <size>. */ | ||
112 | 8913 | if (last_elt == 0 || last_elt > maxshift) | ||
113 | 8914 | return 0; | ||
114 | 8915 | } | ||
115 | 8916 | |||
116 | 8917 | if (elementwidth) | ||
117 | 8918 | *elementwidth = innersize * 8; | ||
118 | 8919 | |||
119 | 8920 | if (modconst) | ||
120 | 8921 | *modconst = CONST_VECTOR_ELT (op, 0); | ||
121 | 8922 | |||
122 | 8923 | return 1; | ||
123 | 8924 | } | ||
124 | 8925 | |||
125 | 8866 | /* Return a string suitable for output of Neon immediate logic operation | 8926 | /* Return a string suitable for output of Neon immediate logic operation |
126 | 8867 | MNEM. */ | 8927 | MNEM. */ |
127 | 8868 | 8928 | ||
128 | @@ -8885,6 +8945,28 @@ | |||
129 | 8885 | return templ; | 8945 | return templ; |
130 | 8886 | } | 8946 | } |
131 | 8887 | 8947 | ||
132 | 8948 | /* Return a string suitable for output of Neon immediate shift operation | ||
133 | 8949 | (VSHR or VSHL) MNEM. */ | ||
134 | 8950 | |||
135 | 8951 | char * | ||
136 | 8952 | neon_output_shift_immediate (const char *mnem, char sign, rtx *op2, | ||
137 | 8953 | enum machine_mode mode, int quad, | ||
138 | 8954 | bool isleftshift) | ||
139 | 8955 | { | ||
140 | 8956 | int width, is_valid; | ||
141 | 8957 | static char templ[40]; | ||
142 | 8958 | |||
143 | 8959 | is_valid = neon_immediate_valid_for_shift (*op2, mode, op2, &width, isleftshift); | ||
144 | 8960 | gcc_assert (is_valid != 0); | ||
145 | 8961 | |||
146 | 8962 | if (quad) | ||
147 | 8963 | sprintf (templ, "%s.%c%d\t%%q0, %%q1, %%2", mnem, sign, width); | ||
148 | 8964 | else | ||
149 | 8965 | sprintf (templ, "%s.%c%d\t%%P0, %%P1, %%2", mnem, sign, width); | ||
150 | 8966 | |||
151 | 8967 | return templ; | ||
152 | 8968 | } | ||
153 | 8969 | |||
154 | 8888 | /* Output a sequence of pairwise operations to implement a reduction. | 8970 | /* Output a sequence of pairwise operations to implement a reduction. |
155 | 8889 | NOTE: We do "too much work" here, because pairwise operations work on two | 8971 | NOTE: We do "too much work" here, because pairwise operations work on two |
156 | 8890 | registers-worth of operands in one go. Unfortunately we can't exploit those | 8972 | registers-worth of operands in one go. Unfortunately we can't exploit those |
157 | 8891 | 8973 | ||
158 | === modified file 'gcc/config/arm/neon.md' | |||
159 | --- gcc/config/arm/neon.md 2011-07-01 09:19:21 +0000 | |||
160 | +++ gcc/config/arm/neon.md 2011-07-04 14:15:56 +0000 | |||
161 | @@ -956,15 +956,57 @@ | |||
162 | 956 | ; SImode elements. | 956 | ; SImode elements. |
163 | 957 | 957 | ||
164 | 958 | (define_insn "vashl<mode>3" | 958 | (define_insn "vashl<mode>3" |
174 | 959 | [(set (match_operand:VDQIW 0 "s_register_operand" "=w") | 959 | [(set (match_operand:VDQIW 0 "s_register_operand" "=w,w") |
175 | 960 | (ashift:VDQIW (match_operand:VDQIW 1 "s_register_operand" "w") | 960 | (ashift:VDQIW (match_operand:VDQIW 1 "s_register_operand" "w,w") |
176 | 961 | (match_operand:VDQIW 2 "s_register_operand" "w")))] | 961 | (match_operand:VDQIW 2 "imm_lshift_or_reg_neon" "w,Dn")))] |
177 | 962 | "TARGET_NEON" | 962 | "TARGET_NEON" |
178 | 963 | "vshl.<V_s_elem>\t%<V_reg>0, %<V_reg>1, %<V_reg>2" | 963 | { |
179 | 964 | [(set (attr "neon_type") | 964 | switch (which_alternative) |
180 | 965 | (if_then_else (ne (symbol_ref "<Is_d_reg>") (const_int 0)) | 965 | { |
181 | 966 | (const_string "neon_vshl_ddd") | 966 | case 0: return "vshl.<V_s_elem>\t%<V_reg>0, %<V_reg>1, %<V_reg>2"; |
182 | 967 | (const_string "neon_shift_3")))] | 967 | case 1: return neon_output_shift_immediate ("vshl", 'i', &operands[2], |
183 | 968 | <MODE>mode, | ||
184 | 969 | VALID_NEON_QREG_MODE (<MODE>mode), | ||
185 | 970 | true); | ||
186 | 971 | default: gcc_unreachable (); | ||
187 | 972 | } | ||
188 | 973 | } | ||
189 | 974 | [(set (attr "neon_type") | ||
190 | 975 | (if_then_else (ne (symbol_ref "<Is_d_reg>") (const_int 0)) | ||
191 | 976 | (const_string "neon_vshl_ddd") | ||
192 | 977 | (const_string "neon_shift_3")))] | ||
193 | 978 | ) | ||
194 | 979 | |||
195 | 980 | (define_insn "vashr<mode>3_imm" | ||
196 | 981 | [(set (match_operand:VDQIW 0 "s_register_operand" "=w") | ||
197 | 982 | (ashiftrt:VDQIW (match_operand:VDQIW 1 "s_register_operand" "w") | ||
198 | 983 | (match_operand:VDQIW 2 "imm_for_neon_rshift_operand" "Dn")))] | ||
199 | 984 | "TARGET_NEON" | ||
200 | 985 | { | ||
201 | 986 | return neon_output_shift_immediate ("vshr", 's', &operands[2], | ||
202 | 987 | <MODE>mode, VALID_NEON_QREG_MODE (<MODE>mode), | ||
203 | 988 | false); | ||
204 | 989 | } | ||
205 | 990 | [(set (attr "neon_type") | ||
206 | 991 | (if_then_else (ne (symbol_ref "<Is_d_reg>") (const_int 0)) | ||
207 | 992 | (const_string "neon_vshl_ddd") | ||
208 | 993 | (const_string "neon_shift_3")))] | ||
209 | 994 | ) | ||
210 | 995 | |||
211 | 996 | (define_insn "vlshr<mode>3_imm" | ||
212 | 997 | [(set (match_operand:VDQIW 0 "s_register_operand" "=w") | ||
213 | 998 | (lshiftrt:VDQIW (match_operand:VDQIW 1 "s_register_operand" "w") | ||
214 | 999 | (match_operand:VDQIW 2 "imm_for_neon_rshift_operand" "Dn")))] | ||
215 | 1000 | "TARGET_NEON" | ||
216 | 1001 | { | ||
217 | 1002 | return neon_output_shift_immediate ("vshr", 'u', &operands[2], | ||
218 | 1003 | <MODE>mode, VALID_NEON_QREG_MODE (<MODE>mode), | ||
219 | 1004 | false); | ||
220 | 1005 | } | ||
221 | 1006 | [(set (attr "neon_type") | ||
222 | 1007 | (if_then_else (ne (symbol_ref "<Is_d_reg>") (const_int 0)) | ||
223 | 1008 | (const_string "neon_vshl_ddd") | ||
224 | 1009 | (const_string "neon_shift_3")))] | ||
225 | 968 | ) | 1010 | ) |
226 | 969 | 1011 | ||
227 | 970 | ; Used for implementing logical shift-right, which is a left-shift by a negative | 1012 | ; Used for implementing logical shift-right, which is a left-shift by a negative |
228 | @@ -1004,28 +1046,34 @@ | |||
229 | 1004 | (define_expand "vashr<mode>3" | 1046 | (define_expand "vashr<mode>3" |
230 | 1005 | [(set (match_operand:VDQIW 0 "s_register_operand" "") | 1047 | [(set (match_operand:VDQIW 0 "s_register_operand" "") |
231 | 1006 | (ashiftrt:VDQIW (match_operand:VDQIW 1 "s_register_operand" "") | 1048 | (ashiftrt:VDQIW (match_operand:VDQIW 1 "s_register_operand" "") |
233 | 1007 | (match_operand:VDQIW 2 "s_register_operand" "")))] | 1049 | (match_operand:VDQIW 2 "imm_rshift_or_reg_neon" "")))] |
234 | 1008 | "TARGET_NEON" | 1050 | "TARGET_NEON" |
235 | 1009 | { | 1051 | { |
236 | 1010 | rtx neg = gen_reg_rtx (<MODE>mode); | 1052 | rtx neg = gen_reg_rtx (<MODE>mode); |
241 | 1011 | 1053 | if (REG_P (operands[2])) | |
242 | 1012 | emit_insn (gen_neg<mode>2 (neg, operands[2])); | 1054 | { |
243 | 1013 | emit_insn (gen_ashl<mode>3_signed (operands[0], operands[1], neg)); | 1055 | emit_insn (gen_neg<mode>2 (neg, operands[2])); |
244 | 1014 | 1056 | emit_insn (gen_ashl<mode>3_signed (operands[0], operands[1], neg)); | |
245 | 1057 | } | ||
246 | 1058 | else | ||
247 | 1059 | emit_insn (gen_vashr<mode>3_imm (operands[0], operands[1], operands[2])); | ||
248 | 1015 | DONE; | 1060 | DONE; |
249 | 1016 | }) | 1061 | }) |
250 | 1017 | 1062 | ||
251 | 1018 | (define_expand "vlshr<mode>3" | 1063 | (define_expand "vlshr<mode>3" |
252 | 1019 | [(set (match_operand:VDQIW 0 "s_register_operand" "") | 1064 | [(set (match_operand:VDQIW 0 "s_register_operand" "") |
253 | 1020 | (lshiftrt:VDQIW (match_operand:VDQIW 1 "s_register_operand" "") | 1065 | (lshiftrt:VDQIW (match_operand:VDQIW 1 "s_register_operand" "") |
255 | 1021 | (match_operand:VDQIW 2 "s_register_operand" "")))] | 1066 | (match_operand:VDQIW 2 "imm_rshift_or_reg_neon" "")))] |
256 | 1022 | "TARGET_NEON" | 1067 | "TARGET_NEON" |
257 | 1023 | { | 1068 | { |
258 | 1024 | rtx neg = gen_reg_rtx (<MODE>mode); | 1069 | rtx neg = gen_reg_rtx (<MODE>mode); |
263 | 1025 | 1070 | if (REG_P (operands[2])) | |
264 | 1026 | emit_insn (gen_neg<mode>2 (neg, operands[2])); | 1071 | { |
265 | 1027 | emit_insn (gen_ashl<mode>3_unsigned (operands[0], operands[1], neg)); | 1072 | emit_insn (gen_neg<mode>2 (neg, operands[2])); |
266 | 1028 | 1073 | emit_insn (gen_ashl<mode>3_unsigned (operands[0], operands[1], neg)); | |
267 | 1074 | } | ||
268 | 1075 | else | ||
269 | 1076 | emit_insn (gen_vlshr<mode>3_imm (operands[0], operands[1], operands[2])); | ||
270 | 1029 | DONE; | 1077 | DONE; |
271 | 1030 | }) | 1078 | }) |
272 | 1031 | 1079 | ||
273 | 1032 | 1080 | ||
274 | === modified file 'gcc/config/arm/predicates.md' | |||
275 | --- gcc/config/arm/predicates.md 2011-06-22 15:50:23 +0000 | |||
276 | +++ gcc/config/arm/predicates.md 2011-07-04 14:15:56 +0000 | |||
277 | @@ -585,6 +585,26 @@ | |||
278 | 585 | return neon_immediate_valid_for_move (op, mode, NULL, NULL); | 585 | return neon_immediate_valid_for_move (op, mode, NULL, NULL); |
279 | 586 | }) | 586 | }) |
280 | 587 | 587 | ||
281 | 588 | (define_predicate "imm_for_neon_lshift_operand" | ||
282 | 589 | (match_code "const_vector") | ||
283 | 590 | { | ||
284 | 591 | return neon_immediate_valid_for_shift (op, mode, NULL, NULL, true); | ||
285 | 592 | }) | ||
286 | 593 | |||
287 | 594 | (define_predicate "imm_for_neon_rshift_operand" | ||
288 | 595 | (match_code "const_vector") | ||
289 | 596 | { | ||
290 | 597 | return neon_immediate_valid_for_shift (op, mode, NULL, NULL, false); | ||
291 | 598 | }) | ||
292 | 599 | |||
293 | 600 | (define_predicate "imm_lshift_or_reg_neon" | ||
294 | 601 | (ior (match_operand 0 "s_register_operand") | ||
295 | 602 | (match_operand 0 "imm_for_neon_lshift_operand"))) | ||
296 | 603 | |||
297 | 604 | (define_predicate "imm_rshift_or_reg_neon" | ||
298 | 605 | (ior (match_operand 0 "s_register_operand") | ||
299 | 606 | (match_operand 0 "imm_for_neon_rshift_operand"))) | ||
300 | 607 | |||
301 | 588 | (define_predicate "imm_for_neon_logic_operand" | 608 | (define_predicate "imm_for_neon_logic_operand" |
302 | 589 | (match_code "const_vector") | 609 | (match_code "const_vector") |
303 | 590 | { | 610 | { |
304 | 591 | 611 | ||
305 | === modified file 'gcc/optabs.c' | |||
306 | --- gcc/optabs.c 2011-03-04 10:27:10 +0000 | |||
307 | +++ gcc/optabs.c 2011-07-04 14:15:56 +0000 | |||
308 | @@ -6171,6 +6171,9 @@ | |||
309 | 6171 | init_optab (usashl_optab, US_ASHIFT); | 6171 | init_optab (usashl_optab, US_ASHIFT); |
310 | 6172 | init_optab (ashr_optab, ASHIFTRT); | 6172 | init_optab (ashr_optab, ASHIFTRT); |
311 | 6173 | init_optab (lshr_optab, LSHIFTRT); | 6173 | init_optab (lshr_optab, LSHIFTRT); |
312 | 6174 | init_optabv (vashl_optab, ASHIFT); | ||
313 | 6175 | init_optabv (vashr_optab, ASHIFTRT); | ||
314 | 6176 | init_optabv (vlshr_optab, LSHIFTRT); | ||
315 | 6174 | init_optab (rotl_optab, ROTATE); | 6177 | init_optab (rotl_optab, ROTATE); |
316 | 6175 | init_optab (rotr_optab, ROTATERT); | 6178 | init_optab (rotr_optab, ROTATERT); |
317 | 6176 | init_optab (smin_optab, SMIN); | 6179 | init_optab (smin_optab, SMIN); |
318 | 6177 | 6180 | ||
319 | === added file 'gcc/testsuite/gcc.target/arm/neon-vlshr-imm-1.c' | |||
320 | --- gcc/testsuite/gcc.target/arm/neon-vlshr-imm-1.c 1970-01-01 00:00:00 +0000 | |||
321 | +++ gcc/testsuite/gcc.target/arm/neon-vlshr-imm-1.c 2011-07-04 14:15:56 +0000 | |||
322 | @@ -0,0 +1,11 @@ | |||
323 | 1 | /* { dg-do compile } */ | ||
324 | 2 | /* { dg-require-effective-target arm_neon_ok } */ | ||
325 | 3 | /* { dg-options "-O2 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize" } */ | ||
326 | 4 | /* { dg-final { scan-assembler "vshr\.u32.*#3" } } */ | ||
327 | 5 | |||
328 | 6 | /* Verify that VSHR immediate is used. */ | ||
329 | 7 | void f1(int n, unsigned int x[], unsigned int y[]) { | ||
330 | 8 | int i; | ||
331 | 9 | for (i = 0; i < n; ++i) | ||
332 | 10 | y[i] = x[i] >> 3; | ||
333 | 11 | } | ||
334 | 0 | 12 | ||
335 | === added file 'gcc/testsuite/gcc.target/arm/neon-vshl-imm-1.c' | |||
336 | --- gcc/testsuite/gcc.target/arm/neon-vshl-imm-1.c 1970-01-01 00:00:00 +0000 | |||
337 | +++ gcc/testsuite/gcc.target/arm/neon-vshl-imm-1.c 2011-07-04 14:15:56 +0000 | |||
338 | @@ -0,0 +1,11 @@ | |||
339 | 1 | /* { dg-do compile } */ | ||
340 | 2 | /* { dg-require-effective-target arm_neon_ok } */ | ||
341 | 3 | /* { dg-options "-O2 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize" } */ | ||
342 | 4 | /* { dg-final { scan-assembler "vshl\.i32.*#3" } } */ | ||
343 | 5 | |||
344 | 6 | /* Verify that VSHR immediate is used. */ | ||
345 | 7 | void f1(int n, int x[], int y[]) { | ||
346 | 8 | int i; | ||
347 | 9 | for (i = 0; i < n; ++i) | ||
348 | 10 | y[i] = x[i] << 3; | ||
349 | 11 | } | ||
350 | 0 | 12 | ||
351 | === added file 'gcc/testsuite/gcc.target/arm/neon-vshr-imm-1.c' | |||
352 | --- gcc/testsuite/gcc.target/arm/neon-vshr-imm-1.c 1970-01-01 00:00:00 +0000 | |||
353 | +++ gcc/testsuite/gcc.target/arm/neon-vshr-imm-1.c 2011-07-04 14:15:56 +0000 | |||
354 | @@ -0,0 +1,11 @@ | |||
355 | 1 | /* { dg-do compile } */ | ||
356 | 2 | /* { dg-require-effective-target arm_neon_ok } */ | ||
357 | 3 | /* { dg-options "-O2 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize" } */ | ||
358 | 4 | /* { dg-final { scan-assembler "vshr\.s32.*#3" } } */ | ||
359 | 5 | |||
360 | 6 | /* Verify that VSHR immediate is used. */ | ||
361 | 7 | void f1(int n, int x[], int y[]) { | ||
362 | 8 | int i; | ||
363 | 9 | for (i = 0; i < n; ++i) | ||
364 | 10 | y[i] = x[i] >> 3; | ||
365 | 11 | } |
cbuild has taken a snapshot of this branch at r106768 and queued it for build.
The snapshot is available at: ex.seabright. co.nz/snapshots /gcc-linaro- 4.6+bzr106768~ ramana~ backport- neon-shiftimm- take2-4. 6.tar.xdelta3. xz
http://
and will be built on the following builders:
a9-builder armv5-builder i686 x86_64
You can track the build queue at: ex.seabright. co.nz/helpers/ scheduler
http://
cbuild-snapshot: gcc-linaro- 4.6+bzr106768~ ramana~ backport- neon-shiftimm- take2-4. 6
cbuild-ancestor: lp:gcc-linaro/4.6+bzr106767
cbuild-state: check