Teach mergefunc that intptr_t is the same width as a pointer. We still can't
[llvm.git] / test / FrontendC / 2010-05-18-asmsched.c
blob33b87703220c88bf10bbd0bca286a79b576941f8
1 // RUN: %llvmgcc %s -S -O3 -o - | llc -march=x86-64 -mtriple=x86_64-apple-darwin | FileCheck %s
2 // r9 used to be clobbered before its value was moved to r10. 7993104.
4 void foo(int x, int y) {
5 // CHECK: bar
6 // CHECK: movq %r9, %r10
7 // CHECK: movq %rdi, %r9
8 // CHECK: bar
9 register int lr9 asm("r9") = x;
10 register int lr10 asm("r10") = y;
11 int foo;
12 asm volatile("bar" : "=r"(lr9) : "r"(lr9), "r"(lr10));
13 foo = lr9;
14 lr9 = x;
15 lr10 = foo;
16 asm volatile("bar" : "=r"(lr9) : "r"(lr9), "r"(lr10));