1 ; RUN: llc < %s -march=avr | FileCheck %s
3 ; Unit test for: PR 31344
5 define 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
13 define 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
21 define 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
29 define 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