Mercurial > hg > CbC > CbC_llvm
comparison test/Transforms/MergeFunc/address-spaces.ll @ 0:95c75e76d11b LLVM3.4
LLVM 3.4
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 12 Dec 2013 13:56:28 +0900 |
parents | |
children | afa8332a0e37 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:95c75e76d11b |
---|---|
1 ; RUN: opt -S -mergefunc < %s | FileCheck %s | |
2 | |
3 target datalayout = "p:32:32:32-p1:32:32:32-p2:16:16:16" | |
4 | |
5 declare void @foo(i32) nounwind | |
6 | |
7 ; None of these functions should be merged | |
8 | |
9 define i32 @store_as0(i32* %x) { | |
10 ; CHECK-LABEL: @store_as0( | |
11 ; CHECK: call void @foo( | |
12 %gep = getelementptr i32* %x, i32 4 | |
13 %y = load i32* %gep | |
14 call void @foo(i32 %y) nounwind | |
15 ret i32 %y | |
16 } | |
17 | |
18 define i32 @store_as1(i32 addrspace(1)* %x) { | |
19 ; CHECK-LABEL: @store_as1( | |
20 ; CHECK: call void @foo( | |
21 %gep = getelementptr i32 addrspace(1)* %x, i32 4 | |
22 %y = load i32 addrspace(1)* %gep | |
23 call void @foo(i32 %y) nounwind | |
24 ret i32 %y | |
25 } | |
26 | |
27 define i32 @store_as2(i32 addrspace(2)* %x) { | |
28 ; CHECK-LABEL: @store_as2( | |
29 ; CHECK: call void @foo( | |
30 %gep = getelementptr i32 addrspace(2)* %x, i32 4 | |
31 %y = load i32 addrspace(2)* %gep | |
32 call void @foo(i32 %y) nounwind | |
33 ret i32 %y | |
34 } | |
35 |