https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101022
Bug ID: 101022 Summary: rs6000: __builtin_altivec_vcmpequt expands to wrong pattern Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: wschmidt at gcc dot gnu.org Target Milestone: --- This line appears in a recent patch committed this week: +BU_P10V_AV_2 (VCMPEQUT, "vcmpequt", CONST, eqvv1ti3) This builtin should expand to the ISA 3.1 vcmpequq instruction, but this definition causes it to expand to bitwise equivalence (not-XOR). That violates the definition of vec_cmpeq, which must return all 0s or all 1s for each lane element. For this type, that means all 0s or all 1s in the entire register.