1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc --mtriple aarch64 < %s | FileCheck %s
4 define float @faddp_2xfloat(<2 x float> %a) {
5 ; CHECK-LABEL: faddp_2xfloat:
6 ; CHECK: // %bb.0: // %entry
7 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
8 ; CHECK-NEXT: faddp s0, v0.2s
11 %shift = shufflevector <2 x float> %a, <2 x float> undef, <2 x i32> <i32 1, i32 undef>
12 %0 = fadd <2 x float> %a, %shift
13 %1 = extractelement <2 x float> %0, i32 0
17 define float @faddp_4xfloat(<4 x float> %a) {
18 ; CHECK-LABEL: faddp_4xfloat:
19 ; CHECK: // %bb.0: // %entry
20 ; CHECK-NEXT: faddp s0, v0.2s
23 %shift = shufflevector <4 x float> %a, <4 x float> undef, <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef>
24 %0 = fadd <4 x float> %a, %shift
25 %1 = extractelement <4 x float> %0, i32 0
29 define float @faddp_4xfloat_commute(<4 x float> %a) {
30 ; CHECK-LABEL: faddp_4xfloat_commute:
31 ; CHECK: // %bb.0: // %entry
32 ; CHECK-NEXT: faddp s0, v0.2s
35 %shift = shufflevector <4 x float> %a, <4 x float> undef, <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef>
36 %0 = fadd <4 x float> %shift, %a
37 %1 = extractelement <4 x float> %0, i32 0
41 define float @faddp_2xfloat_commute(<2 x float> %a) {
42 ; CHECK-LABEL: faddp_2xfloat_commute:
43 ; CHECK: // %bb.0: // %entry
44 ; CHECK-NEXT: // kill: def $d0 killed $d0 def $q0
45 ; CHECK-NEXT: faddp s0, v0.2s
48 %shift = shufflevector <2 x float> %a, <2 x float> undef, <2 x i32> <i32 1, i32 undef>
49 %0 = fadd <2 x float> %shift, %a
50 %1 = extractelement <2 x float> %0, i32 0
54 define double @faddp_2xdouble(<2 x double> %a) {
55 ; CHECK-LABEL: faddp_2xdouble:
56 ; CHECK: // %bb.0: // %entry
57 ; CHECK-NEXT: faddp d0, v0.2d
60 %shift = shufflevector <2 x double> %a, <2 x double> undef, <2 x i32> <i32 1, i32 undef>
61 %0 = fadd <2 x double> %a, %shift
62 %1 = extractelement <2 x double> %0, i32 0
66 define double @faddp_2xdouble_commute(<2 x double> %a) {
67 ; CHECK-LABEL: faddp_2xdouble_commute:
68 ; CHECK: // %bb.0: // %entry
69 ; CHECK-NEXT: faddp d0, v0.2d
72 %shift = shufflevector <2 x double> %a, <2 x double> undef, <2 x i32> <i32 1, i32 undef>
73 %0 = fadd <2 x double> %shift, %a
74 %1 = extractelement <2 x double> %0, i32 0
78 define i64 @addp_2xi64(<2 x i64> %a) {
79 ; CHECK-LABEL: addp_2xi64:
80 ; CHECK: // %bb.0: // %entry
81 ; CHECK-NEXT: addp d0, v0.2d
82 ; CHECK-NEXT: fmov x0, d0
85 %shift = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 1, i32 undef>
86 %0 = add <2 x i64> %a, %shift
87 %1 = extractelement <2 x i64> %0, i32 0
91 define i64 @addp_2xi64_commute(<2 x i64> %a) {
92 ; CHECK-LABEL: addp_2xi64_commute:
93 ; CHECK: // %bb.0: // %entry
94 ; CHECK-NEXT: addp d0, v0.2d
95 ; CHECK-NEXT: fmov x0, d0
98 %shift = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 1, i32 undef>
99 %0 = add <2 x i64> %shift, %a
100 %1 = extractelement <2 x i64> %0, i32 0