• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -o /dev/null -instsimplify -stats -stats-json 2>&1 | FileCheck %s --check-prefix=JSON
2; RUN: opt < %s -o /dev/null -instsimplify -stats -stats-json -info-output-file %t && FileCheck %s < %t --check-prefix=JSON
3; RUN: opt < %s -o /dev/null -instsimplify -stats -stats-json -time-passes -enable-new-pm=0 2>&1 | FileCheck %s --check-prefixes=JSON,JSONTIME
4; RUN: opt < %s -o /dev/null -instsimplify -stats -stats-json -time-passes -info-output-file %t -enable-new-pm=0 && FileCheck %s < %t --check-prefixes=JSON,JSONTIME
5; RUN: opt < %s -o /dev/null -instsimplify -stats 2>&1 | FileCheck %s --check-prefix=DEFAULT
6; RUN: opt < %s -o /dev/null -instsimplify -stats -info-output-file %t && FileCheck %s < %t --check-prefix=DEFAULT
7; REQUIRES: asserts
8
9; JSON: {
10; JSON-DAG:   "instsimplify.NumSimplified": 1
11; JSONTIME-DAG:   "time.pass.instsimplify.wall"
12; JSONTIME-DAG:   "time.pass.instsimplify.user"
13; JSONTIME-DAG:   "time.pass.instsimplify.sys"
14; JSON: }
15
16; DEFAULT: 1 instsimplify - Number of redundant instructions removed
17
18define i32 @foo() {
19  %res = add i32 5, 4
20  ret i32 %res
21}
22