S/390 Add vector scalar instruction support.
With this patch GCC makes use of the vector instruction which are available in single element mode. By using these instructions scalar double operations can use 32 registers. gcc/ * config/s390/s390-modes.def: Add new modes CCVEQ, CCVFH, and CCVFHE. * config/s390/s390.c (s390_match_ccmode_set): Handle new modes. (s390_select_ccmode): Likewise. (s390_canonicalize_comparison): Swap operands if necessary. (s390_expand_vec_compare_scalar): Expand DFmode compare using single element vector instructions. (s390_emit_compare): Call s390_expand_vec_compare_scalar. (s390_branch_condition_mask): Generate CC masks for the new modes. * config/s390/s390.md (v0, vf, vd): New mode attributes. (VFCMP, asm_fcmp, insn_cmp): New mode iterator and attributes. (*vec_cmp<insn_cmp>df_cconly, *fixuns_truncdfdi2_z13) (*fix_trunc<BFP:mode><GPR:mode>2_bfp, *floatunsdidf2_z13) (*floatuns<GPR:mode><FP:mode>2, *extendsfdf2_z13) (*extend<DSF:mode><BFP:mode>2): New insn definition. (fix_trunc<BFP:mode><GPR:mode>2_bfp, loatuns<GPR:mode><FP:mode>2) (extend<DSF:mode><BFP:mode>2): Turn into expander. (floatdi<mode>2, truncdfsf2, add<mode>3, sub<mode>3, mul<mode>3) (div<mode>3, *neg<mode>2, *abs<mode>2, *negabs<mode>2) (sqrt<mode>2): Add vector instruction. gcc/testsuite/ * gcc.target/s390/vector/vec-scalar-cmp-1.c: New test. From-SVN: r223397
Showing
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment