1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve -verify-machineinstrs < %s | FileCheck %s
4 define <vscale x 8 x i16> @test_knownzero(<vscale x 8 x i16> %x) {
5 ; CHECK-LABEL: test_knownzero:
7 ; CHECK-NEXT: mov z0.h, #0 // =0x0
9 %a1 = shl <vscale x 8 x i16> %x, shufflevector (<vscale x 8 x i16> insertelement (<vscale x 8 x i16> poison, i16 8, i32 0), <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer)
10 %a2 = and <vscale x 8 x i16> %a1, shufflevector (<vscale x 8 x i16> insertelement (<vscale x 8 x i16> poison, i16 8, i32 0), <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer)
11 ret <vscale x 8 x i16> %a2
14 define <vscale x 4 x i32> @asrlsr(<vscale x 4 x i64> %va) {
15 ; CHECK-LABEL: asrlsr:
17 ; CHECK-NEXT: lsr z1.d, z1.d, #15
18 ; CHECK-NEXT: lsr z0.d, z0.d, #15
19 ; CHECK-NEXT: uzp1 z0.s, z0.s, z1.s
21 %head = insertelement <vscale x 4 x i32> poison, i32 15, i32 0
22 %splat = shufflevector <vscale x 4 x i32> %head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
23 %vb = zext <vscale x 4 x i32> %splat to <vscale x 4 x i64>
24 %x = ashr <vscale x 4 x i64> %va, %vb
25 %y = trunc <vscale x 4 x i64> %x to <vscale x 4 x i32>
26 ret <vscale x 4 x i32> %y