1; RUN: llc -verify-machineinstrs -filetype=asm -o - -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s 2; RUN: llc -verify-machineinstrs -filetype=asm -o - \ 3; RUN: -mtriple=x86_64-unknown-linux-gnu -relocation-model=pic < %s | FileCheck %s 4; RUN: llc -verify-machineinstrs -filetype=asm -o - -mtriple=x86_64-darwin-unknown < %s | FileCheck %s 5 6define i32 @foo() nounwind noinline uwtable "function-instrument"="xray-always" { 7; CHECK: .p2align 1, 0x90 8; CHECK-LABEL: Lxray_sled_0: 9; CHECK: .ascii "\353\t" 10; CHECK-NEXT: nopw 512(%rax,%rax) 11 ret i32 0 12; CHECK: .p2align 1, 0x90 13; CHECK-LABEL: Lxray_sled_1: 14; CHECK: retq 15; CHECK-NEXT: nopw %cs:512(%rax,%rax) 16} 17; CHECK-LABEL: xray_instr_map 18; CHECK-LABEL: Lxray_sleds_start0: 19; CHECK: .quad {{.*}}xray_sled_0 20; CHECK: .quad {{.*}}xray_sled_1 21; CHECK-LABEL: Lxray_sleds_end0: 22; CHECK-LABEL: xray_fn_idx 23; CHECK: .quad {{.*}}xray_sleds_start0 24; CHECK-NEXT: .quad {{.*}}xray_sleds_end0 25 26 27; We test multiple returns in a single function to make sure we're getting all 28; of them with XRay instrumentation. 29define i32 @bar(i32 %i) nounwind noinline uwtable "function-instrument"="xray-always" { 30; CHECK: .p2align 1, 0x90 31; CHECK-LABEL: Lxray_sled_2: 32; CHECK: .ascii "\353\t" 33; CHECK-NEXT: nopw 512(%rax,%rax) 34Test: 35 %cond = icmp eq i32 %i, 0 36 br i1 %cond, label %IsEqual, label %NotEqual 37IsEqual: 38 ret i32 0 39; CHECK: .p2align 1, 0x90 40; CHECK-LABEL: Lxray_sled_3: 41; CHECK: retq 42; CHECK-NEXT: nopw %cs:512(%rax,%rax) 43NotEqual: 44 ret i32 1 45; CHECK: .p2align 1, 0x90 46; CHECK-LABEL: Lxray_sled_4: 47; CHECK: retq 48; CHECK-NEXT: nopw %cs:512(%rax,%rax) 49} 50; CHECK-LABEL: xray_instr_map 51; CHECK-LABEL: Lxray_sleds_start1: 52; CHECK: .quad {{.*}}xray_sled_2 53; CHECK: .quad {{.*}}xray_sled_3 54; CHECK: .quad {{.*}}xray_sled_4 55; CHECK-LABEL: Lxray_sleds_end1: 56; CHECK-LABEL: xray_fn_idx 57; CHECK: .quad {{.*}}xray_sleds_start1 58; CHECK-NEXT: .quad {{.*}}xray_sleds_end1 59