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 | 3c04970f31375fec5000fb52f88a88087e75b6e6 (patch) | |
tree | f7d3369cef7475e2a20fb35e59a544bc98ac5d9b | |
parent | 3871781c7be6894a8731f50f4620386a14bc1f11 (diff) | |
download | bcm5719-llvm-3c04970f31375fec5000fb52f88a88087e75b6e6.tar.gz bcm5719-llvm-3c04970f31375fec5000fb52f88a88087e75b6e6.zip |
fix an apparently real bug exposed by a warning in -asserts mode.
llvm-svn: 67737
-rw-r--r-- | llvm/lib/Target/Mips/MipsISelLowering.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/Mips/MipsISelLowering.cpp b/llvm/lib/Target/Mips/MipsISelLowering.cpp index e50c0421543..8489ad249f9 100644 --- a/llvm/lib/Target/Mips/MipsISelLowering.cpp +++ b/llvm/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); } |