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
|
2015-02-28 05:17:42 +08:00
|
|
|
%0 = load float, 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)
|