1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -adce | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -passes=adce | FileCheck %s 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker; Verify that a call to instrument a constant is deleted. 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Worker@__profc_foo = private global [1 x i64] zeroinitializer, section "__llvm_prf_cnts", align 8 7*9880d681SAndroid Build Coastguard Worker@__profd_foo = private global { i64, i64, i64*, i8*, i8*, i32, [1 x i16] } { i64 6699318081062747564, i64 0, i64* getelementptr inbounds ([1 x i64], [1 x i64]* @__profc_foo, i32 0, i32 0), i8* bitcast (i32 ()* @foo to i8*), i8* null, i32 1, [1 x i16] [i16 1] }, section "__llvm_prf_data", align 8 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Workerdefine i32 @foo() { 10*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: __llvm_profile_instrument_target 11*9880d681SAndroid Build Coastguard Workerentry: 12*9880d681SAndroid Build Coastguard Worker tail call void @__llvm_profile_instrument_target(i64 ptrtoint (i32 (i32)* @bar to i64), i8* bitcast ({ i64, i64, i64*, i8*, i8*, i32, [1 x i16] }* @__profd_foo to i8*), i32 0) 13*9880d681SAndroid Build Coastguard Worker %call = tail call i32 @bar(i32 21) 14*9880d681SAndroid Build Coastguard Worker ret i32 %call 15*9880d681SAndroid Build Coastguard Worker} 16*9880d681SAndroid Build Coastguard Worker 17*9880d681SAndroid Build Coastguard Workerdeclare i32 @bar(i32) 18*9880d681SAndroid Build Coastguard Worker 19*9880d681SAndroid Build Coastguard Workerdeclare void @__llvm_profile_instrument_target(i64, i8*, i32) 20