setOperationAction(ISD::SREM , MVT::f32, Expand);
// If we're enabling GP optimizations, use hardware square root
- if (!TM.getSubtarget<PPCSubtarget>().isGigaProcessor()) {
+ if (!TM.getSubtarget<PPCSubtarget>().hasFSQRT()) {
setOperationAction(ISD::FSQRT, MVT::f64, Expand);
setOperationAction(ISD::FSQRT, MVT::f32, Expand);
}
PPCTargetArg(cl::desc("Force generation of code for a specific PPC target:"),
cl::values(
clEnumValN(TargetAIX, "aix", " Enable AIX codegen"),
- clEnumValN(TargetDarwin,"darwin"," Enable Darwin codegen"),
+ clEnumValN(TargetDarwin,"darwin",
+ " Enable Darwin codegen"),
clEnumValEnd),
cl::location(PPCTarget), cl::init(TargetDefault));
- cl::opt<bool> EnableGPOPT("enable-gpopt", cl::Hidden,
- cl::desc("Enable optimizations for GP cpus"));
}
enum PowerPCFeature {
SubtargetFeatures::Parse(FS, CPU,
PowerPCSubTypeKV, PowerPCSubTypeKVSize,
PowerPCFeatureKV, PowerPCFeatureKVSize);
- IsGigaProcessor = (Bits & PowerPCFeatureGPUL) != 0;
+ IsGigaProcessor = (Bits & PowerPCFeatureGPUL ) != 0;
+ HasFSQRT = (Bits & PowerPCFeatureFSqrt) != 0;
// Set the boolean corresponding to the current target triple, or the default
// if one cannot be determined, to true.
IsDarwin = true;
#endif
}
-
- // If GP opts are forced on by the commandline, do so now.
- if (EnableGPOPT) IsGigaProcessor = true;
}
/// Used by the ISel to turn in optimizations for POWER4-derived architectures
bool IsGigaProcessor;
+ bool HasFSQRT;
bool IsAIX;
bool IsDarwin;
public:
/// function for this subtarget.
unsigned getStackAlignment() const { return StackAlignment; }
+ bool hasFSQRT() const { return HasFSQRT; }
+
bool isAIX() const { return IsAIX; }
bool isDarwin() const { return IsDarwin; }