[llvm] r222629 - R600/SI: Add additional tests for i1 loads

Matt Arsenault Matthew.Arsenault at amd.com
Sat Nov 22 18:57:50 PST 2014


Author: arsenm
Date: Sat Nov 22 20:57:50 2014
New Revision: 222629

URL: http://llvm.org/viewvc/llvm-project?rev=222629&view=rev
Log:
R600/SI: Add additional tests for i1 loads

Modified:
    llvm/trunk/test/CodeGen/R600/load-i1.ll

Modified: llvm/trunk/test/CodeGen/R600/load-i1.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/R600/load-i1.ll?rev=222629&r1=222628&r2=222629&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/R600/load-i1.ll (original)
+++ llvm/trunk/test/CodeGen/R600/load-i1.ll Sat Nov 22 20:57:50 2014
@@ -1,6 +1,5 @@
 ; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs< %s | FileCheck -check-prefix=SI %s
 
-
 ; SI-LABEL: {{^}}global_copy_i1_to_i1:
 ; SI: buffer_load_ubyte
 ; SI: v_and_b32_e32 v{{[0-9]+}}, 1
@@ -11,6 +10,28 @@ define void @global_copy_i1_to_i1(i1 add
   store i1 %load, i1 addrspace(1)* %out, align 1
   ret void
 }
+
+; SI-LABEL: {{^}}local_copy_i1_to_i1:
+; SI: ds_read_u8
+; SI: v_and_b32_e32 v{{[0-9]+}}, 1
+; SI: ds_write_b8
+; SI: s_endpgm
+define void @local_copy_i1_to_i1(i1 addrspace(3)* %out, i1 addrspace(3)* %in) nounwind {
+  %load = load i1 addrspace(3)* %in
+  store i1 %load, i1 addrspace(3)* %out, align 1
+  ret void
+}
+
+; SI-LABEL: {{^}}constant_copy_i1_to_i1:
+; SI: buffer_load_ubyte
+; SI: v_and_b32_e32 v{{[0-9]+}}, 1
+; SI: buffer_store_byte
+; SI: s_endpgm
+define void @constant_copy_i1_to_i1(i1 addrspace(1)* %out, i1 addrspace(2)* %in) nounwind {
+  %load = load i1 addrspace(2)* %in
+  store i1 %load, i1 addrspace(1)* %out, align 1
+  ret void
+}
 
 ; SI-LABEL: {{^}}global_sextload_i1_to_i32:
 ; SI: buffer_load_ubyte





More information about the llvm-commits mailing list