; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py ; 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 ; ; SMAX ; define @smax_i8_pos( %a) { ; CHECK-LABEL: smax_i8_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: smax z0.b, z0.b, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i8 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp sgt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smax_i8_neg( %a) { ; CHECK-LABEL: smax_i8_neg: ; CHECK: // %bb.0: ; CHECK-NEXT: smax z0.b, z0.b, #-58 ; CHECK-NEXT: ret %elt = insertelement undef, i8 -58, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp sgt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smax_i16_pos( %a) { ; CHECK-LABEL: smax_i16_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: smax z0.h, z0.h, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i16 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp sgt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smax_i16_neg( %a) { ; CHECK-LABEL: smax_i16_neg: ; CHECK: // %bb.0: ; CHECK-NEXT: smax z0.h, z0.h, #-58 ; CHECK-NEXT: ret %elt = insertelement undef, i16 -58, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp sgt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smax_i16_out_of_range( %a) { ; CHECK-LABEL: smax_i16_out_of_range: ; CHECK: // %bb.0: ; CHECK-NEXT: mov w8, #257 ; CHECK-NEXT: mov z1.h, w8 ; CHECK-NEXT: ptrue p0.h ; CHECK-NEXT: smax z0.h, p0/m, z0.h, z1.h ; CHECK-NEXT: ret %elt = insertelement undef, i16 257, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp sgt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smax_i32_pos( %a) { ; CHECK-LABEL: smax_i32_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: smax z0.s, z0.s, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i32 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp sgt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smax_i32_neg( %a) { ; CHECK-LABEL: smax_i32_neg: ; CHECK: // %bb.0: ; CHECK-NEXT: smax z0.s, z0.s, #-58 ; CHECK-NEXT: ret %elt = insertelement undef, i32 -58, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp sgt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smax_i32_out_of_range( %a) { ; CHECK-LABEL: smax_i32_out_of_range: ; CHECK: // %bb.0: ; CHECK-NEXT: mov w8, #-129 ; CHECK-NEXT: mov z1.s, w8 ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: smax z0.s, p0/m, z0.s, z1.s ; CHECK-NEXT: ret %elt = insertelement undef, i32 -129, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp sgt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smax_i64_pos( %a) { ; CHECK-LABEL: smax_i64_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: smax z0.d, z0.d, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i64 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp sgt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smax_i64_neg( %a) { ; CHECK-LABEL: smax_i64_neg: ; CHECK: // %bb.0: ; CHECK-NEXT: smax z0.d, z0.d, #-58 ; CHECK-NEXT: ret %elt = insertelement undef, i64 -58, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp sgt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smax_i64_out_of_range( %a) { ; CHECK-LABEL: smax_i64_out_of_range: ; CHECK: // %bb.0: ; CHECK-NEXT: mov w8, #65535 ; CHECK-NEXT: mov z1.d, x8 ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: smax z0.d, p0/m, z0.d, z1.d ; CHECK-NEXT: ret %elt = insertelement undef, i64 65535, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp sgt %a, %splat %res = select %cmp, %a, %splat ret %res } ; ; SMIN ; define @smin_i8_pos( %a) { ; CHECK-LABEL: smin_i8_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: smin z0.b, z0.b, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i8 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp slt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smin_i8_neg( %a) { ; CHECK-LABEL: smin_i8_neg: ; CHECK: // %bb.0: ; CHECK-NEXT: smin z0.b, z0.b, #-58 ; CHECK-NEXT: ret %elt = insertelement undef, i8 -58, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp slt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smin_i16_pos( %a) { ; CHECK-LABEL: smin_i16_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: smin z0.h, z0.h, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i16 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp slt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smin_i16_neg( %a) { ; CHECK-LABEL: smin_i16_neg: ; CHECK: // %bb.0: ; CHECK-NEXT: smin z0.h, z0.h, #-58 ; CHECK-NEXT: ret %elt = insertelement undef, i16 -58, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp slt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smin_i16_out_of_range( %a) { ; CHECK-LABEL: smin_i16_out_of_range: ; CHECK: // %bb.0: ; CHECK-NEXT: mov w8, #257 ; CHECK-NEXT: mov z1.h, w8 ; CHECK-NEXT: ptrue p0.h ; CHECK-NEXT: smin z0.h, p0/m, z0.h, z1.h ; CHECK-NEXT: ret %elt = insertelement undef, i16 257, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp slt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smin_i32_pos( %a) { ; CHECK-LABEL: smin_i32_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: smin z0.s, z0.s, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i32 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp slt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smin_i32_neg( %a) { ; CHECK-LABEL: smin_i32_neg: ; CHECK: // %bb.0: ; CHECK-NEXT: smin z0.s, z0.s, #-58 ; CHECK-NEXT: ret %elt = insertelement undef, i32 -58, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp slt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smin_i32_out_of_range( %a) { ; CHECK-LABEL: smin_i32_out_of_range: ; CHECK: // %bb.0: ; CHECK-NEXT: mov w8, #-129 ; CHECK-NEXT: mov z1.s, w8 ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: smin z0.s, p0/m, z0.s, z1.s ; CHECK-NEXT: ret %elt = insertelement undef, i32 -129, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp slt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smin_i64_pos( %a) { ; CHECK-LABEL: smin_i64_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: smin z0.d, z0.d, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i64 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp slt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smin_i64_neg( %a) { ; CHECK-LABEL: smin_i64_neg: ; CHECK: // %bb.0: ; CHECK-NEXT: smin z0.d, z0.d, #-58 ; CHECK-NEXT: ret %elt = insertelement undef, i64 -58, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp slt %a, %splat %res = select %cmp, %a, %splat ret %res } define @smin_i64_out_of_range( %a) { ; CHECK-LABEL: smin_i64_out_of_range: ; CHECK: // %bb.0: ; CHECK-NEXT: mov w8, #65535 ; CHECK-NEXT: mov z1.d, x8 ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: smin z0.d, p0/m, z0.d, z1.d ; CHECK-NEXT: ret %elt = insertelement undef, i64 65535, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp slt %a, %splat %res = select %cmp, %a, %splat ret %res } ; ; UMAX ; define @umax_i8_pos( %a) { ; CHECK-LABEL: umax_i8_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: umax z0.b, z0.b, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i8 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ugt %a, %splat %res = select %cmp, %a, %splat ret %res } define @umax_i8_large( %a) { ; CHECK-LABEL: umax_i8_large: ; CHECK: // %bb.0: ; CHECK-NEXT: umax z0.b, z0.b, #129 ; CHECK-NEXT: ret %elt = insertelement undef, i8 129, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ugt %a, %splat %res = select %cmp, %a, %splat ret %res } define @umax_i16_pos( %a) { ; CHECK-LABEL: umax_i16_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: umax z0.h, z0.h, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i16 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ugt %a, %splat %res = select %cmp, %a, %splat ret %res } define @umax_i16_out_of_range( %a) { ; CHECK-LABEL: umax_i16_out_of_range: ; CHECK: // %bb.0: ; CHECK-NEXT: mov w8, #257 ; CHECK-NEXT: mov z1.h, w8 ; CHECK-NEXT: ptrue p0.h ; CHECK-NEXT: umax z0.h, p0/m, z0.h, z1.h ; CHECK-NEXT: ret %elt = insertelement undef, i16 257, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ugt %a, %splat %res = select %cmp, %a, %splat ret %res } define @umax_i32_pos( %a) { ; CHECK-LABEL: umax_i32_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: umax z0.s, z0.s, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i32 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ugt %a, %splat %res = select %cmp, %a, %splat ret %res } define @umax_i32_out_of_range( %a) { ; CHECK-LABEL: umax_i32_out_of_range: ; CHECK: // %bb.0: ; CHECK-NEXT: mov w8, #257 ; CHECK-NEXT: mov z1.s, w8 ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: umax z0.s, p0/m, z0.s, z1.s ; CHECK-NEXT: ret %elt = insertelement undef, i32 257, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ugt %a, %splat %res = select %cmp, %a, %splat ret %res } define @umax_i64_pos( %a) { ; CHECK-LABEL: umax_i64_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: umax z0.d, z0.d, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i64 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ugt %a, %splat %res = select %cmp, %a, %splat ret %res } define @umax_i64_out_of_range( %a) { ; CHECK-LABEL: umax_i64_out_of_range: ; CHECK: // %bb.0: ; CHECK-NEXT: mov w8, #65535 ; CHECK-NEXT: mov z1.d, x8 ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: umax z0.d, p0/m, z0.d, z1.d ; CHECK-NEXT: ret %elt = insertelement undef, i64 65535, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ugt %a, %splat %res = select %cmp, %a, %splat ret %res } ; ; UMIN ; define @umin_i8_pos( %a) { ; CHECK-LABEL: umin_i8_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: umin z0.b, z0.b, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i8 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ult %a, %splat %res = select %cmp, %a, %splat ret %res } define @umin_i8_large( %a) { ; CHECK-LABEL: umin_i8_large: ; CHECK: // %bb.0: ; CHECK-NEXT: umin z0.b, z0.b, #129 ; CHECK-NEXT: ret %elt = insertelement undef, i8 129, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ult %a, %splat %res = select %cmp, %a, %splat ret %res } define @umin_i16_pos( %a) { ; CHECK-LABEL: umin_i16_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: umin z0.h, z0.h, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i16 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ult %a, %splat %res = select %cmp, %a, %splat ret %res } define @umin_i16_out_of_range( %a) { ; CHECK-LABEL: umin_i16_out_of_range: ; CHECK: // %bb.0: ; CHECK-NEXT: mov w8, #257 ; CHECK-NEXT: mov z1.h, w8 ; CHECK-NEXT: ptrue p0.h ; CHECK-NEXT: umin z0.h, p0/m, z0.h, z1.h ; CHECK-NEXT: ret %elt = insertelement undef, i16 257, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ult %a, %splat %res = select %cmp, %a, %splat ret %res } define @umin_i32_pos( %a) { ; CHECK-LABEL: umin_i32_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: umin z0.s, z0.s, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i32 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ult %a, %splat %res = select %cmp, %a, %splat ret %res } define @umin_i32_out_of_range( %a) { ; CHECK-LABEL: umin_i32_out_of_range: ; CHECK: // %bb.0: ; CHECK-NEXT: mov w8, #257 ; CHECK-NEXT: mov z1.s, w8 ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: umin z0.s, p0/m, z0.s, z1.s ; CHECK-NEXT: ret %elt = insertelement undef, i32 257, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ult %a, %splat %res = select %cmp, %a, %splat ret %res } define @umin_i64_pos( %a) { ; CHECK-LABEL: umin_i64_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: umin z0.d, z0.d, #27 ; CHECK-NEXT: ret %elt = insertelement undef, i64 27, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ult %a, %splat %res = select %cmp, %a, %splat ret %res } define @umin_i64_out_of_range( %a) { ; CHECK-LABEL: umin_i64_out_of_range: ; CHECK: // %bb.0: ; CHECK-NEXT: mov w8, #65535 ; CHECK-NEXT: mov z1.d, x8 ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: umin z0.d, p0/m, z0.d, z1.d ; CHECK-NEXT: ret %elt = insertelement undef, i64 65535, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %cmp = icmp ult %a, %splat %res = select %cmp, %a, %splat ret %res } ; ; MUL ; define @mul_i8_neg( %a) { ; CHECK-LABEL: mul_i8_neg: ; CHECK: // %bb.0: ; CHECK-NEXT: mul z0.b, z0.b, #-17 ; CHECK-NEXT: ret %elt = insertelement undef, i8 -17, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = mul %a, %splat ret %res } define @mul_i8_pos( %a) { ; CHECK-LABEL: mul_i8_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: mul z0.b, z0.b, #105 ; CHECK-NEXT: ret %elt = insertelement undef, i8 105, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = mul %a, %splat ret %res } define @mul_i16_neg( %a) { ; CHECK-LABEL: mul_i16_neg: ; CHECK: // %bb.0: ; CHECK-NEXT: mul z0.h, z0.h, #-17 ; CHECK-NEXT: ret %elt = insertelement undef, i16 -17, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = mul %a, %splat ret %res } define @mul_i16_pos( %a) { ; CHECK-LABEL: mul_i16_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: mul z0.h, z0.h, #105 ; CHECK-NEXT: ret %elt = insertelement undef, i16 105, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = mul %a, %splat ret %res } define @mul_i32_neg( %a) { ; CHECK-LABEL: mul_i32_neg: ; CHECK: // %bb.0: ; CHECK-NEXT: mul z0.s, z0.s, #-17 ; CHECK-NEXT: ret %elt = insertelement undef, i32 -17, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = mul %a, %splat ret %res } define @mul_i32_pos( %a) { ; CHECK-LABEL: mul_i32_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: mul z0.s, z0.s, #105 ; CHECK-NEXT: ret %elt = insertelement undef, i32 105, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = mul %a, %splat ret %res } define @mul_i64_neg( %a) { ; CHECK-LABEL: mul_i64_neg: ; CHECK: // %bb.0: ; CHECK-NEXT: mul z0.d, z0.d, #-17 ; CHECK-NEXT: ret %elt = insertelement undef, i64 -17, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = mul %a, %splat ret %res } define @mul_i64_pos( %a) { ; CHECK-LABEL: mul_i64_pos: ; CHECK: // %bb.0: ; CHECK-NEXT: mul z0.d, z0.d, #105 ; CHECK-NEXT: ret %elt = insertelement undef, i64 105, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = mul %a, %splat ret %res } define @mul_i16_range( %a) { ; CHECK-LABEL: mul_i16_range: ; CHECK: // %bb.0: ; CHECK-NEXT: mov w8, #255 ; CHECK-NEXT: mov z1.h, w8 ; CHECK-NEXT: ptrue p0.h ; CHECK-NEXT: mul z0.h, p0/m, z0.h, z1.h ; CHECK-NEXT: ret %elt = insertelement undef, i16 255, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = mul %a, %splat ret %res } define @mul_i32_range( %a) { ; CHECK-LABEL: mul_i32_range: ; CHECK: // %bb.0: ; CHECK-NEXT: mov w8, #255 ; CHECK-NEXT: mov z1.s, w8 ; CHECK-NEXT: ptrue p0.s ; CHECK-NEXT: mul z0.s, p0/m, z0.s, z1.s ; CHECK-NEXT: ret %elt = insertelement undef, i32 255, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = mul %a, %splat ret %res } define @mul_i64_range( %a) { ; CHECK-LABEL: mul_i64_range: ; CHECK: // %bb.0: ; CHECK-NEXT: mov w8, #255 ; CHECK-NEXT: mov z1.d, x8 ; CHECK-NEXT: ptrue p0.d ; CHECK-NEXT: mul z0.d, p0/m, z0.d, z1.d ; CHECK-NEXT: ret %elt = insertelement undef, i64 255, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %res = mul %a, %splat ret %res } ; ASR define @asr_i8( %a){ ; CHECK-LABEL: asr_i8: ; CHECK: // %bb.0: ; CHECK-NEXT: asr z0.b, z0.b, #7 ; CHECK-NEXT: ret %elt = insertelement undef, i8 7, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %lshr = ashr %a, %splat ret %lshr } define @asr_i16( %a){ ; CHECK-LABEL: asr_i16: ; CHECK: // %bb.0: ; CHECK-NEXT: asr z0.h, z0.h, #15 ; CHECK-NEXT: ret %elt = insertelement undef, i16 15, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %ashr = ashr %a, %splat ret %ashr } define @asr_i32( %a){ ; CHECK-LABEL: asr_i32: ; CHECK: // %bb.0: ; CHECK-NEXT: asr z0.s, z0.s, #31 ; CHECK-NEXT: ret %elt = insertelement undef, i32 31, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %ashr = ashr %a, %splat ret %ashr } define @asr_i64( %a){ ; CHECK-LABEL: asr_i64: ; CHECK: // %bb.0: ; CHECK-NEXT: asr z0.d, z0.d, #63 ; CHECK-NEXT: ret %elt = insertelement undef, i64 63, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %ashr = ashr %a, %splat ret %ashr } ; LSL define @lsl_i8( %a){ ; CHECK-LABEL: lsl_i8: ; CHECK: // %bb.0: ; CHECK-NEXT: lsl z0.b, z0.b, #7 ; CHECK-NEXT: ret %elt = insertelement undef, i8 7, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %shl = shl %a, %splat ret %shl } define @lsl_i16( %a){ ; CHECK-LABEL: lsl_i16: ; CHECK: // %bb.0: ; CHECK-NEXT: lsl z0.h, z0.h, #15 ; CHECK-NEXT: ret %elt = insertelement undef, i16 15, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %shl = shl %a, %splat ret %shl } define @lsl_i32( %a){ ; CHECK-LABEL: lsl_i32: ; CHECK: // %bb.0: ; CHECK-NEXT: lsl z0.s, z0.s, #31 ; CHECK-NEXT: ret %elt = insertelement undef, i32 31, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %shl = shl %a, %splat ret %shl } define @lsl_i64( %a){ ; CHECK-LABEL: lsl_i64: ; CHECK: // %bb.0: ; CHECK-NEXT: lsl z0.d, z0.d, #63 ; CHECK-NEXT: ret %elt = insertelement undef, i64 63, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %shl = shl %a, %splat ret %shl } ; LSR define @lsr_i8( %a){ ; CHECK-LABEL: lsr_i8: ; CHECK: // %bb.0: ; CHECK-NEXT: lsr z0.b, z0.b, #7 ; CHECK-NEXT: ret %elt = insertelement undef, i8 7, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %lshr = lshr %a, %splat ret %lshr } define @lsr_i16( %a){ ; CHECK-LABEL: lsr_i16: ; CHECK: // %bb.0: ; CHECK-NEXT: lsr z0.h, z0.h, #15 ; CHECK-NEXT: ret %elt = insertelement undef, i16 15, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %lshr = lshr %a, %splat ret %lshr } define @lsr_i32( %a){ ; CHECK-LABEL: lsr_i32: ; CHECK: // %bb.0: ; CHECK-NEXT: lsr z0.s, z0.s, #31 ; CHECK-NEXT: ret %elt = insertelement undef, i32 31, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %lshr = lshr %a, %splat ret %lshr } define @lsr_i64( %a){ ; CHECK-LABEL: lsr_i64: ; CHECK: // %bb.0: ; CHECK-NEXT: lsr z0.d, z0.d, #63 ; CHECK-NEXT: ret %elt = insertelement undef, i64 63, i32 0 %splat = shufflevector %elt, undef, zeroinitializer %lshr = lshr %a, %splat ret %lshr }