The if-convert-diamond function in the if-conversion initialized Redefs with the live-ins from the first of the two predicated blocks. This may not reflect the liveness of the defined registers correctly, since a register defined in the first block may be live across the other predicated block. The testcase illustrates this situation.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM. That was a subtle issue, thanks.
Some nitpicks below:
lib/CodeGen/IfConversion.cpp | ||
---|---|---|
1434–1435 | I don't understand the new comment (the old comment was pretty bad too though). How about something in the line of: // - BB2 live-in regs need implicit uses before being redefined by BB1 instructions. // - BB1 live-out regs need implicit uses before being redefined by BB2 instructions; // We start with BB1 live-ins so we have the live-out regs after tracking the BB1 instructions. | |
test/CodeGen/Hexagon/ifcvt-impuse-livein.mir | ||
1 | Nice small and to the point test! Would be nice if you could add one sentence about what is tested. | |
16 | The %r1 livein looks unnecessary. |
I don't understand the new comment (the old comment was pretty bad too though).
How about something in the line of: