Mercurial > hg > Members > tobaru > cbc > CbC_llvm
comparison test/CodeGen/NVPTX/half.ll @ 121:803732b1fca8
LLVM 5.0
author | kono |
---|---|
date | Fri, 27 Oct 2017 17:07:41 +0900 |
parents | afa8332a0e37 |
children |
comparison
equal
deleted
inserted
replaced
120:1172e4bd9c6f | 121:803732b1fca8 |
---|---|
1 ; RUN: llc < %s -march=nvptx | FileCheck %s | 1 ; RUN: llc < %s -march=nvptx | FileCheck %s |
2 | 2 |
3 define void @test_load_store(half addrspace(1)* %in, half addrspace(1)* %out) { | 3 define void @test_load_store(half addrspace(1)* %in, half addrspace(1)* %out) { |
4 ; CHECK-LABEL: @test_load_store | 4 ; CHECK-LABEL: @test_load_store |
5 ; CHECK: ld.global.u16 [[TMP:%rs[0-9]+]], [{{%r[0-9]+}}] | 5 ; CHECK: ld.global.b16 [[TMP:%h[0-9]+]], [{{%r[0-9]+}}] |
6 ; CHECK: st.global.u16 [{{%r[0-9]+}}], [[TMP]] | 6 ; CHECK: st.global.b16 [{{%r[0-9]+}}], [[TMP]] |
7 %val = load half, half addrspace(1)* %in | 7 %val = load half, half addrspace(1)* %in |
8 store half %val, half addrspace(1) * %out | 8 store half %val, half addrspace(1) * %out |
9 ret void | 9 ret void |
10 } | 10 } |
11 | 11 |
12 define void @test_bitcast_from_half(half addrspace(1)* %in, i16 addrspace(1)* %out) { | 12 define void @test_bitcast_from_half(half addrspace(1)* %in, i16 addrspace(1)* %out) { |
13 ; CHECK-LABEL: @test_bitcast_from_half | 13 ; CHECK-LABEL: @test_bitcast_from_half |
14 ; CHECK: ld.global.u16 [[TMP:%rs[0-9]+]], [{{%r[0-9]+}}] | 14 ; CHECK: ld.global.b16 [[TMP:%h[0-9]+]], [{{%r[0-9]+}}] |
15 ; CHECK: st.global.u16 [{{%r[0-9]+}}], [[TMP]] | 15 ; CHECK: st.global.b16 [{{%r[0-9]+}}], [[TMP]] |
16 %val = load half, half addrspace(1) * %in | 16 %val = load half, half addrspace(1) * %in |
17 %val_int = bitcast half %val to i16 | 17 %val_int = bitcast half %val to i16 |
18 store i16 %val_int, i16 addrspace(1)* %out | 18 store i16 %val_int, i16 addrspace(1)* %out |
19 ret void | 19 ret void |
20 } | 20 } |