aboutsummaryrefslogtreecommitdiff
path: root/backend/lib/CodeGen/MachineLICM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'backend/lib/CodeGen/MachineLICM.cpp')
-rw-r--r--backend/lib/CodeGen/MachineLICM.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/backend/lib/CodeGen/MachineLICM.cpp b/backend/lib/CodeGen/MachineLICM.cpp
index 8a34d3b..627e59f 100644
--- a/backend/lib/CodeGen/MachineLICM.cpp
+++ b/backend/lib/CodeGen/MachineLICM.cpp
@@ -113,6 +113,9 @@ namespace {
hasProtectedAttachment(Instruction) || !Instruction.memOperands().empty()) {
return false;
}
+ if (Flags.has(InstructionFlag::MayRaiseFPException) &&
+ !Instruction.flags().has(MachineInstrFlag::NoFPExcept))
+ return false;
bool HasDefinition = false;
for (const MachineOperand &Operand : Instruction.operands()) {
@@ -141,14 +144,6 @@ namespace {
auto Info = Function.registerInfo().virtualRegisterInfo(*Reg);
if (!Info)
return std::unexpected(Info.error());
- const auto &Type = Info->get().Type;
- if (Type && Type->isFloat() && !Instruction.flags().has(MachineInstrFlag::NoFPExcept)) {
- return false;
- }
- }
- if (Stage == MachineCodeMotionStage::PostRegisterAllocation &&
- !Instruction.flags().has(MachineInstrFlag::NoFPExcept)) {
- return false;
}
return HasDefinition;
}