goldsteinn wrote: > Given how the test cases show variables and not just constants, can this fold apply to variables too? I don't think the fold is profitable if we can't constant fold the `xor`. https://github.com/llvm/llvm-project/pull/87734