1 ; RUN: llc -march=hexagon -mcpu=hexagonv5 < %s | FileCheck %s
2 ; Optimize fneg to togglebit in V5.
4 define float @foo(float %x) nounwind {
7 ; CHECK: r{{[0-9]+}} = togglebit(r{{[0-9]+}},#31)
8 %x.addr = alloca float, align 4
9 store float %x, ptr %x.addr, align 4
10 %0 = load float, ptr %x.addr, align 4
11 %sub = fsub float -0.000000e+00, %0
15 define float @bar(float %x) nounwind {
18 ; CHECK: r{{[0-9]+}} = togglebit(r{{[0-9]+}},#31)
19 %sub = fsub float -0.000000e+00, %x
23 define float @baz0(float %x) nounwind {
26 ; CHECK: r{{[0-9]+}} = togglebit(r{{[0-9]+}},#31)
27 %conv1 = fmul nnan float %x, -1.000000e+00
31 define float @baz1(float %x) nounwind {
33 %not.nan = fadd nnan float %x, %x
35 ; CHECK: r{{[0-9]+}} = togglebit(r{{[0-9]+}},#31)
36 %conv1 = fmul float %not.nan, -1.000000e+00