mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-30 23:42:52 +01:00
793d169d29
llvm-svn: 21687
19 lines
503 B
LLVM
19 lines
503 B
LLVM
; 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
|
|
%sum = add int %rslt1, %rslt2
|
|
%rslt = call int %isdigit(int %sum)
|
|
ret int %rslt
|
|
}
|