diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 10:51:19 +0000 |
| commit | eb11fae6d08f479c0799db45860a98af528fa6e7 (patch) | |
| tree | 44d492a50c8c1a7eb8e2d17ea3360ec4d066f042 /test/CodeGen/AArch64/branch-folder-oneinst.mir | |
| parent | b8a2042aa938069e862750553db0e4d82d25822c (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/AArch64/branch-folder-oneinst.mir')
| -rw-r--r-- | test/CodeGen/AArch64/branch-folder-oneinst.mir | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGen/AArch64/branch-folder-oneinst.mir b/test/CodeGen/AArch64/branch-folder-oneinst.mir new file mode 100644 index 000000000000..cfb6da3e9ae7 --- /dev/null +++ b/test/CodeGen/AArch64/branch-folder-oneinst.mir @@ -0,0 +1,29 @@ +# RUN: llc -o - %s -mtriple=aarch64 -run-pass branch-folder -verify-machineinstrs | FileCheck %s +# Check that BranchFolding pass is able to hoist a common instruction into a block with a single branch instruction. +name: func +tracksRegLiveness: true +body: | + bb.0: + ; CHECK-LABEL: name: func + ; CHECK-LABEL: bb.0: + ; CHECK: $x0 = ADDXri $x0, 1, 0 + ; CHECK: CBZX $x1, %bb.2 + liveins: $x0, $x1 + CBZX $x1, %bb.2 + + bb.1: + ; CHECK-LABEL: bb.1: + ; CHECK-NOT: $x0 = ADDXri $x0, 1, 0 + liveins: $x0 + $x0 = ADDXri $x0, 1, 0 + $x0 = ADDXri $x0, 2, 0 + RET_ReallyLR implicit $x0 + + bb.2: + ; CHECK-LABEL: bb.2: + ; CHECK-NOT: $x0 = ADDXri $x0, 1, 0 + liveins: $x0 + $x0 = ADDXri $x0, 1, 0 + $x0 = ADDXri $x0, 3, 0 + RET_ReallyLR implicit $x0 +... |
