1; RUN: llc < %s -march=avr | FileCheck %s 2 3; Unit test for: PR 31344 4 5define i16 @or16_reg_imm_0xff00(i16 %a) { 6; CHECK-LABEL: or16_reg_imm_0xff00 7; CHECK-NOT: ori {{r[0-9]+}}, 0 8; CHECK: ori {{r[0-9]+}}, 255 9 %result = or i16 %a, 65280 10 ret i16 %result 11} 12 13define i16 @or16_reg_imm_0xffb3(i16 %a) { 14; CHECK-LABEL: or16_reg_imm_0xffb3 15; CHECK: ori {{r[0-9]+}}, 179 16; CHECK: ori {{r[0-9]+}}, 255 17 %result = or i16 %a, 65459 18 ret i16 %result 19} 20 21define i16 @or16_reg_imm_0x00ff(i16 %a) { 22; CHECK-LABEL: or16_reg_imm_0x00ff 23; CHECK: ori {{r[0-9]+}}, 255 24; CHECK-NOT: ori {{r[0-9]+}}, 0 25 %result = or i16 %a, 255 26 ret i16 %result 27} 28 29define i16 @or16_reg_imm_0xb3ff(i16 %a) { 30; CHECK-LABEL: or16_reg_imm_0xb3ff 31; CHECK: ori {{r[0-9]+}}, 255 32; CHECK: ori {{r[0-9]+}}, 179 33 %result = or i16 %a, 46079 34 ret i16 %result 35} 36