[PATCH] D66657: [CodegenPrepare] Guard against degenerate branches

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 30 12:36:38 PDT 2019


spatel added inline comments.


================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:7208-7210
+    if (TBB == FBB)
+        LLVM_DEBUG(dbgs() << "Don't split degenerate branch\n"; BB.dump());
+        continue;
----------------
Formatting is off, and how does that work in a debug build? No braces for the 'if'. Might be better to just leave out the LLVM_DEBUG line.


================
Comment at: llvm/test/CodeGen/X86/codegen-prepare-collapse.ll:1
+; RUN: llc -fast-isel=true -O1 -mtriple=x86_64-unkown-linux-gnu -start-before=codegenprepare -stop-after=codegenprepare < %s
+
----------------
Is there some way to create a test with 'opt -codegenprepare -S' rather than 'llc'? That would be preferable since the bug is not x86-specific.
If llc is the only way, then we still probably should produce some CHECK lines for FileCheck by using "utils/update_llc_test_checks.py"


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66657





More information about the llvm-commits mailing list