[PATCH] Refactor: Simplify boolean expressions in R600 target

Richard legalize at xmission.com
Sun Mar 22 12:46:13 PDT 2015


Hi alexfh, tstellarAMD, arsenm, vljn,

Simplify boolean expressions with `true` and `false` using `clang-tidy`

http://reviews.llvm.org/D8520

Files:
  lib/Target/R600/AMDILCFGStructurizer.cpp

Index: lib/Target/R600/AMDILCFGStructurizer.cpp
===================================================================
--- lib/Target/R600/AMDILCFGStructurizer.cpp
+++ lib/Target/R600/AMDILCFGStructurizer.cpp
@@ -624,7 +624,7 @@
   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;
@@ -1612,7 +1612,7 @@
 
     bool UseContinueLogical = ((&*ContingMBB->rbegin()) == MI);
 
-    if (UseContinueLogical == false) {
+    if (!UseContinueLogical) {
       int BranchOpcode =
           TrueBranch == ContMBB ? getBranchNzeroOpcode(OldOpcode) :
           getBranchZeroOpcode(OldOpcode);

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8520.22428.patch
Type: text/x-patch
Size: 799 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150322/a03d42bf/attachment.bin>


More information about the llvm-commits mailing list