xref: /aosp_15_r20/external/llvm/test/Transforms/InstCombine/2003-06-05-BranchInvertInfLoop.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; This testcase causes an infinite loop in the instruction combiner,
2*9880d681SAndroid Build Coastguard Worker; because it things that the constant value is a not expression... and
3*9880d681SAndroid Build Coastguard Worker; constantly inverts the branch back and forth.
4*9880d681SAndroid Build Coastguard Worker;
5*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -instcombine -disable-output
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdefine i8 @test19(i1 %c) {
8*9880d681SAndroid Build Coastguard Worker        br i1 true, label %True, label %False
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard WorkerTrue:           ; preds = %0
11*9880d681SAndroid Build Coastguard Worker        ret i8 1
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard WorkerFalse:          ; preds = %0
14*9880d681SAndroid Build Coastguard Worker        ret i8 3
15*9880d681SAndroid Build Coastguard Worker}
16*9880d681SAndroid Build Coastguard Worker
17