xref: /aosp_15_r20/external/llvm/test/Transforms/SCCP/apint-phi.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -sccp -S | not grep phi
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workerdefine i999 @test(i999%A, i1 %c) {
4*9880d681SAndroid Build Coastguard Workerbb1:
5*9880d681SAndroid Build Coastguard Worker	br label %BB2
6*9880d681SAndroid Build Coastguard WorkerBB2:
7*9880d681SAndroid Build Coastguard Worker	%V = phi i999 [2, %bb1], [%A, %BB4]
8*9880d681SAndroid Build Coastguard Worker	br label %BB3
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard WorkerBB3:
11*9880d681SAndroid Build Coastguard Worker        %E = trunc i999 %V to i1
12*9880d681SAndroid Build Coastguard Worker        %F = and i1 %E, %c
13*9880d681SAndroid Build Coastguard Worker	br i1 %F, label %BB4, label %BB5
14*9880d681SAndroid Build Coastguard WorkerBB4:
15*9880d681SAndroid Build Coastguard Worker	br label %BB2
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard WorkerBB5:
18*9880d681SAndroid Build Coastguard Worker	ret i999 %V
19*9880d681SAndroid Build Coastguard Worker}
20