1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
2 # RUN: llc -mtriple aarch64 -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s
5 tracksRegLiveness: true
10 ; CHECK-LABEL: name: cfb_lhs
13 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
14 ; CHECK-NEXT: %cst:_(s32) = G_CONSTANT i32 1
15 ; CHECK-NEXT: %cfb:_(s32) = G_CONSTANT_FOLD_BARRIER %cst
16 ; CHECK-NEXT: %add:_(s32) = G_ADD [[COPY]], %cfb
17 ; CHECK-NEXT: $w0 = COPY %add(s32)
18 ; CHECK-NEXT: RET_ReallyLR
20 %cst:_(s32) = G_CONSTANT i32 1
21 %cfb:_(s32) = G_CONSTANT_FOLD_BARRIER %cst
22 %cst2:_(s32) = G_CONSTANT i32 2
23 %add:_(s32) = G_ADD %cfb, %0
29 name: cfb_lhs_cfb_already_rhs
30 tracksRegLiveness: true
35 ; CHECK-LABEL: name: cfb_lhs_cfb_already_rhs
38 ; CHECK-NEXT: %cst:_(s32) = G_CONSTANT i32 1
39 ; CHECK-NEXT: %cfb:_(s32) = G_CONSTANT_FOLD_BARRIER %cst
40 ; CHECK-NEXT: %cst2:_(s32) = G_CONSTANT i32 2
41 ; CHECK-NEXT: %cfb2:_(s32) = G_CONSTANT_FOLD_BARRIER %cst2
42 ; CHECK-NEXT: %add:_(s32) = G_ADD %cfb, %cfb2
43 ; CHECK-NEXT: $w0 = COPY %add(s32)
44 ; CHECK-NEXT: RET_ReallyLR
46 %cst:_(s32) = G_CONSTANT i32 1
47 %cfb:_(s32) = G_CONSTANT_FOLD_BARRIER %cst
48 %cst2:_(s32) = G_CONSTANT i32 2
49 %cfb2:_(s32) = G_CONSTANT_FOLD_BARRIER %cst2
50 %add:_(s32) = G_ADD %cfb, %cfb2
56 name: cfb_lhs_cst_on_rhs
58 tracksRegLiveness: true
63 ; CHECK-LABEL: name: cfb_lhs_cst_on_rhs
66 ; CHECK-NEXT: %cst:_(s32) = G_CONSTANT i32 1
67 ; CHECK-NEXT: %cfb:_(s32) = G_CONSTANT_FOLD_BARRIER %cst
68 ; CHECK-NEXT: %cst2:_(s32) = G_CONSTANT i32 2
69 ; CHECK-NEXT: %add:_(s32) = G_ADD %cfb, %cst2
70 ; CHECK-NEXT: $w0 = COPY %add(s32)
71 ; CHECK-NEXT: RET_ReallyLR
73 %cst:_(s32) = G_CONSTANT i32 1
74 %cfb:_(s32) = G_CONSTANT_FOLD_BARRIER %cst
75 %cst2:_(s32) = G_CONSTANT i32 2
76 %add:_(s32) = G_ADD %cfb, %cst2