On 03/09/14 08:42, Christophe Lyon wrote:
Hi Kyrill,

I've noticed that the tests you added with this patch fail
(scan-tree-dump-times) for the armeb-none-linux-gnueabihf target.
Not sure if you want to fix your patch or the tests?

Hi Christophe,

Ah, I reproduced it on armeb-none-eabi. The problem is that our NEON movmisalign pattern is disabled for big-endian so the vectoriser refuses to do load from the input pointer:
vect-lceilf_1.c:13:3: note: Setting misalignment to -1.
vect-lceilf_1.c:13:3: note: not vectorized: unsupported unaligned load.*_9
vect-lceilf_1.c:13:3: note: bad data alignment.

Seems like that's deliberate:
(define_expand "movmisalign<mode>"
  [(set (match_operand:VDQX 0 "neon_perm_struct_or_reg_operand")
    (unspec:VDQX [(match_operand:VDQX 1 "neon_perm_struct_or_reg_operand")]
             UNSPEC_MISALIGNED_ACCESS))]
  "TARGET_NEON && !BYTES_BIG_ENDIAN && unaligned_access"

I can also see the following tests fail on big-endian:
FAIL: gcc.target/arm/vect-rounding-btruncf.c scan-tree-dump-times vect "vectorized 1 loops" 1 FAIL: gcc.target/arm/vect-rounding-ceilf.c scan-tree-dump-times vect "vectorized 1 loops" 1 FAIL: gcc.target/arm/vect-rounding-floorf.c scan-tree-dump-times vect "vectorized 1 loops" 1 FAIL: gcc.target/arm/vect-rounding-roundf.c scan-tree-dump-times vect "vectorized 1 loops" 1

presumably for the same reason.
I guess the way to fix this is to make the input and output arrays global variables and force them to align to 128 bits so we don't have to use misaligned accesses.

I'll fix the tests up.

Thanks,
Kyrill


Christophe.


On 2 September 2014 17:48, Ramana Radhakrishnan
<ramana.radhakrish...@arm.com> wrote:

On 02/09/14 16:34, Kyrill Tkachov wrote:
Hi all,

In continuation of patch [1/2]...
We can use the vector forms of the vcvt{a,p,m} instructions to vectorise
the l{round, ceil, floor}f functions.
Builtins are added and the TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION
implementation is updated to wire up the vectorised forms of these
functions to the midend.

Bootstrapped and tested on arm-none-linux-gnueabihf.

Ok for trunk?

Ok - thanks.

Ramana

Thanks,
Kyrill

2014-09-02  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>

       PR target/62275
       * config/arm/neon.md
    (neon_vcvt<NEON_VCVT:nvrint_variant><su_optab><VCVTF:mode>
       <v_cmp_result>): New pattern.
       * config/arm/iterators.md (NEON_VCVT): New int iterator.
       * config/arm/arm_neon_builtins.def (vcvtav2sf, vcvtav4sf,
vcvtauv2sf,
       vcvtauv4sf, vcvtpv2sf, vcvtpv4sf, vcvtpuv2sf, vcvtpuv4sf, vcvtmv2sf,
       vcvtmv4sf, vcvtmuv2sf, vcvtmuv4sf): New builtin definitions.
       * config/arm/arm.c (arm_builtin_vectorized_function): Handle
       BUILT_IN_LROUNDF, BUILT_IN_LFLOORF, BUILT_IN_LCEILF.

2014-09-02  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>

       PR target/62275
       * gcc.target/arm/vect-lceilf_1.c: New test.
       * gcc.target/arm/vect-lfloorf_1.c: Likewise.
       * gcc.target/arm/vect-lroundf_1.c: Likewise.



Reply via email to