aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/DirectX/ShaderFlags/double-extensions.ll
blob: dd8ea5f5b1aecc1d4e0ae39811d77d562642b0a4 (plain)
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
; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s

target triple = "dxil-pc-shadermodel6.7-library"

; CHECK: ; Combined Shader Flags for Module
; CHECK-NEXT: ; Shader Flags Value: 0x00100044

; CHECK: ; Note: shader requires additional functionality:
; CHECK-NEXT: ;       Double-precision floating point
; CHECK-NEXT: ;       Double-precision extensions for 11.1
; CHECK-NEXT: ;       64-Bit integer
; CHECK-NEXT: ; Note: extra DXIL module flags:
; CHECK-NEXT: ;
; CHECK-NEXT: ; Shader Flags for Module Functions

;CHECK: ; Function top_level : 0x00100044
define double @top_level() #0 {
  %r = call double @test_uitofp_i64(i64 5)
  ret double %r
}


; CHECK: ; Function test_fdiv_double : 0x00000044
define double @test_fdiv_double(double %a, double %b) #0 {
  %res = fdiv double %a, %b
  ret double %res
}

; CHECK: ; Function test_uitofp_i64 : 0x00100044
define double @test_uitofp_i64(i64 %a) #0 {
  %r = uitofp i64 %a to double
  ret double %r
}

; CHECK: ; Function test_sitofp_i64 : 0x00100044
define double @test_sitofp_i64(i64 %a) #0 {
  %r = sitofp i64 %a to double
  ret double %r
}

; CHECK: ; Function test_fptoui_i32 : 0x00000044
define i32 @test_fptoui_i32(double %a) #0 {
  %r = fptoui double %a to i32
  ret i32 %r
}

; CHECK: ; Function test_fptosi_i64 : 0x00100044
define i64 @test_fptosi_i64(double %a) #0 {
  %r = fptosi double %a to i64
  ret i64 %r
}

attributes #0 = { convergent norecurse nounwind "hlsl.export"}