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 3 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 7 8define <vscale x 4 x i32> @test_post_ld1_insert(i32* %a, i32** %ptr, i64 %inc) { 9; CHECK-LABEL: test_post_ld1_insert: 10; CHECK: // %bb.0: 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 15; CHECK-NEXT: ret 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 21} 22 23define <vscale x 2 x double> @test_post_ld1_dup(double* %a, double** %ptr, i64 %inc) { 24; CHECK-LABEL: test_post_ld1_dup: 25; CHECK: // %bb.0: 26; CHECK-NEXT: ldr d0, [x0] 27; CHECK-NEXT: add x8, x0, x2, lsl #3 28; CHECK-NEXT: mov z0.d, d0 29; CHECK-NEXT: str x8, [x1] 30; CHECK-NEXT: ret 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 36} 37 38declare <vscale x 2 x double> @llvm.aarch64.sve.dup.x.nxv2f64(double) 39