2012-08-09 04:31:37 +08:00
|
|
|
; RUN: llc < %s -mtriple=arm-apple-ios -mattr=+vfp2 | FileCheck %s -check-prefix=VFP2
|
|
|
|
; RUN: llc < %s -mtriple=arm-apple-ios -mattr=+neon | FileCheck %s -check-prefix=NFP0
|
|
|
|
; RUN: llc < %s -mtriple=arm-apple-ios -mcpu=cortex-a8 | FileCheck %s -check-prefix=CORTEXA8
|
|
|
|
; RUN: llc < %s -mtriple=arm-apple-ios -mcpu=cortex-a9 | FileCheck %s -check-prefix=CORTEXA9
|
2009-08-05 04:39:05 +08:00
|
|
|
|
|
|
|
define float @test(float %a, float %b) {
|
|
|
|
entry:
|
|
|
|
%dum = fadd float %a, %b
|
2012-08-04 07:29:17 +08:00
|
|
|
%0 = tail call float @fabsf(float %dum) readnone
|
2009-08-05 04:39:05 +08:00
|
|
|
%dum1 = fadd float %0, %b
|
|
|
|
ret float %dum1
|
|
|
|
}
|
|
|
|
|
|
|
|
declare float @fabsf(float)
|
2009-11-22 22:23:33 +08:00
|
|
|
|
2013-07-14 04:38:47 +08:00
|
|
|
; VFP2-LABEL: test:
|
2013-01-19 08:03:32 +08:00
|
|
|
; VFP2: vabs.f32 s
|
2009-11-22 22:23:33 +08:00
|
|
|
|
2013-07-14 04:38:47 +08:00
|
|
|
; NFP1-LABEL: test:
|
2013-01-19 08:03:32 +08:00
|
|
|
; NFP1: vabs.f32 d
|
2013-07-14 04:38:47 +08:00
|
|
|
; NFP0-LABEL: test:
|
2013-01-19 08:03:32 +08:00
|
|
|
; NFP0: vabs.f32 s
|
2009-11-22 22:23:33 +08:00
|
|
|
|
2013-07-14 04:38:47 +08:00
|
|
|
; CORTEXA8-LABEL: test:
|
2011-08-10 02:19:41 +08:00
|
|
|
; CORTEXA8: vadd.f32 [[D1:d[0-9]+]]
|
|
|
|
; CORTEXA8: vabs.f32 {{d[0-9]+}}, [[D1]]
|
|
|
|
|
2013-07-14 04:38:47 +08:00
|
|
|
; CORTEXA9-LABEL: test:
|
2011-04-20 02:11:45 +08:00
|
|
|
; CORTEXA9: vabs.f32 s{{.}}, s{{.}}
|