• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=aarch64-eabi -mattr=+slow-paired-128 -verify-machineinstrs -asm-verbose=false | FileCheck %s --check-prefixes=CHECK,SLOW
2; RUN: llc < %s -mtriple=aarch64-eabi -mcpu=exynos-m3         -verify-machineinstrs -asm-verbose=false | FileCheck %s --check-prefixes=CHECK,FAST
3
4; CHECK-LABEL: test_nopair_st
5; SLOW: str
6; SLOW: stur
7; SLOW-NOT: stp
8; FAST: stp
9define void @test_nopair_st(double* %ptr, <2 x double> %v1, <2 x double> %v2) {
10  %tmp1 = bitcast double* %ptr to <2 x double>*
11  store <2 x double> %v2, <2 x double>* %tmp1, align 16
12  %add.ptr = getelementptr inbounds double, double* %ptr, i64 -2
13  %tmp = bitcast double* %add.ptr to <2 x double>*
14  store <2 x double> %v1, <2 x double>* %tmp, align 16
15  ret void
16}
17
18; CHECK-LABEL: test_nopair_ld
19; SLOW: ldr
20; SLOW: ldr
21; SLOW-NOT: ldp
22; FAST: ldp
23define <2 x i64> @test_nopair_ld(i64* %p) {
24  %a1 = bitcast i64* %p to <2 x i64>*
25  %tmp1 = load <2 x i64>, < 2 x i64>* %a1, align 8
26  %add.ptr2 = getelementptr inbounds i64, i64* %p, i64 2
27  %a2 = bitcast i64* %add.ptr2 to <2 x i64>*
28  %tmp2 = load <2 x i64>, <2 x i64>* %a2, align 8
29  %add = add nsw <2 x i64> %tmp1, %tmp2
30  ret <2 x i64> %add
31}
32