1 ; RUN: llc < %s -march=arm64 -aarch64-neon-syntax=apple -mcpu=cyclone | FileCheck %s 2 3 define double @foo(<2 x double> %a) nounwind { 4 ; CHECK-LABEL: foo: 5 ; CHECK: faddp.2d d0, v0 6 ; CHECK-NEXT: ret 7 %lane0.i = extractelement <2 x double> %a, i32 0 8 %lane1.i = extractelement <2 x double> %a, i32 1 9 %vpaddd.i = fadd double %lane0.i, %lane1.i 10 ret double %vpaddd.i 11 } 12 13 define i64 @foo0(<2 x i64> %a) nounwind { 14 ; CHECK-LABEL: foo0: 15 ; CHECK: addp.2d d0, v0 16 ; CHECK-NEXT: fmov x0, d0 17 ; CHECK-NEXT: ret 18 %lane0.i = extractelement <2 x i64> %a, i32 0 19 %lane1.i = extractelement <2 x i64> %a, i32 1 20 %vpaddd.i = add i64 %lane0.i, %lane1.i 21 ret i64 %vpaddd.i 22 } 23 24 define float @foo1(<2 x float> %a) nounwind { 25 ; CHECK-LABEL: foo1: 26 ; CHECK: faddp.2s 27 ; CHECK-NEXT: ret 28 %lane0.i = extractelement <2 x float> %a, i32 0 29 %lane1.i = extractelement <2 x float> %a, i32 1 30 %vpaddd.i = fadd float %lane0.i, %lane1.i 31 ret float %vpaddd.i 32 } 33