Index: llvm/lib/Target/X86/X86ISelLowering.cpp =================================================================== --- llvm/lib/Target/X86/X86ISelLowering.cpp +++ llvm/lib/Target/X86/X86ISelLowering.cpp @@ -52,12 +52,12 @@ #include "llvm/MC/MCContext.h" #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCSymbol.h" +#include "llvm/Target/TargetOptions.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/KnownBits.h" #include "llvm/Support/MathExtras.h" -#include "llvm/Target/TargetOptions.h" #include #include #include @@ -2606,15 +2606,15 @@ Arg = DAG.getBitcast(MVT::i64, Arg); // Splitting the value into two i32 types - SDValue Lo, Hi; - Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, Dl, MVT::i32, Arg, - DAG.getConstant(0, Dl, MVT::i32)); - Hi = DAG.getNode(ISD::EXTRACT_ELEMENT, Dl, MVT::i32, Arg, + SDValue lo, hi; + lo = DAG.getNode(ISD::EXTRACT_ELEMENT, Dl, MVT::i64, Arg, + DAG.getConstant(0, Dl, MVT::i64)); + hi = DAG.getNode(ISD::EXTRACT_ELEMENT, Dl, MVT::i32, Arg, DAG.getConstant(1, Dl, MVT::i32)); // Attach the two i32 types into corresponding registers - RegsToPass.push_back(std::make_pair(VA.getLocReg(), Lo)); - RegsToPass.push_back(std::make_pair(NextVA.getLocReg(), Hi)); + RegsToPass.push_back(std::make_pair(VA.getLocReg(), lo)); + RegsToPass.push_back(std::make_pair(NextVA.getLocReg(), hi)); } SDValue