Revert 374373: [Codegen] Alter the default promotion for saturating adds and subs
[llvm-core.git] / test / CodeGen / ARM / fp16-intrinsic-vector-2op.ll
blobc1ada2594192be009ba2512833b714637c275d89
1 ; RUN: llc < %s -mtriple=arm-none-eabi -mattr=+v8.2a,+fullfp16,+neon  -float-abi=hard   | FileCheck %s --check-prefixes=CHECK,CHECK-HARD
2 ; RUN: llc < %s -mtriple=arm-none-eabi -mattr=+v8.2a,+fullfp16,+neon  | FileCheck %s --check-prefixes=CHECK,CHECK-SOFTFP
4 declare <4 x half> @llvm.arm.neon.vpadd.v4f16(<4 x half>, <4 x half>)
6 define dso_local <4 x half> @t_vpadd_f16(<4 x half> %a, <4 x half> %b) {
7 ; CHECK:   t_vpadd_f16:
9 ; CHECK-HARD:       vpadd.f16 d0, d0, d1
10 ; CHECK-HARD-NEXT:  bx  lr
12 ; CHECK-SOFTFP:     vmov  [[D1:d[0-9]+]], r2, r3
13 ; CHECK-SOFTFP:     vmov  [[D2:d[0-9]+]], r0, r1
14 ; CHECK-SOFTFP:     vpadd.f16 [[D3:d[0-9]+]], [[D2]], [[D1]]
15 ; CHECK-SOFTFP:     vmov  r0, r1, [[D3]]
16 ; CHECK-SOFTFP:     bx  lr
18 entry:
19   %vpadd_v2.i = tail call <4 x half> @llvm.arm.neon.vpadd.v4f16(<4 x half> %a, <4 x half> %b)
20   ret <4 x half> %vpadd_v2.i