https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112374
--- Comment #35 from Robin Dapp <rdapp at gcc dot gnu.org> --- What does get rid of the comparison failures in the three last posted reduced examples is: gcall *call = dyn_cast<gcall *> (op_use_stmt); internal_fn ifn; if (call && gimple_call_internal_p (call)) { ifn = gimple_call_internal_fn (call); unsigned else_pos = internal_fn_else_index (ifn); for (unsigned int j = 0; j < gimple_call_num_args (call); ++j) { if (j == else_pos) continue; if (gimple_call_arg (call, j) == op.ops[opi]) cnt++; } } i.e. ignoring the else altogether.