Hexagon V5 FP Support.
[oota-llvm.git] / test / CodeGen / Hexagon / opt-fabs.ll
1 ; RUN: llc -march=hexagon -mcpu=hexagonv5  < %s | FileCheck %s
2 ; Optimize fabsf to clrbit in V5.
3
4 ; CHECK: r{{[0-9]+}} = clrbit(r{{[0-9]+}}, #31)
5
6 define float @my_fabsf(float %x) nounwind {
7 entry:
8   %x.addr = alloca float, align 4
9   store float %x, float* %x.addr, align 4
10   %0 = load float* %x.addr, align 4
11   %call = call float @fabsf(float %0)
12   ret float %call
13 }
14
15 declare float @fabsf(float)