xref: /llvm-project/llvm/test/CodeGen/DirectX/ShaderFlags/double-extensions.ll (revision a4b7a2d021ca7371752f0e8180200ffd7b48ca70)
1; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s
2
3target triple = "dxil-pc-shadermodel6.7-library"
4
5; CHECK: ; Combined Shader Flags for Module
6; CHECK-NEXT: ; Shader Flags Value: 0x00000044
7
8; CHECK: ; Note: shader requires additional functionality:
9; CHECK-NEXT: ;       Double-precision floating point
10; CHECK-NEXT: ;       Double-precision extensions for 11.1
11; CHECK-NEXT: ; Note: extra DXIL module flags:
12; CHECK-NEXT: ;
13; CHECK-NEXT: ; Shader Flags for Module Functions
14
15;CHECK: ; Function top_level : 0x00000044
16define double @top_level() #0 {
17  %r = call double @test_uitofp_i64(i64 5)
18  ret double %r
19}
20
21
22; CHECK: ; Function test_fdiv_double : 0x00000044
23define double @test_fdiv_double(double %a, double %b) #0 {
24  %res = fdiv double %a, %b
25  ret double %res
26}
27
28; CHECK: ; Function test_uitofp_i64 : 0x00000044
29define double @test_uitofp_i64(i64 %a) #0 {
30  %r = uitofp i64 %a to double
31  ret double %r
32}
33
34; CHECK: ; Function test_sitofp_i64 : 0x00000044
35define double @test_sitofp_i64(i64 %a) #0 {
36  %r = sitofp i64 %a to double
37  ret double %r
38}
39
40; CHECK: ; Function test_fptoui_i32 : 0x00000044
41define i32 @test_fptoui_i32(double %a) #0 {
42  %r = fptoui double %a to i32
43  ret i32 %r
44}
45
46; CHECK: ; Function test_fptosi_i64 : 0x00000044
47define i64 @test_fptosi_i64(double %a) #0 {
48  %r = fptosi double %a to i64
49  ret i64 %r
50}
51
52attributes #0 = { convergent norecurse nounwind "hlsl.export"}
53