This was surfaced by r231064 which introduces more critical edge splitting.
This fixes llvm.org/PR22767.
Differential D8411
Fix bug in Hexagon's AnalyzeBranch function djasper on Mar 18 2015, 4:18 AM. Authored by
Details
This was surfaced by r231064 which introduces more critical edge splitting. This fixes llvm.org/PR22767.
Diff Detail Event TimelineComment Actions I'm actually preparing a better one right now. The problem was caused by incompleteness of Hexagon's InsertBranch and RemoveBranch. AnalyzeBranch handled the combination of ENDLOOP0+J2_jump, which is a loop-end branch (conditional) followed by an unconditional branch, but none of the other two functions did. The instruction ENDLOOP0 has only one explicit operand (the loop header), the other operands are implicit uses/defs of various reserved registers. Your patch picked up PC (program counter), and the branch insertion code interpreted a "Cond" vector with a register in it as a conditional branch, where the register is a predicate register. As a result, the instruction was "J2_jumpt %PC", which is not valid. |