xref: /aosp_15_r20/external/llvm/test/CodeGen/PowerPC/mul-with-overflow.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=ppc32
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workerdeclare {i32, i1} @llvm.umul.with.overflow.i32(i32 %a, i32 %b)
4*9880d681SAndroid Build Coastguard Workerdefine zeroext i1 @a(i32 %x)  nounwind {
5*9880d681SAndroid Build Coastguard Worker  %res = call {i32, i1} @llvm.umul.with.overflow.i32(i32 %x, i32 3)
6*9880d681SAndroid Build Coastguard Worker  %obil = extractvalue {i32, i1} %res, 1
7*9880d681SAndroid Build Coastguard Worker  ret i1 %obil
8*9880d681SAndroid Build Coastguard Worker}
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Workerdeclare {i32, i1} @llvm.smul.with.overflow.i32(i32 %a, i32 %b)
11*9880d681SAndroid Build Coastguard Workerdefine zeroext i1 @b(i32 %x)  nounwind {
12*9880d681SAndroid Build Coastguard Worker  %res = call {i32, i1} @llvm.smul.with.overflow.i32(i32 %x, i32 3)
13*9880d681SAndroid Build Coastguard Worker  %obil = extractvalue {i32, i1} %res, 1
14*9880d681SAndroid Build Coastguard Worker  ret i1 %obil
15*9880d681SAndroid Build Coastguard Worker}
16