[RegisterCoalescer] fix potential use of undef value. NFC
authorNick Desaulniers <ndesaulniers@google.com>
Fri, 31 May 2019 21:20:13 +0000 (21:20 +0000)
committerNick Desaulniers <ndesaulniers@google.com>
Fri, 31 May 2019 21:20:13 +0000 (21:20 +0000)
commit103bd108a71ccf40434b678534c837cbfe43319e
tree9a1a87f417d2280af351e046fe8da9164c422ad1
parente98cf5fe47f2585363588d7cdd19c5bfe57f2c13
[RegisterCoalescer] fix potential use of undef value. NFC

Summary:
Fixes a warning produced from scan-build (llvm.org/reports/scan-build/),
further warnings found by annotation isMoveInstr [[nodiscard]].

isMoveInstr potentially does not assign to its parameters, so if they
were uninitialized, they will potentially stay uninitialized.  It seems
most call sites pass references to uninitialized values, then use them
without checking the return value.

Reviewers: wmi

Reviewed By: wmi

Subscribers: MatzeB, qcolombet, hiraditya, tpr, llvm-commits, srhines

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62109

llvm-svn: 362265
llvm/lib/CodeGen/RegisterCoalescer.cpp