xref: /aosp_15_r20/external/llvm/test/Transforms/InstCombine/2004-03-13-InstCombineInfLoop.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; This testcase caused the combiner to go into an infinite loop, moving the
2*9880d681SAndroid Build Coastguard Worker; cast back and forth, changing the seteq to operate on int vs uint and back.
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -instcombine -disable-output
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Workerdefine i1 @test(i32 %A, i32 %B) {
7*9880d681SAndroid Build Coastguard Worker        %C = sub i32 0, %A              ; <i32> [#uses=1]
8*9880d681SAndroid Build Coastguard Worker        %Cc = bitcast i32 %C to i32             ; <i32> [#uses=1]
9*9880d681SAndroid Build Coastguard Worker        %D = sub i32 0, %B              ; <i32> [#uses=1]
10*9880d681SAndroid Build Coastguard Worker        %E = icmp eq i32 %Cc, %D                ; <i1> [#uses=1]
11*9880d681SAndroid Build Coastguard Worker        ret i1 %E
12*9880d681SAndroid Build Coastguard Worker}
13*9880d681SAndroid Build Coastguard Worker
14