mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-03 17:31:50 +00:00
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
This commit is contained in:
parent
e8aebf79e1
commit
57ff221e24
17
test/Transforms/SimplifyLibCalls/IsDigit.ll
Normal file
17
test/Transforms/SimplifyLibCalls/IsDigit.ll
Normal file
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user