1 ; RUN: llc -mattr=avr6 < %s -march=avr | FileCheck %s
3 define i1 @unsigned_multiplication_did_overflow(i8, i8) unnamed_addr {
4 ; CHECK-LABEL: unsigned_multiplication_did_overflow:
6 %2 = tail call { i8, i1 } @llvm.umul.with.overflow.i8(i8 %0, i8 %1)
7 %3 = extractvalue { i8, i1 } %2, 1
10 ; Multiply, return if the high byte is zero
12 ; CHECK: mul r{{[0-9]+}}, r{{[0-9]+}}
13 ; CHECK: mov [[HIGH:r[0-9]+]], r1
14 ; CHECK: ldi [[RET:r[0-9]+]], 1
15 ; CHECK: cpi {{.*}}[[HIGH]], 0
16 ; CHECK: brne [[LABEL:.LBB[_0-9]+]]
17 ; CHECK: mov {{.*}}[[RET]], r1
18 ; CHECK: {{.*}}[[LABEL]]
22 declare { i8, i1 } @llvm.umul.with.overflow.i8(i8, i8)