[llvm] d9bff3b - Update tests for @llvm.memcpy.inline intrinsics

Guillaume Chatelet via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 01:33:06 PST 2020


Author: Guillaume Chatelet
Date: 2020-01-28T10:32:43+01:00
New Revision: d9bff3be99ed579c4d14bf57c3025972136f9656

URL: https://github.com/llvm/llvm-project/commit/d9bff3be99ed579c4d14bf57c3025972136f9656
DIFF: https://github.com/llvm/llvm-project/commit/d9bff3be99ed579c4d14bf57c3025972136f9656.diff

LOG: Update tests for @llvm.memcpy.inline intrinsics

Added: 
    llvm/test/CodeGen/AMDGPU/memcpy-inline-fails.ll

Modified: 
    llvm/test/CodeGen/X86/memcpy-inline.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/AMDGPU/memcpy-inline-fails.ll b/llvm/test/CodeGen/AMDGPU/memcpy-inline-fails.ll
new file mode 100644
index 000000000000..88107ea23252
--- /dev/null
+++ b/llvm/test/CodeGen/AMDGPU/memcpy-inline-fails.ll
@@ -0,0 +1,11 @@
+; NOTE: This is expected to fail on target that do not support memcpy.	
+; RUN: llc < %s -mtriple=r600-unknown-linux-gnu 2> %t.err || true	
+; RUN: FileCheck --input-file %t.err %s
+
+declare void @llvm.memcpy.inline.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1) nounwind
+
+define void @test1(i8* %a, i8* %b) nounwind {
+; CHECK: LLVM ERROR
+  tail call void @llvm.memcpy.inline.p0i8.p0i8.i64(i8* %a, i8* %b, i64 8, i1 0 )
+  ret void
+}

diff  --git a/llvm/test/CodeGen/X86/memcpy-inline.ll b/llvm/test/CodeGen/X86/memcpy-inline.ll
index d563679aac08..a91e6d482137 100644
--- a/llvm/test/CodeGen/X86/memcpy-inline.ll
+++ b/llvm/test/CodeGen/X86/memcpy-inline.ll
@@ -1,35 +1,34 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=core2 | FileCheck -check-prefix=X64 %s
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=core2 | FileCheck %s
 
 declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1) nounwind
 declare void @llvm.memcpy.inline.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1) nounwind
 
 define void @test1(i8* %a, i8* %b) nounwind {
-; X64-LABEL: test1:
-; X64:       # %bb.0:
-; X64-NEXT:    movq (%rsi), %rax
-; X64-NEXT:    movq %rax, (%rdi)
-; X64-NEXT:    retq
-; R600: LLVM ERROR
+; CHECK-LABEL: test1:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    movq (%rsi), %rax
+; CHECK-NEXT:    movq %rax, (%rdi)
+; CHECK-NEXT:    retq
   tail call void @llvm.memcpy.inline.p0i8.p0i8.i64(i8* %a, i8* %b, i64 8, i1 0 )
   ret void
 }
 
 define void @regular_memcpy_calls_external_function(i8* %a, i8* %b) nounwind {
-; X64-LABEL: regular_memcpy_calls_external_function:
-; X64:       # %bb.0:
-; X64-NEXT:    movl $128, %edx
-; X64-NEXT:    jmp memcpy # TAILCALL
+; CHECK-LABEL: regular_memcpy_calls_external_function:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    movl $128, %edx
+; CHECK-NEXT:    jmp memcpy # TAILCALL
   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %a, i8* %b, i64 128, i1 0 )
   ret void
 }
 
 define void @inlined_copy_doesnt_call_external_function(i8* %a, i8* %b) nounwind {
-; X64-LABEL: inlined_copy_doesnt_call_external_function:
-; X64:       # %bb.0:
-; X64-NEXT:    movl $128, %ecx
-; X64-NEXT:    rep;movsb (%rsi), %es:(%rdi)
-; X64-NEXT:    retq
+; CHECK-LABEL: inlined_copy_doesnt_call_external_function:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    movl $128, %ecx
+; CHECK-NEXT:    rep;movsb (%rsi), %es:(%rdi)
+; CHECK-NEXT:    retq
   tail call void @llvm.memcpy.inline.p0i8.p0i8.i64(i8* %a, i8* %b, i64 128, i1 0 )
   ret void
 }


        


More information about the llvm-commits mailing list