aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/X86/X86ISelPattern.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Target/X86/X86ISelPattern.cpp b/lib/Target/X86/X86ISelPattern.cpp
index 5d91fe41b4..0e77a7f8b8 100644
--- a/lib/Target/X86/X86ISelPattern.cpp
+++ b/lib/Target/X86/X86ISelPattern.cpp
@@ -1384,6 +1384,14 @@ unsigned ISel::SelectExpr(SDOperand N) {
}
BuildMI(BB, Opc, 1,Result).addImm(cast<ConstantSDNode>(N)->getValue());
return Result;
+ case ISD::UNDEF:
+ if (Node->getValueType(0) == MVT::f64) {
+ // FIXME: SHOULD TEACH STACKIFIER ABOUT UNDEF VALUES!
+ BuildMI(BB, X86::FLD0, 0, Result);
+ } else {
+ BuildMI(BB, X86::IMPLICIT_DEF, 0, Result);
+ }
+ return Result;
case ISD::GlobalAddress: {
GlobalValue *GV = cast<GlobalAddressSDNode>(N)->getGlobal();
BuildMI(BB, X86::MOV32ri, 1, Result).addGlobalAddress(GV);