Re: Regression Failures after defining TARGET_VECTOR_MODE_SUPPORTED_P

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ina Pandit <Ina.Pandit@xxxxxxxxxxxxxxx> writes:

> We have been implementing GCC port for a new target.
>
> I am getting the following regression failures,
> ============================================================================
> FAIL: gcc.dg/tree-ssa/gen-vect-11a.c scan-tree-dump-times vect "vectorized 1 loops" 1
> FAIL: gcc.dg/tree-ssa/gen-vect-2.c scan-tree-dump-times vect "vectorized 1 loops" 1
> FAIL: gcc.dg/tree-ssa/gen-vect-25.c scan-tree-dump-times vect "vectorized 2 loops" 1
> ============================================================================
>
> For this target, the mode V2HI is supported. Hence the macro 'TARGET_VECTOR_MODE_SUPPORTED_P' has been defined in the following manner, 
>
> ===================================================================
> #undef TARGET_VECTOR_MODE_SUPPORTED_P
> #define TARGET_VECTOR_MODE_SUPPORTED_P xxx_vector_mode_supported_p
>
> bool
> xxx_vector_mode_supported_p (enum machine_mode mode)
> {
>   return (mode == V2HImode) ;
> }
> ===================================================================
>
> However, it is observed that these test cases pass if this macro is NOT defined.
> Am I missing something? Do I need to define something else?

This means that the loop was not vectorized for some reason.  It's
possible that you are simply missing the expected vector operations.
This is not a bug in your compiler.  It's a bug in the test case, which
assumes that certain operations (e.g., binary &) are available for the
vector types.  The operation is available when gcc is simulating vectors
using generic code, but it need not be available on real hardware.  That
is not a bug, it just means that that sort loop will not be vectorized.
This case is assuming that the loop will be vectorized.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux