1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
llvm-mirror/test/FrontendC/2010-05-18-asmsched.c
Jakob Stoklund Olesen 4661916c8f Fix test to be less sensitive to coalescing.
This should unbreak llvm-gcc-i386-linux-selfhost.

llvm-svn: 130927
2011-05-05 16:48:00 +00:00

19 lines
531 B
C

// RUN: %llvmgcc %s -S -O3 -o - | llc -march=x86-64 -mtriple=x86_64-apple-darwin | FileCheck %s
// r9 used to be clobbered before its value was moved to r10. 7993104.
void foo(int x, int y) {
// CHECK: bar
// CHECK-NOT: {{, %r9$}}
// CHECK: movq %r9,
// CHECK: movq {{.*}}, %r9
// CHECK: bar
register int lr9 asm("r9") = x;
register int lr10 asm("r10") = y;
int foo;
asm volatile("bar" : "=r"(lr9) : "r"(lr9), "r"(lr10));
foo = lr9;
lr9 = x;
lr10 = foo;
asm volatile("bar" : "=r"(lr9) : "r"(lr9), "r"(lr10));
}