1 ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
2 ; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
4 ; CHECK-SPIRV: OpName %[[#r1:]] "r1"
5 ; CHECK-SPIRV: OpName %[[#r2:]] "r2"
6 ; CHECK-SPIRV: OpName %[[#r3:]] "r3"
7 ; CHECK-SPIRV: OpName %[[#r4:]] "r4"
8 ; CHECK-SPIRV: OpName %[[#r5:]] "r5"
9 ; CHECK-SPIRV: OpName %[[#r6:]] "r6"
10 ; CHECK-SPIRV: OpName %[[#r7:]] "r7"
11 ; CHECK-SPIRV-NOT: OpDecorate %{{.*}} FPFastMathMode
12 ; CHECK-SPIRV: %[[#float:]] = OpTypeFloat 32
13 ; CHECK-SPIRV: %[[#r1]] = OpFNegate %[[#float]]
14 ; CHECK-SPIRV: %[[#r2]] = OpFNegate %[[#float]]
15 ; CHECK-SPIRV: %[[#r3]] = OpFNegate %[[#float]]
16 ; CHECK-SPIRV: %[[#r4]] = OpFNegate %[[#float]]
17 ; CHECK-SPIRV: %[[#r5]] = OpFNegate %[[#float]]
18 ; CHECK-SPIRV: %[[#r6]] = OpFNegate %[[#float]]
19 ; CHECK-SPIRV: %[[#r7]] = OpFNegate %[[#float]]
21 define spir_kernel void @testFNeg(float %a) local_unnamed_addr {
24 %r2 = fneg nnan float %a
25 %r3 = fneg ninf float %a
26 %r4 = fneg nsz float %a
27 %r5 = fneg arcp float %a
28 %r6 = fneg fast float %a
29 %r7 = fneg nnan ninf float %a