[PATCH] D19410: [scan-build] fix logic error warnings emitted on llvm code base

Apelete Seketeli via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 08:21:16 PDT 2016


apelete added inline comments.

================
Comment at: lib/Target/AMDGPU/SIInstrInfo.cpp:1867-1870
@@ -1866,6 +1866,6 @@
 
   if (!DefinedRC) {
     // This operand expects an immediate.
     return true;
   }
 
----------------
tstellarAMD wrote:
> A better fix would be move this if block to the top of the function before the first use of DefinedRC.
This is what I wanted to do in the first place, but I wondered if doing the check and returning early would still give a correct result; I wasn't sure about the impact it would have had on the logic of the function :-).

Will fix this, thanks for your review.


http://reviews.llvm.org/D19410





More information about the llvm-commits mailing list