1 ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
3 ; CHECK-SPIRV: OpName %[[#r1:]] "r1"
4 ; CHECK-SPIRV: OpName %[[#r2:]] "r2"
5 ; CHECK-SPIRV: OpName %[[#r3:]] "r3"
6 ; CHECK-SPIRV: OpName %[[#r4:]] "r4"
7 ; CHECK-SPIRV: OpName %[[#r5:]] "r5"
8 ; CHECK-SPIRV: OpName %[[#r6:]] "r6"
9 ; CHECK-SPIRV: OpName %[[#r7:]] "r7"
10 ; CHECK-SPIRV-NOT: OpDecorate %[[#r1]] FPFastMathMode
11 ; CHECK-SPIRV-DAG: OpDecorate %[[#r2]] FPFastMathMode NotNaN
12 ; CHECK-SPIRV-DAG: OpDecorate %[[#r3]] FPFastMathMode NotInf
13 ; CHECK-SPIRV-DAG: OpDecorate %[[#r4]] FPFastMathMode NSZ
14 ; CHECK-SPIRV-DAG: OpDecorate %[[#r5]] FPFastMathMode AllowRecip
15 ; CHECK-SPIRV-DAG: OpDecorate %[[#r6]] FPFastMathMode NotNaN|NotInf|NSZ|AllowRecip|Fast
16 ; CHECK-SPIRV-DAG: OpDecorate %[[#r7]] FPFastMathMode NotNaN|NotInf
17 ; CHECK-SPIRV: %[[#float:]] = OpTypeFloat 32
18 ; CHECK-SPIRV: %[[#r1]] = OpFAdd %[[#float]]
19 ; CHECK-SPIRV: %[[#r2]] = OpFAdd %[[#float]]
20 ; CHECK-SPIRV: %[[#r3]] = OpFAdd %[[#float]]
21 ; CHECK-SPIRV: %[[#r4]] = OpFAdd %[[#float]]
22 ; CHECK-SPIRV: %[[#r5]] = OpFAdd %[[#float]]
23 ; CHECK-SPIRV: %[[#r6]] = OpFAdd %[[#float]]
24 ; CHECK-SPIRV: %[[#r7]] = OpFAdd %[[#float]]
26 define spir_kernel void @testFAdd(float %a, float %b) {
28 %r1 = fadd float %a, %b
29 %r2 = fadd nnan float %a, %b
30 %r3 = fadd ninf float %a, %b
31 %r4 = fadd nsz float %a, %b
32 %r5 = fadd arcp float %a, %b
33 %r6 = fadd fast float %a, %b
34 %r7 = fadd nnan ninf float %a, %b