1 ; RUN: llc < %s | FileCheck %s
2 ; Make sure we don't crash in AArch64RedundantCopyElimination when a
3 ; MachineBasicBlock is empty. PR29035.
5 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
6 target triple = "aarch64-unknown-linux-gnu"
12 ; CHECK: mov{{.*}}, #1
17 define i1 @foo(i1 %start) {
19 br i1 %start, label %cleanup, label %if.end
21 if.end: ; preds = %if.end, %entry
22 %call = tail call i8* @bar()
23 %cmp = icmp eq i8* %call, null
24 br i1 %cmp, label %cleanup, label %if.end
26 cleanup: ; preds = %if.end, %entry
27 %retval.0 = phi i1 [ true, %entry ], [ false, %if.end ]