Debian Codegraph @

llvm/test/tools/dxil-dis/fastmath.ll

raw
1 ; RUN: llc %s --filetype=obj -o - | dxil-dis -o - | FileCheck %s
2 target triple = "dxil-unknown-shadermodel6.7-library"
3
4 define float @fma(float %0, float %1, float %2) #0 {
5 ; verify reassoc and contract are converted to fast
6 ; CHECK: %4 = fmul fast float %0, %1
7 %4 = fmul reassoc float %0, %1
8 ; CHECK-NEXT: %5 = fadd fast float %4, %2
9 %5 = fadd contract float %4, %2
10 ; verify these are converted to a single fast flag
11 ; CHECK-NEXT: %6 = fmul fast float %0, %1
12 %6 = fmul reassoc contract float %0, %1
13 ; verify these flags are maintained
14 ; CHECK-NEXT: %7 = fadd nnan ninf nsz arcp float %0, %1
15 %7 = fadd nnan ninf nsz arcp float %0, %1
16 ; verify that afn is removed
17 ; CHECK-NEXT: %8 = fmul float %0, %1
18 %8 = fmul afn float %0, %1
19 ret float %5
20 }
21
22 attributes #0 = { norecurse nounwind readnone willreturn "disable-tail-calls"="false" "waveops-include-helper-lanes" "fp32-denorm-mode"="any" "hlsl.export" }
23