source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Analysis/Lint/address-spaces.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 652 bytes
Line 
1; RUN: opt -lint < %s
2
3target datalayout = "p32:32:32-p1:16:16:16-n16:32"
4
5declare void @foo(i64) nounwind
6
7define i64 @test1(i32 addrspace(1)* %x) nounwind {
8  %y = ptrtoint i32 addrspace(1)* %x to i64
9  ret i64 %y
10}
11
12define <4 x i64> @test1_vector(<4 x i32 addrspace(1)*> %x) nounwind {
13  %y = ptrtoint <4 x i32 addrspace(1)*> %x to <4 x i64>
14  ret <4 x i64> %y
15}
16
17define i32 addrspace(1)* @test2(i64 %x) nounwind {
18  %y = inttoptr i64 %x to i32 addrspace(1)*
19  ret i32 addrspace(1)* %y
20}
21
22define <4 x i32 addrspace(1)*> @test2_vector(<4 x i64> %x) nounwind {
23  %y = inttoptr <4 x i64> %x to <4 x i32 addrspace(1)*>
24  ret <4 x i32 addrspace(1)*> %y
25}
Note: See TracBrowser for help on using the repository browser.