brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.5 KiB · 237df28 Raw
112 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -S < %s | FileCheck %s3; RUN: llvm-dis < %s.bc | FileCheck %s4 5define <vscale x 16 x i1> @rev_nxv16i1(<vscale x 16 x i1> %a) {6; CHECK-LABEL: @rev_nxv16i1(7; CHECK-NEXT:    [[RES:%.*]] = call <vscale x 16 x i1> @llvm.vector.reverse.nxv16i1(<vscale x 16 x i1> [[A:%.*]])8; CHECK-NEXT:    ret <vscale x 16 x i1> [[RES]]9;10  %res = call <vscale x 16 x i1> @llvm.aarch64.sve.rev.nxv16i1(<vscale x 16 x i1> %a)11  ret <vscale x 16 x i1> %res12}13 14define <vscale x 8 x i1> @rev_nxv8i1(<vscale x 8 x i1> %a) {15; CHECK-LABEL: @rev_nxv8i1(16; CHECK-NEXT:    [[RES:%.*]] = call <vscale x 8 x i1> @llvm.vector.reverse.nxv8i1(<vscale x 8 x i1> [[A:%.*]])17; CHECK-NEXT:    ret <vscale x 8 x i1> [[RES]]18;19  %res = call <vscale x 8 x i1> @llvm.aarch64.sve.rev.nxv8i1(<vscale x 8 x i1> %a)20  ret <vscale x 8 x i1> %res21}22 23define <vscale x 4 x i1> @rev_nxv4i1(<vscale x 4 x i1> %a) {24; CHECK-LABEL: @rev_nxv4i1(25; CHECK-NEXT:    [[RES:%.*]] = call <vscale x 4 x i1> @llvm.vector.reverse.nxv4i1(<vscale x 4 x i1> [[A:%.*]])26; CHECK-NEXT:    ret <vscale x 4 x i1> [[RES]]27;28  %res = call <vscale x 4 x i1> @llvm.aarch64.sve.rev.nxv4i1(<vscale x 4 x i1> %a)29  ret <vscale x 4 x i1> %res30}31 32define <vscale x 2 x i1> @rev_nxv2i1(<vscale x 2 x i1> %a) {33; CHECK-LABEL: @rev_nxv2i1(34; CHECK-NEXT:    [[RES:%.*]] = call <vscale x 2 x i1> @llvm.vector.reverse.nxv2i1(<vscale x 2 x i1> [[A:%.*]])35; CHECK-NEXT:    ret <vscale x 2 x i1> [[RES]]36;37  %res = call <vscale x 2 x i1> @llvm.aarch64.sve.rev.nxv2i1(<vscale x 2 x i1> %a)38  ret <vscale x 2 x i1> %res39}40 41define <vscale x 16 x i8> @rev_i8(<vscale x 16 x i8> %a) {42; CHECK-LABEL: @rev_i8(43; CHECK-NEXT:    [[RES:%.*]] = call <vscale x 16 x i8> @llvm.vector.reverse.nxv16i8(<vscale x 16 x i8> [[A:%.*]])44; CHECK-NEXT:    ret <vscale x 16 x i8> [[RES]]45;46  %res = call <vscale x 16 x i8> @llvm.aarch64.sve.rev.nxv16i8(<vscale x 16 x i8> %a)47  ret <vscale x 16 x i8> %res48}49 50define <vscale x 8 x i16> @rev_i16(<vscale x 8 x i16> %a) {51; CHECK-LABEL: @rev_i16(52; CHECK-NEXT:    [[RES:%.*]] = call <vscale x 8 x i16> @llvm.vector.reverse.nxv8i16(<vscale x 8 x i16> [[A:%.*]])53; CHECK-NEXT:    ret <vscale x 8 x i16> [[RES]]54;55  %res = call <vscale x 8 x i16> @llvm.aarch64.sve.rev.nxv8i16(<vscale x 8 x i16> %a)56  ret <vscale x 8 x i16> %res57}58 59define <vscale x 4 x i32> @rev_i32(<vscale x 4 x i32> %a) {60; CHECK-LABEL: @rev_i32(61; CHECK-NEXT:    [[RES:%.*]] = call <vscale x 4 x i32> @llvm.vector.reverse.nxv4i32(<vscale x 4 x i32> [[A:%.*]])62; CHECK-NEXT:    ret <vscale x 4 x i32> [[RES]]63;64  %res = call <vscale x 4 x i32> @llvm.aarch64.sve.rev.nxv4i32(<vscale x 4 x i32> %a)65  ret <vscale x 4 x i32> %res66}67 68define <vscale x 2 x i64> @rev_i64(<vscale x 2 x i64> %a) {69; CHECK-LABEL: @rev_i64(70; CHECK-NEXT:    [[RES:%.*]] = call <vscale x 2 x i64> @llvm.vector.reverse.nxv2i64(<vscale x 2 x i64> [[A:%.*]])71; CHECK-NEXT:    ret <vscale x 2 x i64> [[RES]]72;73  %res = call <vscale x 2 x i64> @llvm.aarch64.sve.rev.nxv2i64(<vscale x 2 x i64> %a)74  ret <vscale x 2 x i64> %res75}76 77define <vscale x 8 x half> @rev_f16(<vscale x 8 x half> %a) {78; CHECK-LABEL: @rev_f16(79; CHECK-NEXT:    [[RES:%.*]] = call <vscale x 8 x half> @llvm.vector.reverse.nxv8f16(<vscale x 8 x half> [[A:%.*]])80; CHECK-NEXT:    ret <vscale x 8 x half> [[RES]]81;82  %res = call <vscale x 8 x half> @llvm.aarch64.sve.rev.nxv8f16(<vscale x 8 x half> %a)83  ret <vscale x 8 x half> %res84}85 86define <vscale x 4 x float> @rev_f32(<vscale x 4 x float> %a) {87; CHECK-LABEL: @rev_f32(88; CHECK-NEXT:    [[RES:%.*]] = call <vscale x 4 x float> @llvm.vector.reverse.nxv4f32(<vscale x 4 x float> [[A:%.*]])89; CHECK-NEXT:    ret <vscale x 4 x float> [[RES]]90;91  %res = call <vscale x 4 x float> @llvm.aarch64.sve.rev.nxv4f32(<vscale x 4 x float> %a)92  ret <vscale x 4 x float> %res93}94 95define <vscale x 2 x double> @rev_f64(<vscale x 2 x double> %a) {96; CHECK-LABEL: @rev_f64(97; CHECK-NEXT:    [[RES:%.*]] = call <vscale x 2 x double> @llvm.vector.reverse.nxv2f64(<vscale x 2 x double> [[A:%.*]])98; CHECK-NEXT:    ret <vscale x 2 x double> [[RES]]99;100  %res = call <vscale x 2 x double> @llvm.aarch64.sve.rev.nxv2f64(<vscale x 2 x double> %a)101  ret <vscale x 2 x double> %res102}103 104define <vscale x 8 x bfloat> @rev_bf16(<vscale x 8 x bfloat> %a) #0 {105; CHECK-LABEL: @rev_bf16(106; CHECK-NEXT:    [[RES:%.*]] = call <vscale x 8 x bfloat> @llvm.vector.reverse.nxv8bf16(<vscale x 8 x bfloat> [[A:%.*]])107; CHECK-NEXT:    ret <vscale x 8 x bfloat> [[RES]]108;109  %res = call <vscale x 8 x bfloat> @llvm.aarch64.sve.rev.nxv8bf16(<vscale x 8 x bfloat> %a)110  ret <vscale x 8 x bfloat> %res111}112