[PATCH] D23380: AArch64: Assert on analyzeBranch failing

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 15:20:54 PDT 2016


arsenm created this revision.
arsenm added a subscriber: llvm-commits.
Herald added subscribers: rengolin, aemerson.

https://reviews.llvm.org/D23380

Files:
  lib/Target/AArch64/AArch64BranchRelaxation.cpp

Index: lib/Target/AArch64/AArch64BranchRelaxation.cpp
===================================================================
--- lib/Target/AArch64/AArch64BranchRelaxation.cpp
+++ lib/Target/AArch64/AArch64BranchRelaxation.cpp
@@ -426,7 +426,9 @@
     // Analyze the branch so we know how to update the successor lists.
     MachineBasicBlock *TBB, *FBB;
     SmallVector<MachineOperand, 2> Cond;
-    TII->analyzeBranch(*MBB, TBB, FBB, Cond, false);
+    bool Fail = TII->analyzeBranch(*MBB, TBB, FBB, Cond, false);
+    assert(!Fail && "branches to relax should be analyzable");
+    (void)Fail;
 
     MachineBasicBlock *NewBB = splitBlockBeforeInstr(MI);
     // No need for the branch to the next block. We're adding an unconditional


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23380.67619.patch
Type: text/x-patch
Size: 736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160810/039d2f5a/attachment.bin>


More information about the llvm-commits mailing list