1 ; RUN: llc -mtriple=aarch64-apple-darwin -fast-isel=1 -verify-machineinstrs < %s | FileCheck %s
3 ; Test invalid shift values. This will fall-back to SDAG.
5 define zeroext i8 @and_rs_i8(i8 signext %a, i8 signext %b) {
6 ; CHECK-LABEL: and_rs_i8
7 ; CHECK: and [[REG:w[0-9]+]], w0, w8
8 ; CHECK-NEXT: and {{w[0-9]+}}, [[REG]], #0xff
14 define zeroext i16 @and_rs_i16(i16 signext %a, i16 signext %b) {
15 ; CHECK-LABEL: and_rs_i16
16 ; CHECK: and [[REG:w[0-9]+]], w0, w8
17 ; CHECK-NEXT: and {{w[0-9]+}}, [[REG]], #0xffff
23 define i32 @and_rs_i32(i32 %a, i32 %b) {
24 ; CHECK-LABEL: and_rs_i32
25 ; CHECK: and w0, w0, w8
31 define i64 @and_rs_i64(i64 %a, i64 %b) {
32 ; CHECK-LABEL: and_rs_i64
33 ; CHECK: and x0, x0, x8
40 define zeroext i8 @or_rs_i8(i8 signext %a, i8 signext %b) {
41 ; CHECK-LABEL: or_rs_i8
42 ; CHECK: orr [[REG:w[0-9]+]], w0, w8
43 ; CHECK-NEXT: and {{w[0-9]+}}, [[REG]], #0xff
49 define zeroext i16 @or_rs_i16(i16 signext %a, i16 signext %b) {
50 ; CHECK-LABEL: or_rs_i16
51 ; CHECK: orr [[REG:w[0-9]+]], w0, w8
52 ; CHECK-NEXT: and {{w[0-9]+}}, [[REG]], #0xffff
58 define i32 @or_rs_i32(i32 %a, i32 %b) {
59 ; CHECK-LABEL: or_rs_i32
60 ; CHECK: orr w0, w0, w8
66 define i64 @or_rs_i64(i64 %a, i64 %b) {
67 ; CHECK-LABEL: or_rs_i64
68 ; CHECK: orr x0, x0, x8
75 define zeroext i8 @xor_rs_i8(i8 %a, i8 %b) {
76 ; CHECK-LABEL: xor_rs_i8
77 ; CHECK: eor [[REG:w[0-9]+]], w0, w8
78 ; CHECK-NEXT: and {{w[0-9]+}}, [[REG]], #0xff
84 define zeroext i16 @xor_rs_i16(i16 %a, i16 %b) {
85 ; CHECK-LABEL: xor_rs_i16
86 ; CHECK: eor [[REG:w[0-9]+]], w0, w8
87 ; CHECK-NEXT: and {{w[0-9]+}}, [[REG]], #0xffff
93 define i32 @xor_rs_i32(i32 %a, i32 %b) {
94 ; CHECK-LABEL: xor_rs_i32
95 ; CHECK: eor w0, w0, w8
101 define i64 @xor_rs_i64(i64 %a, i64 %b) {
102 ; CHECK-LABEL: xor_rs_i64
103 ; CHECK: eor x0, x0, x8
110 define i32 @add_rs_i32(i32 %a, i32 %b) {
111 ; CHECK-LABEL: add_rs_i32
112 ; CHECK: add w0, w0, w8
118 define i64 @add_rs_i64(i64 %a, i64 %b) {
119 ; CHECK-LABEL: add_rs_i64
120 ; CHECK: add x0, x0, x8