forked from intel/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpFNegate.spvasm
53 lines (52 loc) · 2.02 KB
/
OpFNegate.spvasm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
; REQUIRES: spirv-as
; RUN: spirv-as --target-env spv1.0 -o %t.spv %s
; RUN: spirv-val %t.spv
; RUN: llvm-spirv -r -o - %t.spv | llvm-dis | FileCheck %s
OpCapability Addresses
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %1 "testFNegate"
OpName %a "a"
OpName %r1 "r1"
OpName %r2 "r2"
OpName %r3 "r3"
OpName %r4 "r4"
OpName %r5 "r5"
OpName %r6 "r6"
OpName %r7 "r7"
OpName %r8 "r8"
OpName %r9 "r9"
OpDecorate %r2 FPFastMathMode None
OpDecorate %r3 FPFastMathMode NotNaN
OpDecorate %r4 FPFastMathMode NotInf
OpDecorate %r5 FPFastMathMode NSZ
OpDecorate %r6 FPFastMathMode AllowRecip
OpDecorate %r7 FPFastMathMode Fast
OpDecorate %r8 FPFastMathMode NotNaN|NotInf
OpDecorate %r9 FPFastMathMode NotNaN|Fast
%void = OpTypeVoid
%float = OpTypeFloat 32
%5 = OpTypeFunction %void %float
%1 = OpFunction %void None %5
%a = OpFunctionParameter %float
%6 = OpLabel
%r1 = OpFNegate %float %a
%r2 = OpFNegate %float %a
%r3 = OpFNegate %float %a
%r4 = OpFNegate %float %a
%r5 = OpFNegate %float %a
%r6 = OpFNegate %float %a
%r7 = OpFNegate %float %a
%r8 = OpFNegate %float %a
%r9 = OpFNegate %float %a
OpReturn
OpFunctionEnd
; CHECK: %r1 = fsub float -0.000000e+00, %a
; CHECK: %r2 = fsub float -0.000000e+00, %a
; CHECK: %r3 = fsub nnan float -0.000000e+00, %a
; CHECK: %r4 = fsub ninf float -0.000000e+00, %a
; CHECK: %r5 = fsub nsz float -0.000000e+00, %a
; CHECK: %r6 = fsub arcp float -0.000000e+00, %a
; CHECK: %r7 = fsub fast float -0.000000e+00, %a
; CHECK: %r8 = fsub nnan ninf float -0.000000e+00, %a
; CHECK: %r9 = fsub fast float -0.000000e+00, %a