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

            Bug ID: 122223
           Summary: MVE: vbic floating-point operations incorrectly
                    simplified
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: clyon at gcc dot gnu.org
          Reporter: clyon at gcc dot gnu.org
  Target Milestone: ---
            Target: arm

#include <arm_mve.h
float32x4_t foo() {
  float32x4_t a = vdupq_n_f32(1.0f); /* 0x3f800000 */
  float32x4_t b = vbicq_f32(a, a);   /* 0x3f800000 & ~0x3f800000 => 0x00000000
*/
  float32x4_t c = vbicq_f32(a, b);   /* 0x3f800000 & ~0x00000000 => 0x3f800000
*/
  return c;
}

Compiled with -march=armv8.1-m.main+mve.fp+fp.dp -mfloat-abi=hard -O2
is simplified to
vmov.f32        q0, #0.0
when it should be
vmov.f32        q0, #1.0

Reply via email to