2015-10-21 06:57:13 +08:00
|
|
|
; RUN: llc -mtriple=hexagon-unknown-elf -mcpu=hexagonv5 -hexagon-bit=0 < %s | FileCheck %s
|
2012-05-11 04:20:25 +08:00
|
|
|
; Optimize fabsf to clrbit in V5.
|
|
|
|
|
2017-02-10 23:33:13 +08:00
|
|
|
; CHECK: r{{[0-9]+}} = clrbit(r{{[0-9]+}},#31)
|
2012-05-11 04:20:25 +08:00
|
|
|
|
|
|
|
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)
|