diff options
author | Chris Lattner <sabre@nondot.org> | 2011-01-24 01:12:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-01-24 01:12:18 +0000 |
commit | b830ee52502cc5896e235df6dba6f96db9f01c41 (patch) | |
tree | 5d7d8608155764a5521613d74f5a3f3340f5352e /llvm/lib/Target/README.txt | |
parent | d83e7b0ff6bf27b18656ce343a41cf85520da955 (diff) | |
download | bcm5719-llvm-b830ee52502cc5896e235df6dba6f96db9f01c41.tar.gz bcm5719-llvm-b830ee52502cc5896e235df6dba6f96db9f01c41.zip |
with recent work, we now optimize this into:
define i32 @foo(i32 %x) nounwind readnone ssp {
entry:
%tobool = icmp eq i32 %x, 0
%tmp5 = select i1 %tobool, i32 2, i32 1
ret i32 %tmp5
}
llvm-svn: 124091
Diffstat (limited to 'llvm/lib/Target/README.txt')
-rw-r--r-- | llvm/lib/Target/README.txt | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/llvm/lib/Target/README.txt b/llvm/lib/Target/README.txt index ea9bc8d84c8..153c7d90680 100644 --- a/llvm/lib/Target/README.txt +++ b/llvm/lib/Target/README.txt @@ -1270,26 +1270,6 @@ SingleSource/Benchmarks/Misc/dt.c //===---------------------------------------------------------------------===// -A/B get pinned to the stack because we turn an if/then into a select instead -of PRE'ing the load/store. This may be fixable in instcombine: -http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37892 - -struct X { int i; }; -int foo (int x) { - struct X a; - struct X b; - struct X *p; - a.i = 1; - b.i = 2; - if (x) - p = &a; - else - p = &b; - return p->i; -} - -//===---------------------------------------------------------------------===// - Interesting missed case because of control flow flattening (should be 2 loads): http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26629 With: llvm-gcc t2.c -S -o - -O0 -emit-llvm | llvm-as | |