mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
ea5a6285ae
This is generally more readable due to the way the assembler aliases work. (This causes a lot of test changes, but it's not really as scary as it looks at first glance; it's just mechanically changing a bunch of checks for orr to check for mov instead.) Differential Revision: https://reviews.llvm.org/D59720 llvm-svn: 356954
30 lines
814 B
LLVM
30 lines
814 B
LLVM
; RUN: llc < %s | FileCheck %s
|
|
; Make sure we don't crash in AArch64RedundantCopyElimination when a
|
|
; MachineBasicBlock is empty. PR29035.
|
|
|
|
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
|
|
target triple = "aarch64-unknown-linux-gnu"
|
|
|
|
declare i8* @bar()
|
|
|
|
; CHECK-LABEL: foo:
|
|
; CHECK: tbz
|
|
; CHECK: mov{{.*}}, #1
|
|
; CHECK: ret
|
|
; CHECK: bl bar
|
|
; CHECK: cbnz
|
|
; CHECK: ret
|
|
define i1 @foo(i1 %start) {
|
|
entry:
|
|
br i1 %start, label %cleanup, label %if.end
|
|
|
|
if.end: ; preds = %if.end, %entry
|
|
%call = tail call i8* @bar()
|
|
%cmp = icmp eq i8* %call, null
|
|
br i1 %cmp, label %cleanup, label %if.end
|
|
|
|
cleanup: ; preds = %if.end, %entry
|
|
%retval.0 = phi i1 [ true, %entry ], [ false, %if.end ]
|
|
ret i1 %retval.0
|
|
}
|