2012-08-08 20:31:37 +00: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-04 20:39:05 +00:00
|
|
|
|
|
|
|
define float @test(float %a, float %b) {
|
|
|
|
entry:
|
|
|
|
%dum = fadd float %a, %b
|
2012-08-03 23:29:17 +00:00
|
|
|
%0 = tail call float @fabsf(float %dum) readnone
|
2009-08-04 20:39:05 +00:00
|
|
|
%dum1 = fadd float %0, %b
|
|
|
|
ret float %dum1
|
|
|
|
}
|
|
|
|
|
|
|
|
declare float @fabsf(float)
|
2009-11-22 14:23:33 +00:00
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; VFP2-LABEL: test:
|
2013-01-19 00:03:32 +00:00
|
|
|
; VFP2: vabs.f32 s
|
2009-11-22 14:23:33 +00:00
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; NFP1-LABEL: test:
|
2013-01-19 00:03:32 +00:00
|
|
|
; NFP1: vabs.f32 d
|
2013-07-13 20:38:47 +00:00
|
|
|
; NFP0-LABEL: test:
|
2013-01-19 00:03:32 +00:00
|
|
|
; NFP0: vabs.f32 s
|
2009-11-22 14:23:33 +00:00
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; CORTEXA8-LABEL: test:
|
2011-08-09 18:19:41 +00:00
|
|
|
; CORTEXA8: vadd.f32 [[D1:d[0-9]+]]
|
|
|
|
; CORTEXA8: vabs.f32 {{d[0-9]+}}, [[D1]]
|
|
|
|
|
2013-07-13 20:38:47 +00:00
|
|
|
; CORTEXA9-LABEL: test:
|
2011-04-19 18:11:45 +00:00
|
|
|
; CORTEXA9: vabs.f32 s{{.}}, s{{.}}
|