1; RUN: llc < %s -march=avr | FileCheck %s 2 3define i8 @or8_reg_reg(i8 %a, i8 %b) { 4; CHECK-LABEL: or8_reg_reg: 5; CHECK: or r24, r22 6 %result = or i8 %a, %b 7 ret i8 %result 8} 9 10define i8 @or8_reg_imm(i8 %a) { 11; CHECK-LABEL: or8_reg_imm: 12; CHECK: ori r24, 5 13 %result = or i8 %a, 5 14 ret i8 %result 15} 16 17define i16 @or16_reg_reg(i16 %a, i16 %b) { 18; CHECK-LABEL: or16_reg_reg: 19; CHECK: or r24, r22 20; CHECK: or r25, r23 21 %result = or i16 %a, %b 22 ret i16 %result 23} 24 25define i16 @or16_reg_imm(i16 %a) { 26; CHECK-LABEL: or16_reg_imm: 27; CHECK: ori r24, 210 28; CHECK: ori r25, 4 29 %result = or i16 %a, 1234 30 ret i16 %result 31} 32 33define i32 @or32_reg_reg(i32 %a, i32 %b) { 34; CHECK-LABEL: or32_reg_reg: 35; CHECK: or r22, r18 36; CHECK: or r23, r19 37; CHECK: or r24, r20 38; CHECK: or r25, r21 39 %result = or i32 %a, %b 40 ret i32 %result 41} 42 43define i32 @or32_reg_imm(i32 %a) { 44; CHECK-LABEL: or32_reg_imm: 45; CHECK: ori r22, 21 46; CHECK: ori r23, 205 47; CHECK: ori r24, 91 48; CHECK: ori r25, 7 49 %result = or i32 %a, 123456789 50 ret i32 %result 51} 52 53define i64 @or64_reg_reg(i64 %a, i64 %b) { 54; CHECK-LABEL: or64_reg_reg: 55; CHECK: or r18, r10 56; CHECK: or r19, r11 57; CHECK: or r20, r12 58; CHECK: or r21, r13 59; CHECK: or r22, r14 60; CHECK: or r23, r15 61; CHECK: or r24, r16 62; CHECK: or r25, r17 63 %result = or i64 %a, %b 64 ret i64 %result 65} 66 67define i64 @or64_reg_imm(i64 %a) { 68; CHECK-LABEL: or64_reg_imm: 69; CHECK: ori r18, 204 70; CHECK: ori r19, 204 71; CHECK: ori r20, 204 72; CHECK: ori r21, 204 73; CHECK: ori r22, 204 74; CHECK: ori r23, 204 75; CHECK: ori r24, 204 76; CHECK: ori r25, 204 77 %result = or i64 %a, 14757395258967641292 78 ret i64 %result 79} 80 81