[PATCH] D42655: [LivePhysRegs] Fix handling of conditional return instructions.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 12:24:54 PST 2018


efriedma created this revision.
efriedma added reviewers: RKSimon, MatzeB.
Herald added a subscriber: javed.absar.

Fixes EXPENSIVE_CHECKS regression from r323559.


Repository:
  rL LLVM

https://reviews.llvm.org/D42655

Files:
  lib/CodeGen/LivePhysRegs.cpp
  test/CodeGen/ARM/pr25838.ll


Index: test/CodeGen/ARM/pr25838.ll
===================================================================
--- test/CodeGen/ARM/pr25838.ll
+++ test/CodeGen/ARM/pr25838.ll
@@ -1,4 +1,4 @@
-; RUN: llc < %s
+; RUN: llc -verify-machineinstrs < %s
 ; PR25838
 
 target triple = "armv7--linux-android"
Index: lib/CodeGen/LivePhysRegs.cpp
===================================================================
--- lib/CodeGen/LivePhysRegs.cpp
+++ lib/CodeGen/LivePhysRegs.cpp
@@ -225,7 +225,7 @@
 
 void LivePhysRegs::addLiveOuts(const MachineBasicBlock &MBB) {
   const MachineFunction &MF = *MBB.getParent();
-  if (!MBB.isReturnBlock()) {
+  if (!MBB.isReturnBlock() || !MBB.succ_empty()) {
     addPristines(MF);
     addLiveOutsNoPristines(MBB);
   } else {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42655.131848.patch
Type: text/x-patch
Size: 749 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180129/24883e31/attachment.bin>


More information about the llvm-commits mailing list