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