This adds infrastructural pieces for an analysis to compute the DXIL shader flags. In this state the analysis can compute two fairly straightforward feature flags for use of double-precision floating point values and the DX 11.1 extended double support. This patch does conflict with D135190, conflicts will be resolved prior to merging. Reviewed By: python3kgae Differential Revision: https://reviews.llvm.org/D135393 # Conflicts: # llvm/lib/Target/DirectX/CMakeLists.txt # llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
13 lines
389 B
LLVM
13 lines
389 B
LLVM
; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s
|
|
|
|
target triple = "dxil-pc-shadermodel6.7-library"
|
|
|
|
; CHECK: ; Shader Flags Value: 0x00000001
|
|
; CHECK: ; Note: shader requires additional functionality:
|
|
; CHECK-NEXT: ; Double-precision floating point
|
|
; CHECK-NEXT: {{^;$}}
|
|
define double @add(double %a, double %b) {
|
|
%sum = fadd double %a, %b
|
|
ret double %sum
|
|
}
|