diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-26 05:28:14 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-26 05:28:14 +0000 |
commit | d4015074e47a6716e7dc0d82296a9d2e55437987 (patch) | |
tree | e8d057878b8bef2c0ff83943b7b643910bc5a3e4 /lib | |
parent | 022a27e363dcd3b8d4f7e6426559ab29d7a86d70 (diff) |
fix an apparently real bug exposed by a warning in -asserts mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67737 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/Mips/MipsISelLowering.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Target/Mips/MipsISelLowering.cpp b/lib/Target/Mips/MipsISelLowering.cpp index e50c042154..8489ad249f 100644 --- a/lib/Target/Mips/MipsISelLowering.cpp +++ b/lib/Target/Mips/MipsISelLowering.cpp @@ -948,13 +948,14 @@ LowerFORMAL_ARGUMENTS(SDValue Op, SelectionDAG &DAG) // to 32 bits. Insert an assert[sz]ext to capture this, then // truncate to the right size. if (VA.getLocInfo() != CCValAssign::Full) { - unsigned Opcode; + unsigned Opcode = 0; if (VA.getLocInfo() == CCValAssign::SExt) Opcode = ISD::AssertSext; else if (VA.getLocInfo() == CCValAssign::ZExt) Opcode = ISD::AssertZext; - ArgValue = DAG.getNode(Opcode, dl, RegVT, ArgValue, - DAG.getValueType(VA.getValVT())); + if (Opcode) + ArgValue = DAG.getNode(Opcode, dl, RegVT, ArgValue, + DAG.getValueType(VA.getValVT())); ArgValue = DAG.getNode(ISD::TRUNCATE, dl, VA.getValVT(), ArgValue); } |