19 lines · plain
1; RUN: llc -mtriple=arm64-apple-darwin -enable-misched=0 -mcpu=cyclone < %s | FileCheck %s2 3; Test that scratch registers are spilled around patchpoints4; CHECK: InlineAsm End5; CHECK-NEXT: mov x{{[0-9]+}}, x166; CHECK-NEXT: mov x{{[0-9]+}}, x177; CHECK-NEXT: Ltmp8; CHECK-NEXT: nop9define void @clobberScratch(ptr %p) {10 %v = load i32, ptr %p11 tail call void asm sideeffect "nop", "~{x0},~{x1},~{x2},~{x3},~{x4},~{x5},~{x6},~{x7},~{x8},~{x9},~{x10},~{x11},~{x12},~{x13},~{x14},~{x15},~{x18},~{x19},~{x20},~{x21},~{x22},~{x23},~{x24},~{x25},~{x26},~{x27},~{x28},~{x29},~{x30},~{x31}"() nounwind12 tail call void (i64, i32, ptr, i32, ...) @llvm.experimental.patchpoint.void(i64 5, i32 20, ptr null, i32 0, ptr %p, i32 %v)13 store i32 %v, ptr %p14 ret void15}16 17declare void @llvm.experimental.patchpoint.void(i64, i32, ptr, i32, ...)18 19