[llvm-commits] [llvm] r141184 - /llvm/trunk/lib/Target/PTX/PTXISelDAGToDAG.cpp
Duncan Sands
baldrick at free.fr
Wed Oct 5 08:13:13 PDT 2011
Author: baldrick
Date: Wed Oct 5 10:13:13 2011
New Revision: 141184
URL: http://llvm.org/viewvc/llvm-project?rev=141184&view=rev
Log:
Ensure OpCode is not used uninitialized.
Modified:
llvm/trunk/lib/Target/PTX/PTXISelDAGToDAG.cpp
Modified: llvm/trunk/lib/Target/PTX/PTXISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXISelDAGToDAG.cpp?rev=141184&r1=141183&r2=141184&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/PTX/PTXISelDAGToDAG.cpp Wed Oct 5 10:13:13 2011
@@ -125,8 +125,10 @@
OpCode = PTX::READPARAMI64;
else if (Type == MVT::f32)
OpCode = PTX::READPARAMF32;
- else if (Type == MVT::f64)
+ else {
+ assert(Type == MVT::f64 && "Unexpected type!");
OpCode = PTX::READPARAMF64;
+ }
SDValue Pred = CurDAG->getRegister(PTX::NoRegister, MVT::i1);
SDValue PredOp = CurDAG->getTargetConstant(PTXPredicate::None, MVT::i32);
More information about the llvm-commits
mailing list