1; RUN: llc -mtriple=i386 %s -o - | FileCheck --check-prefixes=CHECK,NOFSECT,32 %s 2; RUN: llc -mtriple=x86_64 %s -o - | FileCheck --check-prefixes=CHECK,NOFSECT,64 %s 3 4define void @f0() "patchable-function-entry"="0" { 5; CHECK-LABEL: f0: 6; CHECK-NEXT: .Lfunc_begin0: 7; CHECK-NOT: nop 8; CHECK: ret 9; CHECK: .section __patchable_function_entries,"awo",@progbits,f0,unique,0 10; 32: .p2align 2 11; 32-NEXT: .long .Lfunc_begin0 12; 64: .p2align 3 13; 64-NEXT: .quad .Lfunc_begin0 14 ret void 15} 16 17define void @f1() "patchable-function-entry"="1" { 18; CHECK-LABEL: f1: 19; CHECK: nop 20; CHECK-NEXT: ret 21; NOFSECT: .section __patchable_function_entries,"awo",@progbits,f0,unique,0 22; FSECT: .section __patchable_function_entries,"awo",@progbits,f1,unique,1 23; 32: .p2align 2 24; 32-NEXT: .long .Lfunc_begin1 25; 64: .p2align 3 26; 64-NEXT: .quad .Lfunc_begin1 27 ret void 28} 29 30$f3 = comdat any 31define void @f3() "patchable-function-entry"="3" comdat { 32; CHECK-LABEL: f3: 33; 32-COUNT-3: nop 34; 64: nopl (%rax) 35; CHECK: ret 36; NOFSECT: .section __patchable_function_entries,"aGwo",@progbits,f3,comdat,f3,unique,1 37; FSECT: .section __patchable_function_entries,"aGwo",@progbits,f3,comdat,f3,unique,2 38; 32: .p2align 2 39; 32-NEXT: .long .Lfunc_begin2 40; 64: .p2align 3 41; 64-NEXT: .quad .Lfunc_begin2 42 ret void 43} 44 45$f5 = comdat any 46define void @f5() "patchable-function-entry"="5" comdat { 47; CHECK-LABEL: f5: 48; 32-COUNT-5: nop 49; 64: nopl 8(%rax,%rax) 50; CHECK-NEXT: ret 51; NOFSECT .section __patchable_function_entries,"aGwo",@progbits,f5,comdat,f5,unique,2 52; FSECT: .section __patchable_function_entries,"aGwo",@progbits,f5,comdat,f5,unique,3 53; 32: .p2align 2 54; 32-NEXT: .long .Lfunc_begin3 55; 64: .p2align 3 56; 64-NEXT: .quad .Lfunc_begin3 57 ret void 58} 59