1 ; RUN: llc -march=hexagon -mcpu=hexagonv5 < %s | FileCheck %s
2 ; Optimize fneg to togglebit in V5.
4 define float @foo(float %x) nounwind {
6 ; CHECK: r{{[0-9]+}} = togglebit(r{{[0-9]+}},#31)
7 %x.addr = alloca float, align 4
8 store float %x, float* %x.addr, align 4
9 %0 = load float, float* %x.addr, align 4
10 %sub = fsub float -0.000000e+00, %0
14 define float @bar(float %x) nounwind {
16 ; CHECK: r{{[0-9]+}} = togglebit(r{{[0-9]+}},#31)
17 %sub = fsub float -0.000000e+00, %x
21 define float @baz(float %x) nounwind {
23 ; CHECK: r{{[0-9]+}} = togglebit(r{{[0-9]+}},#31)
24 %conv1 = fmul float %x, -1.000000e+00