@@ -88,18 +88,16 @@ ARMFrameLowering *ARMSubtarget::initializeFrameLowering(StringRef CPU,
88
88
ARMSubtarget::ARMSubtarget (const Triple &TT, const std::string &CPU,
89
89
const std::string &FS,
90
90
const ARMBaseTargetMachine &TM, bool IsLittle,
91
- bool MinSize)
91
+ bool MinSize, DenormalMode DM )
92
92
: ARMGenSubtargetInfo(TT, CPU, /* TuneCPU*/ CPU, FS),
93
93
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),
95
95
FrameLowering(initializeFrameLowering(CPU, FS)),
96
96
// At this point initializeSubtargetDependencies has been called so
97
97
// 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 )),
103
101
TLInfo(TM, *this ) {
104
102
105
103
CallLoweringInfo.reset (new ARMCallLowering (*getTargetLowering ()));
@@ -224,7 +222,8 @@ void ARMSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
224
222
// NEON f32 ops are non-IEEE 754 compliant. Darwin is ok with it by default.
225
223
const FeatureBitset &Bits = getFeatureBits ();
226
224
if ((Bits[ARM::ProcA5] || Bits[ARM::ProcA8]) && // Where this matters
227
- (Options.UnsafeFPMath || isTargetDarwin ()))
225
+ (Options.UnsafeFPMath || isTargetDarwin () ||
226
+ DM == DenormalMode::getPreserveSign ()))
228
227
HasNEONForFP = true ;
229
228
230
229
if (isRWPI ())
0 commit comments