Bob Wilson | 4c65c50 | 2012-08-08 20:31:37 +0000 | [diff] [blame] | 1 | ; RUN: llc -mtriple=hexagon-unknown-elf -mcpu=hexagonv5 < %s | FileCheck %s |
Sirish Pande | 69295b8 | 2012-05-10 20:20:25 +0000 | [diff] [blame] | 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 |
Bob Wilson | 874886c | 2012-08-03 23:29:17 +0000 | [diff] [blame] | 11 | %call = call float @fabsf(float %0) readnone |
Sirish Pande | 69295b8 | 2012-05-10 20:20:25 +0000 | [diff] [blame] | 12 | ret float %call |
| 13 | } |
| 14 | |
| 15 | declare float @fabsf(float) |