; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s 2>%t | FileCheck %s ; RUN: FileCheck --check-prefix=WARN --allow-empty %s <%t ; If this check fails please read test/CodeGen/AArch64/README for instructions on how to resolve it. ; WARN-NOT: warning ; ; SVE Logical Vector Immediate Unpredicated CodeGen ; ; ORR define @orr_i8( %a) { ; CHECK-LABEL: orr_i8: ; CHECK: orr z0.b, z0.b, #0xf ; CHECK-NEXT: ret %elt = insertelement undef, i8 15, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = or %a, %splat ret %res } define @orr_i16( %a) { ; CHECK-LABEL: orr_i16: ; CHECK: orr z0.h, z0.h, #0xfc07 ; CHECK-NEXT: ret %elt = insertelement undef, i16 64519, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = or %a, %splat ret %res } define @orr_i32( %a) { ; CHECK-LABEL: orr_i32: ; CHECK: orr z0.s, z0.s, #0xffff00 ; CHECK-NEXT: ret %elt = insertelement undef, i32 16776960, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = or %a, %splat ret %res } define @orr_i64( %a) { ; CHECK-LABEL: orr_i64: ; CHECK: orr z0.d, z0.d, #0xfffc000000000000 ; CHECK-NEXT: ret %elt = insertelement undef, i64 18445618173802708992, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = or %a, %splat ret %res } ; EOR define @eor_i8( %a) { ; CHECK-LABEL: eor_i8: ; CHECK: eor z0.b, z0.b, #0xf ; CHECK-NEXT: ret %elt = insertelement undef, i8 15, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = xor %a, %splat ret %res } define @eor_i16( %a) { ; CHECK-LABEL: eor_i16: ; CHECK: eor z0.h, z0.h, #0xfc07 ; CHECK-NEXT: ret %elt = insertelement undef, i16 64519, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = xor %a, %splat ret %res } define @eor_i32( %a) { ; CHECK-LABEL: eor_i32: ; CHECK: eor z0.s, z0.s, #0xffff00 ; CHECK-NEXT: ret %elt = insertelement undef, i32 16776960, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = xor %a, %splat ret %res } define @eor_i64( %a) { ; CHECK-LABEL: eor_i64: ; CHECK: eor z0.d, z0.d, #0xfffc000000000000 ; CHECK-NEXT: ret %elt = insertelement undef, i64 18445618173802708992, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = xor %a, %splat ret %res } ; AND define @and_i8( %a) { ; CHECK-LABEL: and_i8: ; CHECK: and z0.b, z0.b, #0xf ; CHECK-NEXT: ret %elt = insertelement undef, i8 15, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = and %a, %splat ret %res } define @and_i16( %a) { ; CHECK-LABEL: and_i16: ; CHECK: and z0.h, z0.h, #0xfc07 ; CHECK-NEXT: ret %elt = insertelement undef, i16 64519, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = and %a, %splat ret %res } define @and_i32( %a) { ; CHECK-LABEL: and_i32: ; CHECK: and z0.s, z0.s, #0xffff00 ; CHECK-NEXT: ret %elt = insertelement undef, i32 16776960, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = and %a, %splat ret %res } define @and_i64( %a) { ; CHECK-LABEL: and_i64: ; CHECK: and z0.d, z0.d, #0xfffc000000000000 ; CHECK-NEXT: ret %elt = insertelement undef, i64 18445618173802708992, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = and %a, %splat ret %res }