1*9880d681SAndroid Build Coastguard Worker; RUN: opt < %s -ipsccp -S | grep -v "ret i512 undef" | \ 2*9880d681SAndroid Build Coastguard Worker; RUN: grep "ret i8 2" 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Workerdefine internal i512 @test(i1 %B) { 5*9880d681SAndroid Build Coastguard Worker br i1 %B, label %BB1, label %BB2 6*9880d681SAndroid Build Coastguard WorkerBB1: 7*9880d681SAndroid Build Coastguard Worker %Val = add i512 0, 1 8*9880d681SAndroid Build Coastguard Worker br label %BB3 9*9880d681SAndroid Build Coastguard WorkerBB2: 10*9880d681SAndroid Build Coastguard Worker br label %BB3 11*9880d681SAndroid Build Coastguard WorkerBB3: 12*9880d681SAndroid Build Coastguard Worker %Ret = phi i512 [%Val, %BB1], [2, %BB2] 13*9880d681SAndroid Build Coastguard Worker ret i512 %Ret 14*9880d681SAndroid Build Coastguard Worker} 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Workerdefine i8 @caller() 17*9880d681SAndroid Build Coastguard Worker{ 18*9880d681SAndroid Build Coastguard Worker %t1 = and i2 2, 1 19*9880d681SAndroid Build Coastguard Worker %t11 = trunc i2 %t1 to i1 20*9880d681SAndroid Build Coastguard Worker %t2 = call i512 @test(i1 %t11) 21*9880d681SAndroid Build Coastguard Worker %t3 = trunc i512 %t2 to i8 22*9880d681SAndroid Build Coastguard Worker ret i8 %t3 23*9880d681SAndroid Build Coastguard Worker} 24*9880d681SAndroid Build Coastguard Worker 25