@@ -88,18 +88,16 @@ ARMFrameLowering *ARMSubtarget::initializeFrameLowering(StringRef CPU,
8888ARMSubtarget::ARMSubtarget (const Triple &TT, const std::string &CPU,
8989 const std::string &FS,
9090 const ARMBaseTargetMachine &TM, bool IsLittle,
91- bool MinSize)
91+ bool MinSize, DenormalMode DM )
9292 : ARMGenSubtargetInfo(TT, CPU, /* TuneCPU*/ CPU, FS),
9393 UseMulOps(UseFusedMulOps), CPUString(CPU), OptMinSize(MinSize),
94- IsLittle(IsLittle), TargetTriple(TT), Options(TM.Options), TM(TM),
94+ IsLittle(IsLittle), DM(DM), TargetTriple(TT), Options(TM.Options), TM(TM),
9595 FrameLowering(initializeFrameLowering(CPU, FS)),
9696 // At this point initializeSubtargetDependencies has been called so
9797 // we can query directly.
98- InstrInfo(isThumb1Only()
99- ? (ARMBaseInstrInfo *)new Thumb1InstrInfo(*this )
100- : !isThumb()
101- ? (ARMBaseInstrInfo *)new ARMInstrInfo(*this )
102- : (ARMBaseInstrInfo *)new Thumb2InstrInfo(*this )),
98+ InstrInfo(isThumb1Only() ? (ARMBaseInstrInfo *)new Thumb1InstrInfo(*this )
99+ : !isThumb() ? (ARMBaseInstrInfo *)new ARMInstrInfo(*this )
100+ : (ARMBaseInstrInfo *)new Thumb2InstrInfo(*this )),
103101 TLInfo(TM, *this ) {
104102
105103 CallLoweringInfo.reset (new ARMCallLowering (*getTargetLowering ()));
@@ -224,7 +222,8 @@ void ARMSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
224222 // NEON f32 ops are non-IEEE 754 compliant. Darwin is ok with it by default.
225223 const FeatureBitset &Bits = getFeatureBits ();
226224 if ((Bits[ARM::ProcA5] || Bits[ARM::ProcA8]) && // Where this matters
227- (Options.UnsafeFPMath || isTargetDarwin ()))
225+ (Options.UnsafeFPMath || isTargetDarwin () ||
226+ DM == DenormalMode::getPreserveSign ()))
228227 HasNEONForFP = true ;
229228
230229 if (isRWPI ())
0 commit comments