PTX: add flag to disable mad/fma selection
Patch by Dan Bailey
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131537 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/PTX/PTXSubtarget.h b/lib/Target/PTX/PTXSubtarget.h
index eebb284..59fa696 100644
--- a/lib/Target/PTX/PTXSubtarget.h
+++ b/lib/Target/PTX/PTXSubtarget.h
@@ -49,7 +49,10 @@
// The native .f64 type is supported on the hardware.
bool SupportsDouble;
-
+
+ // Support the fused-multiply add (FMA) and multiply-add (MAD) instructions
+ bool SupportsFMA;
+
// Use .u64 instead of .u32 for addresses.
bool Is64Bit;
@@ -64,6 +67,8 @@
bool is64Bit() const { return Is64Bit; }
+ bool supportsFMA() const { return SupportsFMA; }
+
bool supportsSM13() const { return PTXShaderModel >= PTX_SM_1_3; }
bool supportsSM20() const { return PTXShaderModel >= PTX_SM_2_0; }