Skip to content

Commit

Permalink
Map FPFastMathModeINTEL on SPV_INTEL_fp_fast_math_mode (#2360)
Browse files Browse the repository at this point in the history
Signed-off-by: Sidorov, Dmitry <dmitry.sidorov@intel.com>
  • Loading branch information
MrSidims authored Feb 15, 2024
1 parent 9ec969c commit 262395d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/SPIRV/libSPIRV/SPIRVEntry.h
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,8 @@ class SPIRVCapability : public SPIRVEntryNoId<OpCapability> {
return ExtensionID::SPV_INTEL_fast_composite;
case internal::CapabilitySubgroupRequirementsINTEL:
return ExtensionID::SPV_INTEL_subgroup_requirements;
case CapabilityFPFastMathModeINTEL:
return ExtensionID::SPV_INTEL_fp_fast_math_mode;
default:
return {};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
; RUN: llvm-spirv -r %t.spv -o - | llvm-dis -o - | FileCheck %s --check-prefix=CHECK-LLVM

; CHECK-SPIRV-ON: 2 Capability FPFastMathModeINTEL
; CHECK-SPIRV-ON: SPV_INTEL_fp_fast_math_mode
; CHECK-SPIRV-ON: 3 Name [[mu:[0-9]+]] "mul"
; CHECK-SPIRV-ON: 3 Name [[su:[0-9]+]] "sub"
; CHECK-SPIRV-ON-DAG: 4 Decorate [[mu]] FPFastMathMode 65536
; CHECK-SPIRV-ON-DAG: 4 Decorate [[su]] FPFastMathMode 131072

; CHECK-SPIRV-OFF-NOT: 2 Capability FPFastMathModeINTEL
; CHECK-SPIRV-OFF-NOT: SPV_INTEL_fp_fast_math_mode
; CHECK-SPIRV-OFF: 3 Name [[mu:[0-9]+]] "mul"
; CHECK-SPIRV-OFF: 3 Name [[su:[0-9]+]] "sub"
; CHECK-SPIRV-OFF-NOT: 4 Decorate [[mu]] FPFastMathMode 65536
Expand Down

0 comments on commit 262395d

Please sign in to comment.