https://github.com/nikic approved this pull request. LGTM, though I think it would be good to test more cases (you currently test the flag only on one operand, for one of the cases). https://github.com/llvm/llvm-project/pull/121633