[PATCH] D104623: [X86] Update MachineLoopInfo in CMOV conversion.

Wang Tianqing via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 21 23:47:13 PDT 2021


tianqing added inline comments.


================
Comment at: llvm/lib/Target/X86/X86CmovConversion.cpp:854
+  // Add new basic blocks to MachineLoopInfo.
+  if (MachineLoop *L = MLI->getLoopFor(MBB)) {
+    L->addBasicBlockToLoop(FalseMBB, MLI->getBase());
----------------
pengfei wrote:
> Is it possible the MBB is in more than one loop, e.g. nested?
addBasicBlockToLoop() already handles nested loop.


================
Comment at: llvm/test/CodeGen/X86/x86-cmov-converter.ll:494
+entry:
+; CHECK-NOT: cmov
+  %begin = load i32*, i32** @begin, align 8
----------------
pengfei wrote:
> xbolva00 wrote:
> > Full checks? Use script to generate checks
> Maybe you can commit the test first, then show the diff in this patch.
See D104692.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D104623



More information about the llvm-commits mailing list