From 73e28f8b2b26ae111958a0dc5cfca4f479da8c8e Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Mon, 8 May 2017 13:32:34 +0000 Subject: [PATCH] Normalize line endings. NFCI, git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302422 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../x86-no_caller_saved_registers-preserve.ll | 26 ++++---- .../X86/x86-no_caller_saved_registers.ll | 62 +++++++++---------- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/test/CodeGen/X86/x86-no_caller_saved_registers-preserve.ll b/test/CodeGen/X86/x86-no_caller_saved_registers-preserve.ll index 7e370c25e31..3052a0f615e 100644 --- a/test/CodeGen/X86/x86-no_caller_saved_registers-preserve.ll +++ b/test/CodeGen/X86/x86-no_caller_saved_registers-preserve.ll @@ -1,7 +1,7 @@ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py for function "bar" ; RUN: llc -mtriple=x86_64-unknown-unknown < %s | FileCheck %s -;; In functions with 'no_caller_saved_registers' attribute, all registers should +;; In functions with 'no_caller_saved_registers' attribute, all registers should ;; be preserved except for registers used for passing/returning arguments. ;; In the following function registers %RDI, %RSI and %XMM0 are used to store ;; arguments %a0, %a1 and %b0 accordingally. The value is returned in %RAX. @@ -28,20 +28,20 @@ define x86_64_sysvcc i32 @bar(i32 %a0, i32 %a1, float %b0) #0 { ret i32 4 } -;; Because "bar" has 'no_caller_saved_registers' attribute, function "foo" -;; doesn't need to preserve registers except for the arguments passed +;; Because "bar" has 'no_caller_saved_registers' attribute, function "foo" +;; doesn't need to preserve registers except for the arguments passed ;; to "bar" (%ESI, %EDI and %XMM0). define x86_64_sysvcc float @foo(i32 %a0, i32 %a1, float %b0) { -; CHECK-LABEL: foo -; CHECK: movaps %xmm0, %xmm1 -; CHECK-NEXT: movl %esi, %ecx -; CHECK-NEXT: movl %edi, %edx -; CHECK-NEXT: callq bar -; CHECK-NEXT: addl %edx, %eax -; CHECK-NEXT: addl %ecx, %eax -; CHECK-NEXT: xorps %xmm0, %xmm0 -; CHECK-NEXT: cvtsi2ssl %eax, %xmm0 -; CHECK-NEXT: addss %xmm0, %xmm1 +; CHECK-LABEL: foo +; CHECK: movaps %xmm0, %xmm1 +; CHECK-NEXT: movl %esi, %ecx +; CHECK-NEXT: movl %edi, %edx +; CHECK-NEXT: callq bar +; CHECK-NEXT: addl %edx, %eax +; CHECK-NEXT: addl %ecx, %eax +; CHECK-NEXT: xorps %xmm0, %xmm0 +; CHECK-NEXT: cvtsi2ssl %eax, %xmm0 +; CHECK-NEXT: addss %xmm0, %xmm1 ; CHECK: retq %call = call i32 @bar(i32 %a0, i32 %a1, float %b0) #0 %c0 = add i32 %a0, %call diff --git a/test/CodeGen/X86/x86-no_caller_saved_registers.ll b/test/CodeGen/X86/x86-no_caller_saved_registers.ll index 9c62e3ee6ba..4e5403d1847 100644 --- a/test/CodeGen/X86/x86-no_caller_saved_registers.ll +++ b/test/CodeGen/X86/x86-no_caller_saved_registers.ll @@ -1,31 +1,31 @@ -; RUN: llc -mtriple=x86_64-unknown-unknown < %s | FileCheck %s -; RUN: llc -mtriple=x86_64-unknown-unknown -O0 < %s | FileCheck %s -; RUN: llc -mtriple=i686-unknown-unknown -mattr=+sse2 < %s | FileCheck %s -; RUN: llc -mtriple=i686-unknown-unknown -mattr=+sse2 -O0 < %s | FileCheck %s - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; In functions with 'no_caller_saved_registers' attribute, all registers should -;; be preserved except for registers used for passing/returning arguments. -;; The test checks that function "bar" preserves xmm0 register. -;; It also checks that caller function "foo" does not store registers for callee -;; "bar". For example, there is no store/load/access to xmm registers. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -define i32 @bar(i32 %a0, i32 %a1, i32 %a2, i32 %a3, i32 %a4, i32 %a5, i32 %a6, i32 %a7, i32 %a8) #0 { -; CHECK-LABEL: bar -; CHECK: mov{{.*}} %xmm0 -; CHECK: mov{{.*}} {{.*}}, %xmm0 -; CHECK: ret - call void asm sideeffect "", "~{xmm0}"() - ret i32 1 -} - -define x86_intrcc void @foo(i8* nocapture readnone %c) { -; CHECK-LABEL: foo -; CHECK-NOT: xmm -entry: - tail call i32 @bar(i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8) #0 - ret void -} - -attributes #0 = { "no_caller_saved_registers" } +; RUN: llc -mtriple=x86_64-unknown-unknown < %s | FileCheck %s +; RUN: llc -mtriple=x86_64-unknown-unknown -O0 < %s | FileCheck %s +; RUN: llc -mtriple=i686-unknown-unknown -mattr=+sse2 < %s | FileCheck %s +; RUN: llc -mtriple=i686-unknown-unknown -mattr=+sse2 -O0 < %s | FileCheck %s + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; In functions with 'no_caller_saved_registers' attribute, all registers should +;; be preserved except for registers used for passing/returning arguments. +;; The test checks that function "bar" preserves xmm0 register. +;; It also checks that caller function "foo" does not store registers for callee +;; "bar". For example, there is no store/load/access to xmm registers. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +define i32 @bar(i32 %a0, i32 %a1, i32 %a2, i32 %a3, i32 %a4, i32 %a5, i32 %a6, i32 %a7, i32 %a8) #0 { +; CHECK-LABEL: bar +; CHECK: mov{{.*}} %xmm0 +; CHECK: mov{{.*}} {{.*}}, %xmm0 +; CHECK: ret + call void asm sideeffect "", "~{xmm0}"() + ret i32 1 +} + +define x86_intrcc void @foo(i8* nocapture readnone %c) { +; CHECK-LABEL: foo +; CHECK-NOT: xmm +entry: + tail call i32 @bar(i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8) #0 + ret void +} + +attributes #0 = { "no_caller_saved_registers" } -- 2.40.0