From: Owen Anderson Date: Thu, 11 Sep 2008 19:44:55 +0000 (+0000) Subject: Fix a bug in ANY_EXTEND handling that was breaking 403.gcc on X86-64 in fast isel. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ac34a00fe0784cd6efc466f03f93ab1017fa9726;p=oota-llvm.git Fix a bug in ANY_EXTEND handling that was breaking 403.gcc on X86-64 in fast isel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56117 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp index 981f5a7d7ee..63444ca7e25 100644 --- a/lib/Target/X86/X86FastISel.cpp +++ b/lib/Target/X86/X86FastISel.cpp @@ -271,8 +271,13 @@ X86FastISel::X86FastEmitStore(MVT VT, unsigned Val, bool X86FastISel::X86FastEmitExtend(ISD::NodeType Opc, MVT DstVT, unsigned Src, MVT SrcVT, unsigned &ResultReg) { - ResultReg = FastEmit_r(SrcVT.getSimpleVT(), DstVT.getSimpleVT(), Opc, Src); - return ResultReg != 0; + unsigned RR = FastEmit_r(SrcVT.getSimpleVT(), DstVT.getSimpleVT(), Opc, Src); + + if (RR != 0) { + ResultReg = RR; + return true; + } else + return false; } /// X86SelectConstAddr - Select and emit code to materialize constant address.