2012-08-09 04:31:37 +08:00
|
|
|
; RUN: llc -mtriple=hexagon-unknown-elf -mcpu=hexagonv5 < %s | FileCheck %s
|
2012-05-11 04:20:25 +08:00
|
|
|
; Optimize fabsf to clrbit in V5.
|
|
|
|
|
|
|
|
; CHECK: r{{[0-9]+}} = clrbit(r{{[0-9]+}}, #31)
|
|
|
|
|
|
|
|
define float @my_fabsf(float %x) nounwind {
|
|
|
|
entry:
|
|
|
|
%x.addr = alloca float, align 4
|
|
|
|
store float %x, float* %x.addr, align 4
|
|
|
|
%0 = load float* %x.addr, align 4
|
2012-08-04 07:29:17 +08:00
|
|
|
%call = call float @fabsf(float %0) readnone
|
2012-05-11 04:20:25 +08:00
|
|
|
ret float %call
|
|
|
|
}
|
|
|
|
|
|
|
|
declare float @fabsf(float)
|