xref: /aosp_15_r20/external/llvm/test/Other/statistic.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -o /dev/null -instsimplify -stats -stats-json 2>&1 | FileCheck %s --check-prefix=JSON
2*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -o /dev/null -instsimplify -stats -stats-json -info-output-file %t && FileCheck %s < %t --check-prefix=JSON
3*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -o /dev/null -instsimplify -stats 2>&1 | FileCheck %s --check-prefix=DEFAULT
4*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -o /dev/null -instsimplify -stats -info-output-file %t && FileCheck %s < %t --check-prefix=DEFAULT
5*9880d681SAndroid Build Coastguard Worker; REQUIRES: asserts
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker; JSON: {
8*9880d681SAndroid Build Coastguard Worker; JSON:   "instsimplify.NumSimplified": 1
9*9880d681SAndroid Build Coastguard Worker; JSON: }
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker; DEFAULT: 1 instsimplify - Number of redundant instructions removed
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Workerdefine i32 @foo() {
14*9880d681SAndroid Build Coastguard Worker  %res = add i32 5, 4
15*9880d681SAndroid Build Coastguard Worker  ret i32 %res
16*9880d681SAndroid Build Coastguard Worker}
17