unroll-1.c
254 Bytes
-
[AArch64] Add a new CC mode for SVE conditions · 57d6f4d0
The SVE ACLE patches need to introduce a new CC_NZC mode for the conditions that can be tested after a PTRUE. In particular, LT needs to map to "mi"/"first" and GE to "pl"/"nfrst", instead of the normal CC mapping. Another advantage of using a separate mode is that we can print the SVE names of the conditions, which makes the output a bit easier to read. It therefore seems like an independent improvement that can go in now. The patch also avoids using (compare X (const_int 0)), because that gets folded away when used with LTU and GEU ("cc"/"last" and "cs"/"nlast"). Just using an unspec should be OK. The full set of conditions can't be tested without other SVE ACLE patches. 2019-06-18 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64-modes.def (CC_NZC): New CC_MODE. * config/aarch64/aarch64-sve.md (*<optab><mode>3_cc) (ptest_ptrue<mode>, while_ult<GPI:mode><PRED_ALL:mode>) (*while_ult<GPI:mode><PRED_ALL:mode>_cc, *cmp<cmp_op><mode>) (*cmp<cmp_op><mode>_ptest, *cmp<cmp_op><mode>_cc) (*pred_cmp<cmp_op><mode>_combine, *pred_cmp<cmp_op><mode>) (vec_cmp<mode><vpred>, vec_cmpu<mode><vpred>, cbranch<mode>4): Use CC_NZC instead of CC. * config/aarch64/aarch64.md (condjump): Print a '.' in SVE conditions. * config/aarch64/aarch64.c (aarch64_sve_condition_codes): New variable. (aarch64_print_operand): Handle E_CC_NZCmode. (aarch64_emit_sve_ptrue_op_cc): Use gen_set_clobber_cc_nzc instead of gen_set_clobber_cc. gcc/testsuite/ * gcc.target/aarch64/sve/struct_vect_18.c: Allow branches to contain dots. * gcc.target/aarch64/sve/struct_vect_19.c: Likewise. * gcc.target/aarch64/sve/struct_vect_20.c: Likewise. * gcc.target/aarch64/sve/struct_vect_21.c: Likewise. * gcc.target/aarch64/sve/struct_vect_22.c: Likewise. * gcc.target/aarch64/sve/struct_vect_23.c: Likewise. * gcc.target/aarch64/sve/unroll-1.c: Likewise. * gcc.target/aarch64/sve/while_1.c: Check for b.any. From-SVN: r272427
Richard Sandiford committed