1 ; RUN: opt -instrorderfile -S < %s | FileCheck %s
2 ; RUN: opt -passes=instrorderfile -S < %s | FileCheck %s
4 target triple = "x86_64-apple-macosx10.10.0"
6 ; CHECK: @_llvm_order_file_buffer ={{.*}}global [131072 x i64] zeroinitializer
7 ; CHECK: @_llvm_order_file_buffer_idx = linkonce_odr global i32 0
8 ; CHECK: @bitmap_0 ={{.*}}global [1 x i8] zeroinitializer
13 ; CHECK-LABEL: define i32 @_Z1fv
14 ; CHECK: order_file_entry
15 ; CHECK: %[[T1:.+]] = load i8, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @bitmap_0, i32 0, i32 0
16 ; CHECK: store i8 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @bitmap_0, i32 0, i32 0)
17 ; CHECK: %[[T2:.+]] = icmp eq i8 %[[T1]], 0
18 ; CHECK: br i1 %[[T2]], label %order_file_set, label
20 ; CHECK: order_file_set
21 ; CHECK: %[[T3:.+]] = atomicrmw add i32* @_llvm_order_file_buffer_idx, i32 1 seq_cst
22 ; CHECK: %[[T5:.+]] = and i32 %[[T3]], 131071
23 ; CHECK: %[[T4:.+]] = getelementptr [131072 x i64], [131072 x i64]* @_llvm_order_file_buffer, i32 0, i32 %[[T5]]
24 ; CHECK: store i64 {{.*}}, i64* %[[T4]]