1 ; RUN: llc < %s -mtriple=armv7-eabi -float-abi=hard -mcpu=cortex-a8 | FileCheck %s
4 ; CHECK: vabs.f32 q0, q0
5 define <4 x float> @test(<4 x float> %a) {
6 %foo = call <4 x float> @llvm.fabs.v4f32(<4 x float> %a)
9 declare <4 x float> @llvm.fabs.v4f32(<4 x float> %a)
12 ; CHECK: vabs.f32 d0, d0
13 define <2 x float> @test2(<2 x float> %a) {
14 %foo = call <2 x float> @llvm.fabs.v2f32(<2 x float> %a)
17 declare <2 x float> @llvm.fabs.v2f32(<2 x float> %a)
19 ; No constant pool loads or vector ops are needed for the fabs of a
20 ; bitcasted integer constant; we should just return integer constants
21 ; that have the sign bits turned off.
23 ; So instead of something like this:
33 ; mvn r1, #-2147483648
36 define i64 @fabs_v2f32_1() {
37 ; CHECK-LABEL: fabs_v2f32_1:
38 ; CHECK: mvn r1, #-2147483648
41 %bitcast = bitcast i64 18446744069414584320 to <2 x float> ; 0xFFFF_FFFF_0000_0000
42 %fabs = call <2 x float> @llvm.fabs.v2f32(<2 x float> %bitcast)
43 %ret = bitcast <2 x float> %fabs to i64
47 define i64 @fabs_v2f32_2() {
48 ; CHECK-LABEL: fabs_v2f32_2:
49 ; CHECK: mvn r0, #-2147483648
52 %bitcast = bitcast i64 4294967295 to <2 x float> ; 0x0000_0000_FFFF_FFFF
53 %fabs = call <2 x float> @llvm.fabs.v2f32(<2 x float> %bitcast)
54 %ret = bitcast <2 x float> %fabs to i64