beqc and bnec cannot have $rs == $rt. Inhibit compact branch creation
if that would occur.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This needs a test case. Going by the original 7MB reproducer I think we need a test case with a conditional branch where both operands are evaluated in different basic blocks but can be CSE'd. I think the compiler should have eliminated the branch as well though since 'bnec $5, $5, ...' is never going to be taken.
test/CodeGen/Mips/compactbranches/beqc-bnec-register-constraint.ll | ||
---|---|---|
35–36 ↗ | (On Diff #58767) | ; CHECK-NOT: bnec $[[R0:[0-9]+]], R0 The R0 and R1 should be [[R0]] and [[R1]] Also, I'm not sure variables can be used in the same directive that defines them. I'll double check that. |
Comment Actions
LGTM with the missing [[ and ]] added.
test/CodeGen/Mips/compactbranches/beqc-bnec-register-constraint.ll | ||
---|---|---|
35–36 ↗ | (On Diff #58767) |
This works. |