summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
diff options
context:
space:
mode:
authorLuis Marques <luismarques@lowrisc.org>2019-09-20 13:48:02 +0000
committerLuis Marques <luismarques@lowrisc.org>2019-09-20 13:48:02 +0000
commit2d0cd6cac8403c22b29bcc7874649ff789c6c9b0 (patch)
treed7b45f6d8c7b68353b7dad0d8e14e3d630120970 /llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
parent6c127cdb99f37069ef410ff9c7a57a76cab269a2 (diff)
downloadbcm5719-llvm-2d0cd6cac8403c22b29bcc7874649ff789c6c9b0.tar.gz
bcm5719-llvm-2d0cd6cac8403c22b29bcc7874649ff789c6c9b0.zip
[RISCV] Fix static analysis issues
Unlikely to be problematic but still worth fixing. Differential Revision: https://reviews.llvm.org/D67640 llvm-svn: 372391
Diffstat (limited to 'llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp')
-rw-r--r--llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
index 8439278b4ed..1a12d9177d2 100644
--- a/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
@@ -68,7 +68,7 @@ static SDNode *selectImm(SelectionDAG *CurDAG, const SDLoc &DL, int64_t Imm,
RISCVMatInt::InstSeq Seq;
RISCVMatInt::generateInstSeq(Imm, XLenVT == MVT::i64, Seq);
- SDNode *Result;
+ SDNode *Result = nullptr;
SDValue SrcReg = CurDAG->getRegister(RISCV::X0, XLenVT);
for (RISCVMatInt::Inst &Inst : Seq) {
SDValue SDImm = CurDAG->getTargetConstant(Inst.Imm, DL, XLenVT);
OpenPOWER on IntegriCloud