1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
4 ; These tests are here to ensure we don't get a selection error caused
5 ; by performPostLD1Combine, which should bail out if the return
6 ; type is a scalable vector
8 define <vscale x 4 x i32> @test_post_ld1_insert(i32* %a, i32** %ptr, i64 %inc) {
9 ; CHECK-LABEL: test_post_ld1_insert:
11 ; CHECK-NEXT: ldr w8, [x0]
12 ; CHECK-NEXT: add x9, x0, x2, lsl #2
13 ; CHECK-NEXT: str x9, [x1]
14 ; CHECK-NEXT: fmov s0, w8
16 %load = load i32, i32* %a
17 %ins = insertelement <vscale x 4 x i32> undef, i32 %load, i32 0
18 %gep = getelementptr i32, i32* %a, i64 %inc
19 store i32* %gep, i32** %ptr
20 ret <vscale x 4 x i32> %ins
23 define <vscale x 2 x double> @test_post_ld1_dup(double* %a, double** %ptr, i64 %inc) {
24 ; CHECK-LABEL: test_post_ld1_dup:
26 ; CHECK-NEXT: ptrue p0.d
27 ; CHECK-NEXT: ld1rd { z0.d }, p0/z, [x0]
28 ; CHECK-NEXT: add x8, x0, x2, lsl #3
29 ; CHECK-NEXT: str x8, [x1]
31 %load = load double, double* %a
32 %dup = call <vscale x 2 x double> @llvm.aarch64.sve.dup.x.nxv2f64(double %load)
33 %gep = getelementptr double, double* %a, i64 %inc
34 store double* %gep, double** %ptr
35 ret <vscale x 2 x double> %dup
38 declare <vscale x 2 x double> @llvm.aarch64.sve.dup.x.nxv2f64(double)