31 lines · plain
1# RUN: llc -o - %s -mtriple=aarch64 -run-pass branch-folder -verify-machineinstrs | FileCheck %s2# RUN: llc -o - %s -mtriple=aarch64 -passes="require<profile-summary>,function(machine-function(branch-folder<enable-tail-merge>))" -verify-machineinstrs | FileCheck %s3# Check that BranchFolding pass is able to hoist a common instruction into a block with a single branch instruction.4name: func5tracksRegLiveness: true6body: |7 bb.0:8 ; CHECK-LABEL: name: func9 ; CHECK-LABEL: bb.0:10 ; CHECK: $x0 = ADDXri $x0, 1, 011 ; CHECK: CBZX $x1, %bb.212 liveins: $x0, $x113 CBZX $x1, %bb.214 15 bb.1:16 ; CHECK-LABEL: bb.1:17 ; CHECK-NOT: $x0 = ADDXri $x0, 1, 018 liveins: $x019 $x0 = ADDXri $x0, 1, 020 $x0 = ADDXri $x0, 2, 021 RET_ReallyLR implicit $x022 23 bb.2:24 ; CHECK-LABEL: bb.2:25 ; CHECK-NOT: $x0 = ADDXri $x0, 1, 026 liveins: $x027 $x0 = ADDXri $x0, 1, 028 $x0 = ADDXri $x0, 3, 029 RET_ReallyLR implicit $x030...31