1 ; RUN: llc -O0 -mtriple=spirv32v1.3-unknown-unknown %s -o - | FileCheck %s --check-prefixes=SPV
2 ; RUN: llc -O0 -mtriple=spirv32v1.3-unknown-unknown %s --spirv-ext=+SPV_KHR_float_controls -o - | FileCheck %s --check-prefixes=SPVEXT
4 define dso_local dllexport spir_kernel void @k_float_controls_0(i32 %ibuf, i32 %obuf) local_unnamed_addr {
9 define dso_local dllexport spir_kernel void @k_float_controls_1(i32 %ibuf, i32 %obuf) local_unnamed_addr {
14 define dso_local dllexport spir_kernel void @k_float_controls_2(i32 %ibuf, i32 %obuf) local_unnamed_addr {
19 define dso_local dllexport spir_kernel void @k_float_controls_3(i32 %ibuf, i32 %obuf) local_unnamed_addr {
24 define dso_local dllexport spir_kernel void @k_float_controls_4(i32 %ibuf, i32 %obuf) local_unnamed_addr {
30 !spirv.ExecutionMode = !{!15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27, !28, !29}
32 ; SPV-NOT: OpExtension "SPV_KHR_float_controls"
33 ; SPVEXT: OpExtension "SPV_KHR_float_controls"
35 ; SPV-DAG: OpEntryPoint {{.*}} %[[#KERNEL0:]] "k_float_controls_0"
36 ; SPV-DAG: OpEntryPoint {{.*}} %[[#KERNEL1:]] "k_float_controls_1"
37 ; SPV-DAG: OpEntryPoint {{.*}} %[[#KERNEL2:]] "k_float_controls_2"
38 ; SPV-DAG: OpEntryPoint {{.*}} %[[#KERNEL3:]] "k_float_controls_3"
39 ; SPV-DAG: OpEntryPoint {{.*}} %[[#KERNEL4:]] "k_float_controls_4"
41 ; SPV-DAG: OpExecutionMode %[[#KERNEL0]] DenormPreserve 64
42 !15 = !{void (i32, i32)* @k_float_controls_0, i32 4459, i32 64}
43 ; SPV-DAG: OpExecutionMode %[[#KERNEL0]] DenormPreserve 32
44 !16 = !{void (i32, i32)* @k_float_controls_0, i32 4459, i32 32}
45 ; SPV-DAG: OpExecutionMode %[[#KERNEL0]] DenormPreserve 16
46 !17 = !{void (i32, i32)* @k_float_controls_0, i32 4459, i32 16}
48 ; SPV-DAG: OpExecutionMode %[[#KERNEL1]] DenormFlushToZero 64
49 !18 = !{void (i32, i32)* @k_float_controls_1, i32 4460, i32 64}
50 ; SPV-DAG: OpExecutionMode %[[#KERNEL1]] DenormFlushToZero 32
51 !19 = !{void (i32, i32)* @k_float_controls_1, i32 4460, i32 32}
52 ; SPV-DAG: OpExecutionMode %[[#KERNEL1]] DenormFlushToZero 16
53 !20 = !{void (i32, i32)* @k_float_controls_1, i32 4460, i32 16}
55 ; SPV-DAG: OpExecutionMode %[[#KERNEL2]] SignedZeroInfNanPreserve 64
56 !21 = !{void (i32, i32)* @k_float_controls_2, i32 4461, i32 64}
57 ; SPV-DAG: OpExecutionMode %[[#KERNEL2]] SignedZeroInfNanPreserve 32
58 !22 = !{void (i32, i32)* @k_float_controls_2, i32 4461, i32 32}
59 ; SPV-DAG: OpExecutionMode %[[#KERNEL2]] SignedZeroInfNanPreserve 16
60 !23 = !{void (i32, i32)* @k_float_controls_2, i32 4461, i32 16}
62 ; SPV-DAG: OpExecutionMode %[[#KERNEL3]] RoundingModeRTE 64
63 !24 = !{void (i32, i32)* @k_float_controls_3, i32 4462, i32 64}
64 ; SPV-DAG: OpExecutionMode %[[#KERNEL3]] RoundingModeRTE 32
65 !25 = !{void (i32, i32)* @k_float_controls_3, i32 4462, i32 32}
66 ; SPV-DAG: OpExecutionMode %[[#KERNEL3]] RoundingModeRTE 16
67 !26 = !{void (i32, i32)* @k_float_controls_3, i32 4462, i32 16}
69 ; SPV-DAG: OpExecutionMode %[[#KERNEL4]] RoundingModeRTZ 64
70 !27 = !{void (i32, i32)* @k_float_controls_4, i32 4463, i32 64}
71 ; SPV-DAG: OpExecutionMode %[[#KERNEL4]] RoundingModeRTZ 32
72 !28 = !{void (i32, i32)* @k_float_controls_4, i32 4463, i32 32}
73 ; SPV-DAG: OpExecutionMode %[[#KERNEL4]] RoundingModeRTZ 16
74 !29 = !{void (i32, i32)* @k_float_controls_4, i32 4463, i32 16}