1 ;; This test verifies that basic-block-sections works with address-taken basic blocks.
2 ; RUN: llc < %s -mtriple=x86_64 -basic-block-sections=all | FileCheck %s
4 define void @foo(i1 zeroext %0) nounwind {
6 %1 = select i1 %0, ptr blockaddress(@foo, %bb1), ptr blockaddress(@foo, %bb2) ; <ptr> [#uses=1]
7 indirectbr ptr %1, [label %bb1, label %bb2]
10 ; CHECK: .section .text.foo,"ax",@progbits
12 ; CHECK: movl $.Ltmp0, %eax
13 ; CHECK-NEXT: movl $.Ltmp1, %ecx
14 ; CHECK-NEXT: cmovneq %rax, %rcx
15 ; CHECK-NEXT: jmpq *%rcx
20 ; CHECK: .section .text.foo,"ax",@progbits,unique,1
22 ; CHECK-NEXT: foo.__part.1
23 ; CHECK-NEXT: callq bar
29 ; CHECK: .section .text.foo,"ax",@progbits,unique,2
31 ; CHECK-NEXT: foo.__part.2
32 ; CHECK-NEXT: callq baz