|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py |
| 2 | +; RUN: opt -S < %s | FileCheck %s |
| 3 | +; RUN: llvm-dis < %s.bc | FileCheck %s |
| 4 | + |
| 5 | +define <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.aarch64.sve.rev.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> %res |
| 12 | +} |
| 13 | + |
| 14 | +define <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.aarch64.sve.rev.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> %res |
| 21 | +} |
| 22 | + |
| 23 | +define <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.aarch64.sve.rev.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> %res |
| 30 | +} |
| 31 | + |
| 32 | +define <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.aarch64.sve.rev.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> %res |
| 39 | +} |
| 40 | + |
| 41 | +define <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.aarch64.sve.rev.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> %res |
| 48 | +} |
| 49 | + |
| 50 | +define <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.aarch64.sve.rev.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> %res |
| 57 | +} |
| 58 | + |
| 59 | +define <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.aarch64.sve.rev.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> %res |
| 66 | +} |
| 67 | + |
| 68 | +define <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.aarch64.sve.rev.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> %res |
| 75 | +} |
| 76 | + |
| 77 | +define <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.aarch64.sve.rev.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> %res |
| 84 | +} |
| 85 | + |
| 86 | +define <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.aarch64.sve.rev.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> %res |
| 93 | +} |
| 94 | + |
| 95 | +define <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.aarch64.sve.rev.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> %res |
| 102 | +} |
| 103 | + |
| 104 | +define <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.aarch64.sve.rev.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> %res |
| 111 | +} |
0 commit comments