[PATCH] D148610: Clean come dead code

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 01:40:07 PDT 2023


skan added inline comments.


================
Comment at: llvm/lib/CodeGen/IfConversion.cpp:535
         if (DisableTriangleF && isFalse && !isRev) break;
-        if (DisableTriangleFR && isFalse && isRev) break;
         LLVM_DEBUG(dbgs() << "Ifcvt (Triangle");
----------------
XinWang10 wrote:
> XinWang10 wrote:
> > craig.topper wrote:
> > > skan wrote:
> > > > Should we add an assertion `!(isFalse && isRev)` here?
> > > Does this mean DisableTriangleFR is also dead?
> > No, DisableTriangleFR is a option specified by user. Perhaps we'd better just remove isFalse && isRev.
> add an assertion !(isFalse && isRev), I think it doesn't make sense here, just add another dead code?
I believe assertion is ignored for dead code.  But I agree with you, the assertion is useless here b/c the definitions of `isRev` and 'isFalse' are nearby。


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148610/new/

https://reviews.llvm.org/D148610



More information about the llvm-commits mailing list