diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2005-05-04 17:34:55 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2005-05-04 17:34:55 +0000 |
commit | 57ff221e24597e7152d95236011746c76ce1b4c5 (patch) | |
tree | 164ef07c298be96028f331f44ad96c4c4c2444d9 | |
parent | e8aebf79e199583204eb8034b4560f3cd1f63132 (diff) |
Add a test case for the IsDigitOptimization class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21686 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Transforms/SimplifyLibCalls/IsDigit.ll | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Transforms/SimplifyLibCalls/IsDigit.ll b/test/Transforms/SimplifyLibCalls/IsDigit.ll new file mode 100644 index 0000000000..1f8f7cf548 --- /dev/null +++ b/test/Transforms/SimplifyLibCalls/IsDigit.ll @@ -0,0 +1,17 @@ +; Test that the IsDigitOptimizer works correctly +; RUN: llvm-as < %s | opt -simplify-libcalls | llvm-dis | not grep 'call.*isdigit' + +declare int %isdigit(int) + +implementation ; Functions: + +int %main () { + %val1 = call int %isdigit(int 47) + %val2 = call int %isdigit(int 48) + %val3 = call int %isdigit(int 57) + %val4 = call int %isdigit(int 58) + %rslt1 = add int %val1, %val2 + %rslt2 = add int %val3, %val4 + %rslt = add int %rslt1, %rslt2 + ret int %rslt +} |