29 lines · plain
1; RUN: opt -disable-verify -passes=instcombine < %s -opt-bisect-limit=0 -opt-bisect-print-ir-path=%t -disable-output 2; RUN: FileCheck %s --check-prefix=LIMIT0 --input-file %t3; RUN: opt -disable-verify -passes=instcombine < %s -opt-bisect-limit=1 -opt-bisect-print-ir-path=%t -disable-output 4; RUN: FileCheck %s --check-prefix=LIMIT1 --input-file %t5; RUN: opt -disable-verify -passes=instcombine < %s -opt-bisect-limit=2 -opt-bisect-print-ir-path=%t -disable-output 6; FIXME: print IR if limit is higher than number of opt-bisect invocations7 8; Check that we only print the module once9; RUN: opt -disable-verify -passes=instcombine < %s -opt-bisect-limit=1 -opt-bisect-print-ir-path=- -disable-output 2>&1 | FileCheck %s10 11; LIMIT0: ret i32 %r12; LIMIT0: ret i32 %r13 14; LIMIT1: ret i32 215; LIMIT1: ret i32 %r16 17; CHECK: ModuleID18; CHECK-NOT: ModuleID19 20define i32 @f1() {21 %r = add i32 1, 122 ret i32 %r23}24 25define i32 @f2() {26 %r = add i32 1, 127 ret i32 %r28}29