brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 879aab4 Raw
23 lines · plain
1; RUN: llc -mtriple=spirv64-- --spirv-ext=all < %s | FileCheck %s --check-prefix=CHECK2; No need to validate the output of the first command, we just want to ensure that we are on a path that triggers the use of SPV_KHR_float_controls23 4; RUN: llc -mtriple=spirv64-amd-amdhsa --spirv-ext=all < %s | FileCheck %s --check-prefix=CHECK-AMD5; RUN: %if spirv-tools %{ llc -mtriple=spirv64-amd-amdhsa --spirv-ext=all < %s -filetype=obj | spirv-val %}6 7; RUN: llc -mtriple=spirv64-amd-amdhsa --spirv-ext=+SPV_KHR_float_controls2 < %s | FileCheck %s --check-prefix=CHECK-AMD8; RUN: %if spirv-tools %{ llc -mtriple=spirv64-amd-amdhsa --spirv-ext=+SPV_KHR_float_controls2 < %s -filetype=obj | spirv-val %}9 10; Check that SPV_KHR_float_controls2 is not present when the target is AMD.11; AMD's SPIRV implementation uses the translator to get bitcode from SPIRV,12; which at the moment doesn't implement the SPV_KHR_float_controls2 extension.13 14; CHECK: SPV_KHR_float_controls215; CHECK-AMD-NOT: SPV_KHR_float_controls216 17define spir_kernel void @foo(float %a, float %b) {18entry:19  ; Use contract to trigger a use of SPV_KHR_float_controls220  %r1 = fadd contract float %a, %b21  ret void22}23