Mercurial > hg > CbC > CbC_llvm
comparison test/Transforms/MergeFunc/address-spaces.ll @ 95:afa8332a0e37 LLVM3.8
LLVM 3.8
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 13 Oct 2015 17:48:58 +0900 |
parents | 95c75e76d11b |
children |
comparison
equal
deleted
inserted
replaced
84:f3e34b893a5f | 95:afa8332a0e37 |
---|---|
7 ; None of these functions should be merged | 7 ; None of these functions should be merged |
8 | 8 |
9 define i32 @store_as0(i32* %x) { | 9 define i32 @store_as0(i32* %x) { |
10 ; CHECK-LABEL: @store_as0( | 10 ; CHECK-LABEL: @store_as0( |
11 ; CHECK: call void @foo( | 11 ; CHECK: call void @foo( |
12 %gep = getelementptr i32* %x, i32 4 | 12 %gep = getelementptr i32, i32* %x, i32 4 |
13 %y = load i32* %gep | 13 %y = load i32, i32* %gep |
14 call void @foo(i32 %y) nounwind | 14 call void @foo(i32 %y) nounwind |
15 ret i32 %y | 15 ret i32 %y |
16 } | 16 } |
17 | 17 |
18 define i32 @store_as1(i32 addrspace(1)* %x) { | 18 define i32 @store_as1(i32 addrspace(1)* %x) { |
19 ; CHECK-LABEL: @store_as1( | 19 ; CHECK-LABEL: @store_as1( |
20 ; CHECK: call void @foo( | 20 ; CHECK: call void @foo( |
21 %gep = getelementptr i32 addrspace(1)* %x, i32 4 | 21 %gep = getelementptr i32, i32 addrspace(1)* %x, i32 4 |
22 %y = load i32 addrspace(1)* %gep | 22 %y = load i32, i32 addrspace(1)* %gep |
23 call void @foo(i32 %y) nounwind | 23 call void @foo(i32 %y) nounwind |
24 ret i32 %y | 24 ret i32 %y |
25 } | 25 } |
26 | 26 |
27 define i32 @store_as2(i32 addrspace(2)* %x) { | 27 define i32 @store_as2(i32 addrspace(2)* %x) { |
28 ; CHECK-LABEL: @store_as2( | 28 ; CHECK-LABEL: @store_as2( |
29 ; CHECK: call void @foo( | 29 ; CHECK: call void @foo( |
30 %gep = getelementptr i32 addrspace(2)* %x, i32 4 | 30 %gep = getelementptr i32, i32 addrspace(2)* %x, i32 4 |
31 %y = load i32 addrspace(2)* %gep | 31 %y = load i32, i32 addrspace(2)* %gep |
32 call void @foo(i32 %y) nounwind | 32 call void @foo(i32 %y) nounwind |
33 ret i32 %y | 33 ret i32 %y |
34 } | 34 } |
35 | 35 |