|
1 |
| -; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2 |
2 | 2 | ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
|
3 | 3 | ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sme < %s | FileCheck %s
|
4 | 4 |
|
@@ -150,6 +150,46 @@ define <vscale x 16 x i1> @chained_reinterpret() {
|
150 | 150 | ret <vscale x 16 x i1> %out
|
151 | 151 | }
|
152 | 152 |
|
| 153 | +define <vscale x 16 x i1> @reinterpret_scalar_bool_h(i1 %x){ |
| 154 | +; CHECK-LABEL: reinterpret_scalar_bool_h: |
| 155 | +; CHECK: // %bb.0: |
| 156 | +; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0 |
| 157 | +; CHECK-NEXT: sbfx x8, x0, #0, #1 |
| 158 | +; CHECK-NEXT: whilelo p0.h, xzr, x8 |
| 159 | +; CHECK-NEXT: ret |
| 160 | + %.splatinsert = insertelement <vscale x 8 x i1> poison, i1 %x, i64 0 |
| 161 | + %.splat = shufflevector <vscale x 8 x i1> %.splatinsert, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer |
| 162 | + %out = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv8i1(<vscale x 8 x i1> %.splat) |
| 163 | + ret <vscale x 16 x i1> %out |
| 164 | +} |
| 165 | + |
| 166 | +define <vscale x 16 x i1> @reinterpret_scalar_bool_s(i1 %x){ |
| 167 | +; CHECK-LABEL: reinterpret_scalar_bool_s: |
| 168 | +; CHECK: // %bb.0: |
| 169 | +; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0 |
| 170 | +; CHECK-NEXT: sbfx x8, x0, #0, #1 |
| 171 | +; CHECK-NEXT: whilelo p0.s, xzr, x8 |
| 172 | +; CHECK-NEXT: ret |
| 173 | + %.splatinsert = insertelement <vscale x 4 x i1> poison, i1 %x, i64 0 |
| 174 | + %.splat = shufflevector <vscale x 4 x i1> %.splatinsert, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer |
| 175 | + %out = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1> %.splat) |
| 176 | + ret <vscale x 16 x i1> %out |
| 177 | +} |
| 178 | + |
| 179 | +define <vscale x 16 x i1> @reinterpret_scalar_bool_q(i1 %x){ |
| 180 | +; CHECK-LABEL: reinterpret_scalar_bool_q: |
| 181 | +; CHECK: // %bb.0: |
| 182 | +; CHECK-NEXT: // kill: def $w0 killed $w0 def $x0 |
| 183 | +; CHECK-NEXT: sbfx x8, x0, #0, #1 |
| 184 | +; CHECK-NEXT: whilelo p0.d, xzr, x8 |
| 185 | +; CHECK-NEXT: ret |
| 186 | + %.splatinsert = insertelement <vscale x 2 x i1> poison, i1 %x, i64 0 |
| 187 | + %.splat = shufflevector <vscale x 2 x i1> %.splatinsert, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer |
| 188 | + %out = tail call <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv2i1(<vscale x 2 x i1> %.splat) |
| 189 | + ret <vscale x 16 x i1> %out |
| 190 | +} |
| 191 | + |
| 192 | + |
153 | 193 | declare <vscale x 8 x i1> @llvm.aarch64.sve.ptrue.nxv8i1(i32 immarg)
|
154 | 194 | declare <vscale x 16 x i1> @llvm.aarch64.sve.ptrue.nxv16i1(i32 immarg)
|
155 | 195 | declare <vscale x 8 x i1> @llvm.aarch64.sve.cmpgt.nxv8i16(<vscale x 8 x i1>, <vscale x 8 x i16>, <vscale x 8 x i16>)
|
|
0 commit comments