1 ; RUN: llc -O1 < %s -march=avr | FileCheck %s
3 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-apple-macosx10.9"
6 %Vs6UInt16 = type <{ i16 }>
9 define hidden void @setServoAngle(i16) {
12 %adjustedAngle = alloca %Vs6UInt16, align 2
13 %1 = bitcast ptr %adjustedAngle to ptr
14 %adjustedAngle._value = getelementptr inbounds %Vs6UInt16, ptr %adjustedAngle, i32 0, i32 0
15 store i16 %0, ptr %adjustedAngle._value, align 2
17 ;print(unsignedInt: adjustedAngle &* UInt16(11))
19 %adjustedAngle._value2 = getelementptr inbounds %Vs6UInt16, ptr %adjustedAngle, i32 0, i32 0
20 %2 = load i16, ptr %adjustedAngle._value2, align 2
25 ; CHECK-DAG: ldi r20, 0
26 ; CHECK-DAG: ldi r21, 0
27 ; CHECK-DAG: ldi r18, 11
28 ; CHECK-DAG: ldi r19, 0
32 ; CHECK: call __mulsi3
33 %3 = call { i16, i1 } @llvm.umul.with.overflow.i16(i16 %2, i16 11)
34 %4 = extractvalue { i16, i1 } %3, 0
35 %5 = extractvalue { i16, i1 } %3, 1
37 ; above code looks fine, how is it lowered?
38 %6 = call i1 @printDefaultParam()
39 call void @print(i16 %4, i1 %6)
45 declare void @print(i16, i1)
46 declare i1 @printDefaultParam()
48 ; Function Attrs: nounwind readnone speculatable
49 declare { i16, i1 } @llvm.umul.with.overflow.i16(i16, i16)