Refactor: Simplify boolean expressions in R600 target
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 23 Mar 2015 20:56:44 +0000 (20:56 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 23 Mar 2015 20:56:44 +0000 (20:56 +0000)
Simplify boolean expressions with `true` and `false` using `clang-tidy`

Patch by Richard Thomson.

Differential Revision: http://reviews.llvm.org/D8520

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233020 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/AMDILCFGStructurizer.cpp

index 36b4d24f9ea864e670af7c49c3f69cfdac5cbae1..ee6551b6231c71ad03a9aadb16f164a77e4ffc62 100644 (file)
@@ -623,7 +623,7 @@ DebugLoc AMDGPUCFGStructurizer::getLastDebugLocInBB(MachineBasicBlock *MBB) {
   for (MachineBasicBlock::iterator It = MBB->begin(); It != MBB->end();
       ++It) {
     MachineInstr *instr = &(*It);
-    if (instr->getDebugLoc().isUnknown() == false)
+    if (!instr->getDebugLoc().isUnknown())
       DL = instr->getDebugLoc();
   }
   return DL;
@@ -1611,7 +1611,7 @@ void AMDGPUCFGStructurizer::settleLoopcontBlock(MachineBasicBlock *ContingMBB,
 
     bool UseContinueLogical = ((&*ContingMBB->rbegin()) == MI);
 
-    if (UseContinueLogical == false) {
+    if (!UseContinueLogical) {
       int BranchOpcode =
           TrueBranch == ContMBB ? getBranchNzeroOpcode(OldOpcode) :
           getBranchZeroOpcode(OldOpcode);