diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-08-07 10:29:38 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-08-07 10:29:38 +0000 |
commit | c11b107f21f8f1baf1021999fc7d01b93e00922b (patch) | |
tree | 30b40715cea776c60986056d6fbf36269c6557ff /test/CodeGen | |
parent | e4a4aecffb25df25736fec328d9147ee43335c2b (diff) | |
download | external_llvm-c11b107f21f8f1baf1021999fc7d01b93e00922b.zip external_llvm-c11b107f21f8f1baf1021999fc7d01b93e00922b.tar.gz external_llvm-c11b107f21f8f1baf1021999fc7d01b93e00922b.tar.bz2 |
JumpThreading: Turn a select instruction into branching if it allows to thread one half of the select.
This is a common pattern coming out of simplifycfg generating gross code.
a: ; preds = %entry
%sel = select i1 %cmp1, double %add, double 0.000000e+00
br label %b
b:
%cond5 = phi double [ %sel, %a ], [ %sub, %entry ]
%cmp6 = fcmp oeq double %cond5, 0.000000e+00
br i1 %cmp6, label %if.then, label %if.end
becomes
a:
br i1 %cmp1, label %b, label %if.then
b:
%cond5 = phi double [ %sub, %entry ], [ %add, %a ]
%cmp6 = fcmp oeq double %cond5, 0.000000e+00
br i1 %cmp6, label %if.then, label %if.end
Skipping block b completely if possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187880 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
0 files changed, 0 insertions, 0 deletions