summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-18 01:19:18 +0000
committerChris Lattner <sabre@nondot.org>2007-12-18 01:19:18 +0000
commit52a9e40789b22d476b0d9869f65a76253d2cc849 (patch)
tree87ba6e455a93b9931ac57a48a6e94b2ea80b62e3 /llvm/lib
parenta8288f4294b942ffdbf63497ed1efde1b41c6b7e (diff)
downloadbcm5719-llvm-52a9e40789b22d476b0d9869f65a76253d2cc849.tar.gz
bcm5719-llvm-52a9e40789b22d476b0d9869f65a76253d2cc849.zip
add a missed case.
llvm-svn: 45141
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/README.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/lib/Target/README.txt b/llvm/lib/Target/README.txt
index 37c0a359a2b..c942d944712 100644
--- a/llvm/lib/Target/README.txt
+++ b/llvm/lib/Target/README.txt
@@ -464,3 +464,21 @@ entry:
}
//===---------------------------------------------------------------------===//
+
+This code is often produced by the SMAX expansion in SCEV:
+
+define i32 @foo(i32 %a) {
+entry:
+ %tmp15 = sub i32 99, %a ; <i32> [#uses=2]
+ %tmp16 = icmp slt i32 %tmp15, 0 ; <i1> [#uses=1]
+ %smax = select i1 %tmp16, i32 0, i32 %tmp15 ; <i32> [#uses=1]
+ %tmp12 = add i32 %smax, %a ; <i32> [#uses=1]
+ %tmp13 = add i32 %tmp12, 1 ; <i32> [#uses=1]
+ ret i32 %tmp13
+}
+
+Note that the tmp12 add can be pushed through the select operands, turning
+it into a "select %tmp16, %a, 99". We apparently already do this in dag
+combine because it isn't present in X86 output.
+
+//===---------------------------------------------------------------------===//
OpenPOWER on IntegriCloud