diff options
| author | Tom Stellard <thomas.stellard@amd.com> | 2014-05-02 15:41:46 +0000 |
|---|---|---|
| committer | Tom Stellard <thomas.stellard@amd.com> | 2014-05-02 15:41:46 +0000 |
| commit | 605e116e8ed1c23e9d4756f34d2645f759c5b39e (patch) | |
| tree | 9034d69f67c7c28b5406b3ed9da403c8ea02265e /llvm/test | |
| parent | eba61071d7bac3933af19064a27b56c02f51be27 (diff) | |
| download | bcm5719-llvm-605e116e8ed1c23e9d4756f34d2645f759c5b39e.tar.gz bcm5719-llvm-605e116e8ed1c23e9d4756f34d2645f759c5b39e.zip | |
R600: Expand TruncStore i64 -> {i16,i8}
llvm-svn: 207844
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/R600/store.ll | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/R600/store.ll b/llvm/test/CodeGen/R600/store.ll index b29ad7e3ab0..c0c8ccc15a3 100644 --- a/llvm/test/CodeGen/R600/store.ll +++ b/llvm/test/CodeGen/R600/store.ll @@ -177,6 +177,26 @@ entry: ret void } +; FUNC-LABEL: @store_i64_i8 +; EG-CHECK: MEM_RAT MSKOR +; SI-CHECK: BUFFER_STORE_BYTE +define void @store_i64_i8(i8 addrspace(1)* %out, i64 %in) { +entry: + %0 = trunc i64 %in to i8 + store i8 %0, i8 addrspace(1)* %out + ret void +} + +; FUNC-LABEL: @store_i64_i16 +; EG-CHECK: MEM_RAT MSKOR +; SI-CHECK: BUFFER_STORE_SHORT +define void @store_i64_i16(i16 addrspace(1)* %out, i64 %in) { +entry: + %0 = trunc i64 %in to i16 + store i16 %0, i16 addrspace(1)* %out + ret void +} + ;===------------------------------------------------------------------------===; ; Local Address Space ;===------------------------------------------------------------------------===; @@ -272,6 +292,26 @@ entry: ret void } +; FUNC-LABEL: @store_local_i64_i8 +; EG-CHECK: LDS_BYTE_WRITE +; SI-CHECK: DS_WRITE_B8 +define void @store_local_i64_i8(i8 addrspace(3)* %out, i64 %in) { +entry: + %0 = trunc i64 %in to i8 + store i8 %0, i8 addrspace(3)* %out + ret void +} + +; FUNC-LABEL: @store_local_i64_i16 +; EG-CHECK: LDS_SHORT_WRITE +; SI-CHECK: DS_WRITE_B16 +define void @store_local_i64_i16(i16 addrspace(3)* %out, i64 %in) { +entry: + %0 = trunc i64 %in to i16 + store i16 %0, i16 addrspace(3)* %out + ret void +} + ; The stores in this function are combined by the optimizer to create a ; 64-bit store with 32-bit alignment. This is legal for SI and the legalizer ; should not try to split the 64-bit store back into 2 32-bit stores. |

