topperc wrote: I don't think this is the right place to fix this. We need to rewrite ``` %add = add i32 %num, 1 %cmp = icmp eq i32 %add, 0 ``` to ``` %cmp = icmp eq i32 %num, -1 ``` Then the rest just works. https://github.com/llvm/llvm-project/pull/144566