From: Evan Cheng Date: Wed, 1 Feb 2006 01:19:32 +0000 (+0000) Subject: Return's chain should be matching either the chain produced by the X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=760df2988190552252ca7860b31aab49d058453a;p=oota-llvm.git Return's chain should be matching either the chain produced by the value or the chain going into the load. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25863 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index dce781d3a8b..d692780179c 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -1916,7 +1916,8 @@ SDOperand X86TargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) { SDOperand Chain = Op.getOperand(0); SDOperand Value = Op.getOperand(1); - if (Value.getOpcode() == ISD::LOAD && Chain == Value.getOperand(0)) { + if (Value.getOpcode() == ISD::LOAD && + (Chain == Value.getValue(1) || Chain == Value.getOperand(0))) { Chain = Value.getOperand(0); MemLoc = Value.getOperand(1); } else {