https://github.com/kuhar commented: Looks fine upon a quick scan of the patch. Given the number or error code paths, I think it could be made more readable with something like `constFoldBinaryOpConditional` IIRC. https://github.com/llvm/llvm-project/pull/83248