https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115659
Bug ID: 115659 Summary: powerpc fallout from removing vcond{,u,eq} patterns Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: linkw at gcc dot gnu.org Target Milestone: --- Applying the patch dropping vcond{,u,eq}_optab support (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114189#c2), there is only one failure on both BE and LE: FAIL: gcc.target/powerpc/pr66144-3.c scan-assembler-not \\\\mvspltisw\\\\M Previously I blindly took it as false alarm, but after further checking, I realized it exposed a miss-opt. In function rs6000_emit_vector_cond_expr, there is one optimization /* Optimize vec1 == vec2, to know the mask generates -1/0. */ if (GET_MODE_CLASS (dest_mode) == MODE_VECTOR_INT && (GET_CODE (op_true) == CONST_VECTOR || GET_CODE (op_false) == CONST_VECTOR)) ... , it's some special handling for 1) op_true -1 and op_false 0 2) op_false 0 and op_true -1 3) op_true -1 4) op_false 0 by reusing the result of vector comparison as it returns -1 or 0.