Skip to content

Commit 362f89c

Browse files
committed
use update_llc_test_checks.py to tighten checking
Also, replace win and linux runs with a generic run because that makes no difference in what this test is checking. llvm-svn: 235361
1 parent b3cae30 commit 362f89c

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

llvm/test/CodeGen/X86/i64-mem-copy.ll

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1-
; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s -check-prefix=X64
2-
; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s -check-prefix=X64
3-
; X64: movq ({{%rsi|%rdx}}), %r
4-
5-
; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s -check-prefix=X32
6-
; X32: movsd ({{%ecx|%eax}}), %xmm
7-
8-
; Uses movsd to load / store i64 values if sse2 is available.
1+
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=sse2 | FileCheck %s --check-prefix=X64
2+
; RUN: llc < %s -mtriple=i386-unknown-unknown -mattr=sse2 | FileCheck %s --check-prefix=X32
93

4+
; Use movq or movsd to load / store i64 values if sse2 is available.
105
; rdar://6659858
116

12-
define void @foo(i64* %x, i64* %y) nounwind {
13-
entry:
14-
%tmp1 = load i64, i64* %y, align 8 ; <i64> [#uses=1]
15-
store i64 %tmp1, i64* %x, align 8
16-
ret void
7+
define void @foo(i64* %x, i64* %y) {
8+
; X64-LABEL: foo:
9+
; X64: # BB#0:
10+
; X64-NEXT: movq (%rsi), %rax
11+
; X64-NEXT: movq %rax, (%rdi)
12+
; X64-NEXT: retq
13+
;
14+
; X32-LABEL: foo:
15+
; X32: # BB#0:
16+
; X32-NEXT: movl {{[0-9]+}}(%esp), %eax
17+
; X32-NEXT: movl {{[0-9]+}}(%esp), %ecx
18+
; X32-NEXT: movsd {{.*#+}} xmm0 = mem[0],zero
19+
; X32-NEXT: movsd %xmm0, (%eax)
20+
; X32-NEXT: retl
21+
22+
%tmp1 = load i64, i64* %y, align 8
23+
store i64 %tmp1, i64* %x, align 8
24+
ret void
1725
}
26+

0 commit comments

Comments
 (0)