brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.2 KiB · 8e53a82 Raw
110 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-none-linux-gnu -mattr=+sve2,+lut | FileCheck %s3; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-none-linux-gnu -mattr=+sve,+sme2,+lut | FileCheck %s4; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-none-linux-gnu -mattr=+sme2,+lut --force-streaming | FileCheck %s5 6define <vscale x 16 x i8> @test_luti2_lane_i8(<vscale x 16 x i8> %table, <vscale x 16 x i8> %indices){7; CHECK-LABEL: test_luti2_lane_i8:8; CHECK:       // %bb.0:9; CHECK-NEXT:    luti2 z0.b, { z0.b }, z1[0]10; CHECK-NEXT:    ret11   %res= tail call <vscale x 16 x i8> @llvm.aarch64.sve.luti2.lane.nxv16i8(<vscale x 16 x i8> %table, <vscale x 16 x i8> %indices, i32 0)12   ret  <vscale x 16 x i8>  %res13}14 15define <vscale x 8 x i16> @test_luti2_lane_i16(<vscale x 8 x i16> %table, <vscale x 16 x i8> %indices){16; CHECK-LABEL: test_luti2_lane_i16:17; CHECK:       // %bb.0:18; CHECK-NEXT:    luti2 z0.h, { z0.h }, z1[0]19; CHECK-NEXT:    ret20   %res= tail call <vscale x 8 x i16> @llvm.aarch64.sve.luti2.lane.nxv8i16(<vscale x 8 x i16> %table, <vscale x 16 x i8> %indices, i32 0)21   ret  <vscale x 8 x i16>  %res22}23 24define <vscale x 8 x half> @test_luti2_lane_f16(<vscale x 8 x half> %table, <vscale x 16 x i8> %indices){25; CHECK-LABEL: test_luti2_lane_f16:26; CHECK:       // %bb.0:27; CHECK-NEXT:    luti2 z0.h, { z0.h }, z1[0]28; CHECK-NEXT:    ret29   %res= tail call <vscale x 8 x half> @llvm.aarch64.sve.luti2.lane.nxv8f16(<vscale x 8 x half> %table, <vscale x 16 x i8> %indices, i32 0)30   ret  <vscale x 8 x half>  %res31}32 33define <vscale x 8 x bfloat> @test_luti2_lane_bf16(<vscale x 8 x bfloat> %table, <vscale x 16 x i8> %indices){34; CHECK-LABEL: test_luti2_lane_bf16:35; CHECK:       // %bb.0:36; CHECK-NEXT:    luti2 z0.h, { z0.h }, z1[0]37; CHECK-NEXT:    ret38   %res= tail call <vscale x 8 x bfloat> @llvm.aarch64.sve.luti2.lane.nxv8bf16(<vscale x 8 x bfloat> %table, <vscale x 16 x i8> %indices, i32 0)39   ret  <vscale x 8 x bfloat>  %res40}41 42define <vscale x 16 x i8> @test_luti4_lane_i8(<vscale x 16 x i8> %table, <vscale x 16 x i8> %indices){43; CHECK-LABEL: test_luti4_lane_i8:44; CHECK:       // %bb.0:45; CHECK-NEXT:    luti4 z0.b, { z0.b }, z1[0]46; CHECK-NEXT:    ret47   %res= tail call <vscale x 16 x i8> @llvm.aarch64.sve.luti4.lane.nxv16i8(<vscale x 16 x i8> %table, <vscale x 16 x i8> %indices, i32 0)48   ret  <vscale x 16 x i8>  %res49}50 51define <vscale x 8 x i16> @test_luti4_lane_i16(<vscale x 8 x i16> %table, <vscale x 16 x i8> %indices){52; CHECK-LABEL: test_luti4_lane_i16:53; CHECK:       // %bb.0:54; CHECK-NEXT:    luti4 z0.h, { z0.h }, z1[0]55; CHECK-NEXT:    ret56   %res= tail call <vscale x 8 x i16> @llvm.aarch64.sve.luti4.lane.nxv8i16(<vscale x 8 x i16> %table, <vscale x 16 x i8> %indices, i32 0)57   ret  <vscale x 8 x i16>  %res58}59 60define <vscale x 8 x half> @test_luti4_lane_f16(<vscale x 8 x half> %table, <vscale x 16 x i8> %indices){61; CHECK-LABEL: test_luti4_lane_f16:62; CHECK:       // %bb.0:63; CHECK-NEXT:    luti4 z0.h, { z0.h }, z1[0]64; CHECK-NEXT:    ret65   %res= tail call <vscale x 8 x half> @llvm.aarch64.sve.luti4.lane.nxv8f16(<vscale x 8 x half> %table, <vscale x 16 x i8> %indices, i32 0)66   ret  <vscale x 8 x half>  %res67}68 69define <vscale x 8 x bfloat> @test_luti4_lane_bf16(<vscale x 8 x bfloat> %table, <vscale x 16 x i8> %indices){70; CHECK-LABEL: test_luti4_lane_bf16:71; CHECK:       // %bb.0:72; CHECK-NEXT:    luti4 z0.h, { z0.h }, z1[0]73; CHECK-NEXT:    ret74   %res= tail call <vscale x 8 x bfloat> @llvm.aarch64.sve.luti4.lane.nxv8bf16(<vscale x 8 x bfloat> %table, <vscale x 16 x i8> %indices, i32 0)75   ret  <vscale x 8 x bfloat>  %res76}77 78define <vscale x 8 x i16> @test_luti4_lane_i16_x2(<vscale x 8 x i16> %table, <vscale x 16 x i8> %indices){79; CHECK-LABEL: test_luti4_lane_i16_x2:80; CHECK:       // %bb.0:81; CHECK-NEXT:    mov z2.d, z0.d82; CHECK-NEXT:    mov z3.d, z2.d83; CHECK-NEXT:    luti4 z0.h, { z2.h, z3.h }, z1[0]84; CHECK-NEXT:    ret85   %res= tail call <vscale x 8 x i16> @llvm.aarch64.sve.luti4.lane.x2.nxv8i16(<vscale x 8 x i16> %table, <vscale x 8 x i16> %table, <vscale x 16 x i8> %indices, i32 0)86   ret  <vscale x 8 x i16>  %res87}88 89define <vscale x 8 x half> @test_luti4_lane_f16_x2(<vscale x 8 x half> %table, <vscale x 16 x i8> %indices){90; CHECK-LABEL: test_luti4_lane_f16_x2:91; CHECK:       // %bb.0:92; CHECK-NEXT:    mov z2.d, z0.d93; CHECK-NEXT:    mov z3.d, z2.d94; CHECK-NEXT:    luti4 z0.h, { z2.h, z3.h }, z1[0]95; CHECK-NEXT:    ret96   %res= tail call <vscale x 8 x half> @llvm.aarch64.sve.luti4.lane.x2.nxv8f16(<vscale x 8 x half> %table, <vscale x 8 x half> %table, <vscale x 16 x i8> %indices, i32 0)97   ret  <vscale x 8 x half>  %res98}99 100define <vscale x 8 x bfloat> @test_luti4_lane_bf16_x2(<vscale x 8 x bfloat> %table, <vscale x 16 x i8> %indices){101; CHECK-LABEL: test_luti4_lane_bf16_x2:102; CHECK:       // %bb.0:103; CHECK-NEXT:    mov z2.d, z0.d104; CHECK-NEXT:    mov z3.d, z2.d105; CHECK-NEXT:    luti4 z0.h, { z2.h, z3.h }, z1[0]106; CHECK-NEXT:    ret107   %res= tail call <vscale x 8 x bfloat> @llvm.aarch64.sve.luti4.lane.x2.nxv8bf16(<vscale x 8 x bfloat> %table, <vscale x 8 x bfloat> %table, <vscale x 16 x i8> %indices, i32 0)108   ret  <vscale x 8 x bfloat>  %res109}110