brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.6 KiB · b745c7c Raw
64 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -S -passes=instcombine < %s | FileCheck %s3 4target triple = "aarch64"5 6define <vscale x 4 x i32> @uunpkhi_splat(i16 %a) #0 {7; CHECK-LABEL: @uunpkhi_splat(8; CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[A:%.*]] to i329; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[TMP1]], i64 010; CHECK-NEXT:    [[UNPACK:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer11; CHECK-NEXT:    ret <vscale x 4 x i32> [[UNPACK]]12;13  %splat_insert = insertelement <vscale x 8 x i16> poison, i16 %a, i32 014  %splat = shufflevector <vscale x 8 x i16> %splat_insert, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer15  %unpack = tail call <vscale x 4 x i32> @llvm.aarch64.sve.uunpkhi.nxv4i32(<vscale x 8 x i16> %splat)16  ret <vscale x 4 x i32> %unpack17}18 19define <vscale x 4 x i32> @uunpklo_splat(i16 %a) #0 {20; CHECK-LABEL: @uunpklo_splat(21; CHECK-NEXT:    [[TMP1:%.*]] = zext i16 [[A:%.*]] to i3222; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[TMP1]], i64 023; CHECK-NEXT:    [[UNPACK:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer24; CHECK-NEXT:    ret <vscale x 4 x i32> [[UNPACK]]25;26  %splat_insert = insertelement <vscale x 8 x i16> poison, i16 %a, i32 027  %splat = shufflevector <vscale x 8 x i16> %splat_insert, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer28  %unpack = tail call <vscale x 4 x i32> @llvm.aarch64.sve.uunpklo.nxv4i32(<vscale x 8 x i16> %splat)29  ret <vscale x 4 x i32> %unpack30}31 32define <vscale x 4 x i32> @sunpkhi_splat(i16 %a) #0 {33; CHECK-LABEL: @sunpkhi_splat(34; CHECK-NEXT:    [[TMP1:%.*]] = sext i16 [[A:%.*]] to i3235; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[TMP1]], i64 036; CHECK-NEXT:    [[UNPACK:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer37; CHECK-NEXT:    ret <vscale x 4 x i32> [[UNPACK]]38;39  %splat_insert = insertelement <vscale x 8 x i16> poison, i16 %a, i32 040  %splat = shufflevector <vscale x 8 x i16> %splat_insert, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer41  %unpack = tail call <vscale x 4 x i32> @llvm.aarch64.sve.sunpkhi.nxv4i32(<vscale x 8 x i16> %splat)42  ret <vscale x 4 x i32> %unpack43}44 45define <vscale x 4 x i32> @sunpklo_splat(i16 %a) #0 {46; CHECK-LABEL: @sunpklo_splat(47; CHECK-NEXT:    [[TMP1:%.*]] = sext i16 [[A:%.*]] to i3248; CHECK-NEXT:    [[DOTSPLATINSERT:%.*]] = insertelement <vscale x 4 x i32> poison, i32 [[TMP1]], i64 049; CHECK-NEXT:    [[UNPACK:%.*]] = shufflevector <vscale x 4 x i32> [[DOTSPLATINSERT]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer50; CHECK-NEXT:    ret <vscale x 4 x i32> [[UNPACK]]51;52  %splat_insert = insertelement <vscale x 8 x i16> poison, i16 %a, i32 053  %splat = shufflevector <vscale x 8 x i16> %splat_insert, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer54  %unpack = tail call <vscale x 4 x i32> @llvm.aarch64.sve.sunpklo.nxv4i32(<vscale x 8 x i16> %splat)55  ret <vscale x 4 x i32> %unpack56}57 58declare <vscale x 4 x i32> @llvm.aarch64.sve.uunpkhi.nxv4i32(<vscale x 8 x i16>)59declare <vscale x 4 x i32> @llvm.aarch64.sve.uunpklo.nxv4i32(<vscale x 8 x i16>)60declare <vscale x 4 x i32> @llvm.aarch64.sve.sunpkhi.nxv4i32(<vscale x 8 x i16>)61declare <vscale x 4 x i32> @llvm.aarch64.sve.sunpklo.nxv4i32(<vscale x 8 x i16>)62 63attributes #0 = { "target-features"="+sve" }64