InstCombine folds instructions with irrelevant conditions to undef.
This, as Nuno confirmed is a bug.
https://bugs.llvm.org/show_bug.cgi?id=33409#c1
Given the original motivation for the change is that of removing an USE, I suggested to just fold to a constant instead (which seems to reach the same goal without side effects).
Fixes PR33409 (which also contains a more detailed discussion of the bug).
I think we want !isa<ConstantInt> instead of Constant. The branch condition could be some crazy (icmp i32 (ptrtoint ... to i32), ...) and replacing it with false is more canonical.