summaryrefslogtreecommitdiffstats
path: root/test/Transforms/SimplifyLibCalls
diff options
context:
space:
mode:
authorMeador Inge <meadori@codesourcery.com>2012-11-26 03:38:52 +0000
committerMeador Inge <meadori@codesourcery.com>2012-11-26 03:38:52 +0000
commit38c4441797a9c90dee830d9b90491742ff83d42c (patch)
tree44e6aaa0c2baeb387af9cbcf93bb3daa80ba588d /test/Transforms/SimplifyLibCalls
parent017bb750ab99b2ca54771fc86a6b2fed4ad90eec (diff)
downloadexternal_llvm-38c4441797a9c90dee830d9b90491742ff83d42c.zip
external_llvm-38c4441797a9c90dee830d9b90491742ff83d42c.tar.gz
external_llvm-38c4441797a9c90dee830d9b90491742ff83d42c.tar.bz2
instcombine: Migrate toascii optimizations
This patch migrates the toascii optimizations from the simplify-libcalls pass into the instcombine library call simplifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168580 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/SimplifyLibCalls')
-rw-r--r--test/Transforms/SimplifyLibCalls/ToAscii.ll21
1 files changed, 0 insertions, 21 deletions
diff --git a/test/Transforms/SimplifyLibCalls/ToAscii.ll b/test/Transforms/SimplifyLibCalls/ToAscii.ll
deleted file mode 100644
index aef4733..0000000
--- a/test/Transforms/SimplifyLibCalls/ToAscii.ll
+++ /dev/null
@@ -1,21 +0,0 @@
-; Test that the ToAsciiOptimizer works correctly
-; RUN: opt < %s -simplify-libcalls -S | \
-; RUN: not grep "call.*toascii"
-
-declare i32 @toascii(i32)
-
-define i32 @main() {
- %val1 = call i32 @toascii( i32 1 ) ; <i32> [#uses=1]
- %val2 = call i32 @toascii( i32 0 ) ; <i32> [#uses=1]
- %val3 = call i32 @toascii( i32 127 ) ; <i32> [#uses=1]
- %val4 = call i32 @toascii( i32 128 ) ; <i32> [#uses=1]
- %val5 = call i32 @toascii( i32 255 ) ; <i32> [#uses=1]
- %val6 = call i32 @toascii( i32 256 ) ; <i32> [#uses=1]
- %rslt1 = add i32 %val1, %val2 ; <i32> [#uses=1]
- %rslt2 = add i32 %val3, %val4 ; <i32> [#uses=1]
- %rslt3 = add i32 %val5, %val6 ; <i32> [#uses=1]
- %rslt4 = add i32 %rslt1, %rslt2 ; <i32> [#uses=1]
- %rslt5 = add i32 %rslt4, %rslt3 ; <i32> [#uses=1]
- ret i32 %rslt5
-}
-