Fix a bug in ANY_EXTEND handling that was breaking 403.gcc on X86-64 in fast isel.
authorOwen Anderson <resistor@mac.com>
Thu, 11 Sep 2008 19:44:55 +0000 (19:44 +0000)
committerOwen Anderson <resistor@mac.com>
Thu, 11 Sep 2008 19:44:55 +0000 (19:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56117 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86FastISel.cpp

index 981f5a7d7ee2f7d8ed52772b2cab77911e57fbcc..63444ca7e2535e7fbc1f71250af66dd89a1118aa 100644 (file)
@@ -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.