1 ; RUN: llc -verify-machineinstrs -mtriple=x86_64-unknown < %s | FileCheck %s
3 define dso_local void @one_instruction() #0 {
4 ; CHECK-LABEL: one_instruction:
8 ; CHECK: popq %[[x:[^ ]*]]
10 ; CHECK-NEXT: jmpq *%[[x]]
13 ; Function Attrs: noinline nounwind optnone uwtable
14 define dso_local i32 @ordinary_function(i32 %x, i32 %y) #0 {
15 ; CHECK-LABEL: ordinary_function:
17 %x.addr = alloca i32, align 4
18 %y.addr = alloca i32, align 4
19 store i32 %x, ptr %x.addr, align 4
20 store i32 %y, ptr %y.addr, align 4
21 %0 = load i32, ptr %x.addr, align 4
22 %1 = load i32, ptr %y.addr, align 4
23 %add = add nsw i32 %0, %1
26 ; CHECK: popq %[[x:[^ ]*]]
28 ; CHECK-NEXT: jmpq *%[[x]]
31 ; Function Attrs: noinline nounwind optnone uwtable
32 define dso_local i32 @no_caller_saved_registers_function(i32 %x, i32 %y) #1 {
33 ; CHECK-LABEL: no_caller_saved_registers_function:
35 %x.addr = alloca i32, align 4
36 %y.addr = alloca i32, align 4
37 store i32 %x, ptr %x.addr, align 4
38 store i32 %y, ptr %y.addr, align 4
39 %0 = load i32, ptr %x.addr, align 4
40 %1 = load i32, ptr %y.addr, align 4
41 %add = add nsw i32 %0, %1
46 ; CHECK-NEXT: jmpq *%rcx
49 ; Function Attrs: noinline nounwind optnone uwtable
50 define dso_local preserve_mostcc void @preserve_most() #0 {
51 ; CHECK-LABEL: preserve_most:
57 ; CHECK-NEXT: jmpq *%rax
60 ; Function Attrs: noinline nounwind optnone uwtable
61 define dso_local preserve_allcc void @preserve_all() #0 {
62 ; CHECK-LABEL: preserve_all:
68 ; CHECK-NEXT: jmpq *%rax
71 define { i64, i128 } @ret_i64_i128() #0 {
72 ; CHECK-LABEL: ret_i64_i128:
73 ret { i64, i128 } { i64 1, i128 36893488147419103235 }
77 ; CHECK-NEXT: jmpq *%rsi
80 attributes #0 = { "target-features"="+lvi-cfi" }
81 attributes #1 = { "no_caller_saved_registers" "target-features"="+lvi-cfi" }