1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc < %s -mtriple=arm64-eabi | FileCheck %s
4 define i64 @add_i64_ext_load(<1 x i64> %A, ptr %B) nounwind {
5 ; CHECK-LABEL: add_i64_ext_load:
7 ; CHECK-NEXT: ldr d1, [x0]
8 ; CHECK-NEXT: add d0, d0, d1
9 ; CHECK-NEXT: fmov x0, d0
11 %a = extractelement <1 x i64> %A, i32 0
17 define i64 @sub_i64_ext_load(<1 x i64> %A, ptr %B) nounwind {
18 ; CHECK-LABEL: sub_i64_ext_load:
20 ; CHECK-NEXT: ldr d1, [x0]
21 ; CHECK-NEXT: sub d0, d0, d1
22 ; CHECK-NEXT: fmov x0, d0
24 %a = extractelement <1 x i64> %A, i32 0
30 define void @add_i64_ext_load_store(<1 x i64> %A, ptr %B) nounwind {
31 ; CHECK-LABEL: add_i64_ext_load_store:
33 ; CHECK-NEXT: ldr d1, [x0]
34 ; CHECK-NEXT: add d0, d0, d1
35 ; CHECK-NEXT: str d0, [x0]
37 %a = extractelement <1 x i64> %A, i32 0
44 define i64 @add_v2i64_ext_load(<2 x i64> %A, ptr %B) nounwind {
45 ; CHECK-LABEL: add_v2i64_ext_load:
47 ; CHECK-NEXT: fmov x9, d0
48 ; CHECK-NEXT: ldr x8, [x0]
49 ; CHECK-NEXT: add x0, x9, x8
51 %a = extractelement <2 x i64> %A, i32 0
57 define i64 @add_i64_ext_ext(<1 x i64> %A, <1 x i64> %B) nounwind {
58 ; CHECK-LABEL: add_i64_ext_ext:
60 ; CHECK-NEXT: add d0, d0, d1
61 ; CHECK-NEXT: fmov x0, d0
63 %a = extractelement <1 x i64> %A, i32 0
64 %b = extractelement <1 x i64> %B, i32 0
69 define i32 @add_i32_ext_load(<1 x i32> %A, ptr %B) nounwind {
70 ; CHECK-LABEL: add_i32_ext_load:
72 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
73 ; CHECK-NEXT: fmov w9, s0
74 ; CHECK-NEXT: ldr w8, [x0]
75 ; CHECK-NEXT: add w0, w9, w8
77 %a = extractelement <1 x i32> %A, i32 0
83 define i64 @add_i64_ext_ext_test1(<1 x i64> %A, <2 x i64> %B) nounwind {
84 ; CHECK-LABEL: add_i64_ext_ext_test1:
86 ; CHECK-NEXT: ext v2.16b, v1.16b, v1.16b, #8
87 ; CHECK-NEXT: add d0, d0, d1
88 ; CHECK-NEXT: add d0, d0, d2
89 ; CHECK-NEXT: fmov x0, d0
91 %a = extractelement <1 x i64> %A, i32 0
92 %b = extractelement <2 x i64> %B, i32 0
93 %c = extractelement <2 x i64> %B, i32 1
99 define i64 @sub_i64_ext_ext_test1(<1 x i64> %A, <2 x i64> %B) nounwind {
100 ; CHECK-LABEL: sub_i64_ext_ext_test1:
102 ; CHECK-NEXT: ext v2.16b, v1.16b, v1.16b, #8
103 ; CHECK-NEXT: sub d0, d0, d1
104 ; CHECK-NEXT: sub d0, d0, d2
105 ; CHECK-NEXT: fmov x0, d0
107 %a = extractelement <1 x i64> %A, i32 0
108 %b = extractelement <2 x i64> %B, i32 0
109 %c = extractelement <2 x i64> %B, i32 1