https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123268
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jeff Law <[email protected]>: https://gcc.gnu.org/g:9a50005a5fdf2bb2534c9bcbbdba77cdad3e3f43 commit r16-6580-g9a50005a5fdf2bb2534c9bcbbdba77cdad3e3f43 Author: Robin Dapp <[email protected]> Date: Thu Jan 8 08:35:52 2026 -0700 Re: [PATCH] match: Check else value compatibility [PR123268]. In PR123268 we transform x * { 0 or 1, 0 or 1, ... } into x & { 0 or -1, 0 or -1, ...} which is a match.pd pattern. We start out with vect_b_28.48_48 = .COND_LEN_MUL ({ -1, -1, -1, -1 }, a, b, { 0.0, 0.0, 0.0, 0.0 }, 4, 0); and simplify to _67 = .COND_LEN_AND ({ -1, -1, -1, -1 }, _60, { 4294967295, 0, 0, 0 }, { 0.0, 0.0, 0.0, 0.0 }, 4, 0); where the operation type is int but the else value (that we just copied over from the original op) is still float. In order to catch that, this patch checks if the operation type and the else value type are compatible while reassembling the conditional operation. PR target/123268 gcc/ChangeLog: * gimple-match-exports.cc (convert_conditional_op): Check if orig_op->type and type of else value match.
