aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/InstSelectSimple.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/X86/InstSelectSimple.cpp')
-rw-r--r--lib/Target/X86/InstSelectSimple.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/X86/InstSelectSimple.cpp b/lib/Target/X86/InstSelectSimple.cpp
index fac58cc00f..b2b15c5b94 100644
--- a/lib/Target/X86/InstSelectSimple.cpp
+++ b/lib/Target/X86/InstSelectSimple.cpp
@@ -834,8 +834,8 @@ void ISel::promote32(unsigned targetReg, const ValueRecord &VR) {
/// ret float/double : Top of FP stack
///
void ISel::visitReturnInst(ReturnInst &I) {
- BuildMI(BB, X86::FP_REG_KILL, 0);
if (I.getNumOperands() == 0) {
+ BuildMI(BB, X86::FP_REG_KILL, 0);
BuildMI(BB, X86::RET, 0); // Just emit a 'ret' instruction
return;
}
@@ -866,6 +866,7 @@ void ISel::visitReturnInst(ReturnInst &I) {
visitInstruction(I);
}
// Emit a 'ret' instruction
+ BuildMI(BB, X86::FP_REG_KILL, 0);
BuildMI(BB, X86::RET, 0);
}