; RUN: llc < %s -march=bpfel | FileCheck %s @foo_printf.fmt = private unnamed_addr constant [9 x i8] c"hello \0A\00", align 1 ; Function Attrs: nounwind readnone uwtable define i32 @foo_int(i32 %a, i32 %b) #0 { %1 = add nsw i32 %b, %a ret i32 %1 ; CHECK-LABEL: foo_int: ; CHECK: r0 += r1 } ; Function Attrs: nounwind readnone uwtable define signext i8 @foo_char(i8 signext %a, i8 signext %b) #0 { %1 = add i8 %b, %a ret i8 %1 ; CHECK-LABEL: foo_char: ; CHECK: r0 += r1 ; CHECK: r0 <<= 56 ; CHECK: r0 s>>= 56 } ; Function Attrs: nounwind readnone uwtable define i64 @foo_ll(i64 %a, i64 %b, i64 %c) #0 { %1 = add nsw i64 %b, %a %2 = sub i64 %1, %c ret i64 %2 ; CHECK-LABEL: foo_ll: ; CHECK: r0 = r2 ; CHECK: r0 += r1 ; CHECK: r0 -= r3 } ; Function Attrs: nounwind uwtable define void @foo_call2(i32 %a, i32 %b) #1 { %1 = trunc i32 %b to i8 tail call void @foo_2arg(i8 signext %1, i32 %a) #3 ret void ; CHECK-LABEL: foo_call2: ; CHECK: r2 <<= 56 ; CHECK: r2 s>>= 56 ; CHECK: r1 = r2 } declare void @foo_2arg(i8 signext, i32) #2 ; Function Attrs: nounwind uwtable define i32 @foo_call5(i8 signext %a, i16 signext %b, i32 %c, i64 %d) #1 { %1 = tail call i32 @bar(i8 signext %a, i16 signext %b, i32 %c, i64 %d) #3 ret i32 0 ; CHECK-LABEL: foo_call5: ; CHECK: call bar } declare i32 @bar(i8 signext, i16 signext, i32, i64) #2 ; Function Attrs: nounwind readnone uwtable define signext i8 @foo_cmp(i8 signext %a, i8 signext %b) #0 { %1 = icmp slt i8 %a, %b %a.b = select i1 %1, i8 %a, i8 %b ret i8 %a.b ; CHECK-LABEL: foo_cmp: ; CHECK: if r2 s> r0 } ; Function Attrs: nounwind readnone uwtable define i32 @foo_muldiv(i8 signext %a, i16 signext %b, i32 %c, i64 %d) #0 { %1 = icmp eq i8 %a, 0 br i1 %1, label %5, label %2 ;