https://github.com/rengolin commented: You should also have tests that comes from `neg` + `add`, pass through canonicalize and still matches the new pattern. This is the original issue that hasn't been checked in this PR. https://github.com/llvm/llvm-project/pull/214033