summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorChristopher Lamb <christopher.lamb@gmail.com>2007-12-18 09:34:41 +0000
committerChristopher Lamb <christopher.lamb@gmail.com>2007-12-18 09:34:41 +0000
commit8b09a464b4b65f001f8dd05097bcc6b71e4bab5b (patch)
tree68442f9748f8f1e43ae884b8d1f99f136c99468a /llvm/lib/Target
parent91e0fc9cb4514756b11172d75642ca5acf745e7f (diff)
downloadbcm5719-llvm-8b09a464b4b65f001f8dd05097bcc6b71e4bab5b.tar.gz
bcm5719-llvm-8b09a464b4b65f001f8dd05097bcc6b71e4bab5b.zip
Fold certain additions through selects (and their compares) so as to eliminate subtractions. This code is often produced by the SMAX expansion in SCEV.
This implements test/Transforms/InstCombine/2007-12-18-AddSelCmpSub.ll llvm-svn: 45158
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/README.txt18
1 files changed, 0 insertions, 18 deletions
diff --git a/llvm/lib/Target/README.txt b/llvm/lib/Target/README.txt
index c942d944712..37c0a359a2b 100644
--- a/llvm/lib/Target/README.txt
+++ b/llvm/lib/Target/README.txt
@@ -464,21 +464,3 @@ 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