Mercurial > hg > Members > tobaru > cbc > CbC_llvm
comparison test/CodeGen/Mips/sub1.ll @ 95:afa8332a0e37
LLVM 3.8
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 13 Oct 2015 17:48:58 +0900 |
parents | 95c75e76d11b |
children | 7d135dc70f03 |
comparison
equal
deleted
inserted
replaced
84:f3e34b893a5f | 95:afa8332a0e37 |
---|---|
3 @i = global i32 10, align 4 | 3 @i = global i32 10, align 4 |
4 @.str = private unnamed_addr constant [4 x i8] c"%i\0A\00", align 1 | 4 @.str = private unnamed_addr constant [4 x i8] c"%i\0A\00", align 1 |
5 | 5 |
6 define i32 @main() nounwind { | 6 define i32 @main() nounwind { |
7 entry: | 7 entry: |
8 %0 = load i32* @i, align 4 | 8 %0 = load i32, i32* @i, align 4 |
9 %sub = sub nsw i32 %0, 5 | 9 %sub = sub nsw i32 %0, 5 |
10 ; 16: addiu ${{[0-9]+}}, -{{[0-9]+}} | 10 ; 16: addiu ${{[0-9]+}}, -{{[0-9]+}} |
11 %call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i32 %sub) | 11 %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %sub) |
12 ret i32 0 | 12 ret i32 0 |
13 } | 13 } |
14 | 14 |
15 declare i32 @printf(i8*, ...) | 15 declare i32 @printf(i8*, ...) |