|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| 2 | +; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sme2 -verify-machineinstrs < %s | FileCheck %s |
| 3 | + |
| 4 | +; FRINTA |
| 5 | + |
| 6 | +define { <vscale x 4 x float>, <vscale x 4 x float> } @multi_vec_frinta_x2_f32(<vscale x 4 x float> %unused, <vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2) { |
| 7 | +; CHECK-LABEL: multi_vec_frinta_x2_f32: |
| 8 | +; CHECK: // %bb.0: |
| 9 | +; CHECK-NEXT: mov z3.d, z2.d |
| 10 | +; CHECK-NEXT: mov z2.d, z1.d |
| 11 | +; CHECK-NEXT: frinta { z0.s, z1.s }, { z2.s, z3.s } |
| 12 | +; CHECK-NEXT: ret |
| 13 | + %res = call { <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frinta.x2.nxv4f32(<vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2) |
| 14 | + ret { <vscale x 4 x float>, <vscale x 4 x float> } %res |
| 15 | +} |
| 16 | + |
| 17 | +define { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } @multi_vec_frinta_x4_f32(<vscale x 4 x float> %unused, <vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2, <vscale x 4 x float> %zn3, <vscale x 4 x float> %zn4) { |
| 18 | +; CHECK-LABEL: multi_vec_frinta_x4_f32: |
| 19 | +; CHECK: // %bb.0: |
| 20 | +; CHECK-NEXT: mov z7.d, z4.d |
| 21 | +; CHECK-NEXT: mov z6.d, z3.d |
| 22 | +; CHECK-NEXT: mov z5.d, z2.d |
| 23 | +; CHECK-NEXT: mov z4.d, z1.d |
| 24 | +; CHECK-NEXT: frinta { z0.s - z3.s }, { z4.s - z7.s } |
| 25 | +; CHECK-NEXT: ret |
| 26 | + %res = call { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frinta.x4.nxv4f32(<vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2, <vscale x 4 x float> %zn3, <vscale x 4 x float> %zn4) |
| 27 | + ret { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } %res |
| 28 | +} |
| 29 | + |
| 30 | +; FRINTM |
| 31 | + |
| 32 | +define { <vscale x 4 x float>, <vscale x 4 x float> } @multi_vec_frintm_x2_f32(<vscale x 4 x float> %unused, <vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2) { |
| 33 | +; CHECK-LABEL: multi_vec_frintm_x2_f32: |
| 34 | +; CHECK: // %bb.0: |
| 35 | +; CHECK-NEXT: mov z3.d, z2.d |
| 36 | +; CHECK-NEXT: mov z2.d, z1.d |
| 37 | +; CHECK-NEXT: frintm { z0.s, z1.s }, { z2.s, z3.s } |
| 38 | +; CHECK-NEXT: ret |
| 39 | + %res = call { <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frintm.x2.nxv4f32(<vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2) |
| 40 | + ret { <vscale x 4 x float>, <vscale x 4 x float> } %res |
| 41 | +} |
| 42 | + |
| 43 | +define { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } @multi_vec_frintm_x4_f32(<vscale x 4 x float> %unused, <vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2, <vscale x 4 x float> %zn3, <vscale x 4 x float> %zn4) { |
| 44 | +; CHECK-LABEL: multi_vec_frintm_x4_f32: |
| 45 | +; CHECK: // %bb.0: |
| 46 | +; CHECK-NEXT: mov z7.d, z4.d |
| 47 | +; CHECK-NEXT: mov z6.d, z3.d |
| 48 | +; CHECK-NEXT: mov z5.d, z2.d |
| 49 | +; CHECK-NEXT: mov z4.d, z1.d |
| 50 | +; CHECK-NEXT: frintm { z0.s - z3.s }, { z4.s - z7.s } |
| 51 | +; CHECK-NEXT: ret |
| 52 | + %res = call { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frintm.x4.nxv4f32(<vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2, <vscale x 4 x float> %zn3, <vscale x 4 x float> %zn4) |
| 53 | + ret { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } %res |
| 54 | +} |
| 55 | + |
| 56 | +; FRINTN |
| 57 | + |
| 58 | +define { <vscale x 4 x float>, <vscale x 4 x float> } @multi_vec_frintn_x2_f32(<vscale x 4 x float> %unused, <vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2) { |
| 59 | +; CHECK-LABEL: multi_vec_frintn_x2_f32: |
| 60 | +; CHECK: // %bb.0: |
| 61 | +; CHECK-NEXT: mov z3.d, z2.d |
| 62 | +; CHECK-NEXT: mov z2.d, z1.d |
| 63 | +; CHECK-NEXT: frintn { z0.s, z1.s }, { z2.s, z3.s } |
| 64 | +; CHECK-NEXT: ret |
| 65 | + %res = call { <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frintn.x2.nxv4f32(<vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2) |
| 66 | + ret { <vscale x 4 x float>, <vscale x 4 x float> } %res |
| 67 | +} |
| 68 | + |
| 69 | +define { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } @multi_vec_frintn_x4_f32(<vscale x 4 x float> %unused, <vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2, <vscale x 4 x float> %zn3, <vscale x 4 x float> %zn4) { |
| 70 | +; CHECK-LABEL: multi_vec_frintn_x4_f32: |
| 71 | +; CHECK: // %bb.0: |
| 72 | +; CHECK-NEXT: mov z7.d, z4.d |
| 73 | +; CHECK-NEXT: mov z6.d, z3.d |
| 74 | +; CHECK-NEXT: mov z5.d, z2.d |
| 75 | +; CHECK-NEXT: mov z4.d, z1.d |
| 76 | +; CHECK-NEXT: frintn { z0.s - z3.s }, { z4.s - z7.s } |
| 77 | +; CHECK-NEXT: ret |
| 78 | + %res = call { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frintn.x4.nxv4f32(<vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2, <vscale x 4 x float> %zn3, <vscale x 4 x float> %zn4) |
| 79 | + ret { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } %res |
| 80 | +} |
| 81 | + |
| 82 | +; FRINTP |
| 83 | + |
| 84 | +define { <vscale x 4 x float>, <vscale x 4 x float> } @multi_vec_frintp_x2_f32(<vscale x 4 x float> %unused, <vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2) { |
| 85 | +; CHECK-LABEL: multi_vec_frintp_x2_f32: |
| 86 | +; CHECK: // %bb.0: |
| 87 | +; CHECK-NEXT: mov z3.d, z2.d |
| 88 | +; CHECK-NEXT: mov z2.d, z1.d |
| 89 | +; CHECK-NEXT: frintp { z0.s, z1.s }, { z2.s, z3.s } |
| 90 | +; CHECK-NEXT: ret |
| 91 | + %res = call { <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frintp.x2.nxv4f32(<vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2) |
| 92 | + ret { <vscale x 4 x float>, <vscale x 4 x float> } %res |
| 93 | +} |
| 94 | + |
| 95 | +define { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } @multi_vec_frintp_x4_f32(<vscale x 4 x float> %unused, <vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2, <vscale x 4 x float> %zn3, <vscale x 4 x float> %zn4) { |
| 96 | +; CHECK-LABEL: multi_vec_frintp_x4_f32: |
| 97 | +; CHECK: // %bb.0: |
| 98 | +; CHECK-NEXT: mov z7.d, z4.d |
| 99 | +; CHECK-NEXT: mov z6.d, z3.d |
| 100 | +; CHECK-NEXT: mov z5.d, z2.d |
| 101 | +; CHECK-NEXT: mov z4.d, z1.d |
| 102 | +; CHECK-NEXT: frintp { z0.s - z3.s }, { z4.s - z7.s } |
| 103 | +; CHECK-NEXT: ret |
| 104 | + %res = call { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frintp.x4.nxv4f32(<vscale x 4 x float> %zn1, <vscale x 4 x float> %zn2, <vscale x 4 x float> %zn3, <vscale x 4 x float> %zn4) |
| 105 | + ret { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } %res |
| 106 | +} |
| 107 | + |
| 108 | +declare { <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frinta.x2.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>) |
| 109 | +declare { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frinta.x4.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>) |
| 110 | + |
| 111 | +declare { <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frintm.x2.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>) |
| 112 | +declare { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frintm.x4.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>) |
| 113 | + |
| 114 | +declare { <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frintn.x2.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>) |
| 115 | +declare { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frintn.x4.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>) |
| 116 | + |
| 117 | +declare { <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frintp.x2.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>) |
| 118 | +declare { <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float> } @llvm.aarch64.sve.frintp.x4.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>) |
0 commit comments