Catch cases where both branches of an if jump to the same block.
For one reason or the other sometimes we end up with if statements in Cmm where both branch targets are the same:
Actual example from NoFib:
u9oL:
if (_c9oA::P64 != 5) goto u9p2; else goto u9p2;
Which eventually results in this code:
_u9oL:
cmpq $5,%rbx
jne _u9p2 <- utterly pointless
_u9p2:
addq $16,%rbp
jmp _c9iq
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (CodeGen) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |