aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2015-03-21 01:23:15 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2015-03-21 01:23:15 +0000
commit7173b669b47fecc0570846ac37b7809f1e6550ed (patch)
treedd586f438bcc6079ea4c1a245d1a9aac5bc4e42b /llvm/lib/CodeGen/MachineFunction.cpp
parente6bb09ac3f15c481f8f3cda71e46ed1133c21bd4 (diff)
downloadllvm-7173b669b47fecc0570846ac37b7809f1e6550ed.zip
llvm-7173b669b47fecc0570846ac37b7809f1e6550ed.tar.gz
llvm-7173b669b47fecc0570846ac37b7809f1e6550ed.tar.bz2
[CodeGen][IfCvt] Don't re-ifcvt blocks with unanalyzable terminators.
If we couldn't analyze its terminator (i.e., it's an indirectbr, or some other weirdness), we can't safely re-if-convert a predicated block, because we can't tell whether the predicated terminator can fallthrough (it does). Currently, we would completely ignore the fallthrough successor. In the added testcase, this means we used to generate: ... @ %entry: cmp r5, #21 ittt ne @ %cc1f: cmpne r7, #42 @ %cc2t: strne.w r5, [r8] movne pc, r10 @ %cc1t: ... Whereas the successor of %cc1f was originally %bb1. With the fix, we get the correct: ... @ %entry: cmp r5, #21 itt eq @ %cc1t: streq.w r5, [r11] moveq pc, r0 @ %cc1f: cmp r7, #42 itt ne @ %cc2t: strne.w r5, [r8] movne pc, r10 @ %bb1: ... rdar://20192768 Differential Revision: http://reviews.llvm.org/D8509 llvm-svn: 232872
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
0 files changed, 0 insertions, 0 deletions