1; RUN: llc -mattr=avr6 < %s -march=avr | FileCheck %s 2 3define i1 @unsigned_multiplication_did_overflow(i8, i8) unnamed_addr { 4; CHECK-LABEL: unsigned_multiplication_did_overflow: 5entry-block: 6 %2 = tail call { i8, i1 } @llvm.umul.with.overflow.i8(i8 %0, i8 %1) 7 %3 = extractvalue { i8, i1 } %2, 1 8 ret i1 %3 9 10; Multiply, return if the high byte is zero 11; 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: ldi {{.*}}[[RET]], 0 18; CHECK: {{.*}}[[LABEL]] 19; CHECK: ret 20} 21 22declare { i8, i1 } @llvm.umul.with.overflow.i8(i8, i8) 23