https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101325
Bug ID: 101325 Summary: [12 Regression] arm: Wrong code with MVE vcmpeqq intrinsic Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: acoplan at gcc dot gnu.org Target Milestone: --- For the following C testcase: #include <arm_mve.h> mve_pred16_t foo(int8x16_t v, int8x16_t w) { return vcmpeqq (v, w); } GCC trunk with -O2 -march=armv8.1-m.main+mve -mfloat-abi=hard gives: foo: vcmp.i8 eq, q0, q1 vmrs r0, P0 @ movhi and r0, r0, #1 bx lr but the and clears all but the lowest bit of the mask, which is incorrect. GCC 11 and 10 do not appear to be affected. Instead, they generate: foo: vcmp.i8 eq, q0, q1 vmrs r0, P0 @ movhi uxth r0, r0 bx lr