1 # RUN: llc -o - %s -mtriple=aarch64 -run-pass branch-folder -verify-machineinstrs | FileCheck %s
2 # Check that BranchFolding pass is able to hoist a common instruction into a block with a single branch instruction.
4 tracksRegLiveness: true
7 ; CHECK-LABEL: name: func
9 ; CHECK: $x0 = ADDXri $x0, 1, 0
10 ; CHECK: CBZX $x1, %bb.2
16 ; CHECK-NOT: $x0 = ADDXri $x0, 1, 0
18 $x0 = ADDXri $x0, 1, 0
19 $x0 = ADDXri $x0, 2, 0
20 RET_ReallyLR implicit $x0
24 ; CHECK-NOT: $x0 = ADDXri $x0, 1, 0
26 $x0 = ADDXri $x0, 1, 0
27 $x0 = ADDXri $x0, 3, 0
28 RET_ReallyLR implicit $x0