https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102171

            Bug ID: 102171
           Summary: vget_low_*/vget_high_* intrinsics should become
                    BIT_FIELD_REF during gimple
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
            Blocks: 95958
  Target Milestone: ---
            Target: aarch64*-linux-gnu

#include <arm_neon.h>
float16x4_t f0(float16x8_t b)
{
  return vget_low_f16 (b);
}
float16x4_t f(float16x8_t b)
{
  return vget_high_f16 (b);
}
float16x4_t f1(float16x8_t b)
{
  return ((float16x4_t*)&b)[0];
}
float16x4_t f2(float16x8_t b)
{
  return ((float16x4_t*)&b)[1];
}
---- CUT ----
For little-endian f0 and f1 are the same, and f and f2 are the same.
For big-endian f0 and f2 are the same, and f0 and f1 are the same.

The reason why we should simplify them at the gimple level is to allow the
gimple optimizers do the work for us.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95958
[Bug 95958] [meta-bug] Inefficient arm_neon.h code for AArch64

Reply via email to