# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -o - -mtriple=aarch64-unknown-unknown -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs %s | FileCheck %s
...
---
name: freeze_register
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_register
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s64) = G_FREEZE [[COPY]]
; CHECK-NEXT: $x0 = COPY [[FREEZE]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%1:_(s64) = G_FREEZE %0
$x0 = COPY %1(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_constant
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_constant
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: $x0 = COPY [[C]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%1:_(s64) = G_CONSTANT i64 9
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_fconstant
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_fconstant
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_FCONSTANT double 9.000000e+00
; CHECK-NEXT: $x0 = COPY [[C]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%1:_(s64) = G_FCONSTANT double 9.0
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_undef
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_undef
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[DEF:%[0-9]+]]:_(s64) = G_IMPLICIT_DEF
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s64) = G_FREEZE [[DEF]]
; CHECK-NEXT: $x0 = COPY [[FREEZE]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%1:_(s64) = G_IMPLICIT_DEF
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_freeze
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_freeze
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x0
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s64) = G_FREEZE [[COPY]]
; CHECK-NEXT: $x0 = COPY [[FREEZE]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%1:_(s64) = G_FREEZE %0
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_buildvector
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_buildvector
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $w0
; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR [[COPY]](s32), [[COPY]](s32), [[COPY]](s32), [[COPY]](s32)
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(<4 x s32>) = G_FREEZE [[BUILD_VECTOR]]
; CHECK-NEXT: $q0 = COPY [[FREEZE]](<4 x s32>)
; CHECK-NEXT: RET_ReallyLR implicit $q0
%0:_(s32) = COPY $w0
%1:_(<4 x s32>) = G_BUILD_VECTOR %0(s32), %0(s32), %0(s32), %0(s32)
%2:_(<4 x s32>) = G_FREEZE %1
$q0 = COPY %2(<4 x s32>)
RET_ReallyLR implicit $q0
...
---
name: freeze_buildvector_const
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_buildvector_const
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %c:_(s32) = G_CONSTANT i32 6
; CHECK-NEXT: [[BUILD_VECTOR:%[0-9]+]]:_(<4 x s32>) = G_BUILD_VECTOR %c(s32), %c(s32), %c(s32), %c(s32)
; CHECK-NEXT: $q0 = COPY [[BUILD_VECTOR]](<4 x s32>)
; CHECK-NEXT: RET_ReallyLR implicit $q0
%0:_(s32) = COPY $w0
%c:_(s32) = G_CONSTANT i32 6
%1:_(<4 x s32>) = G_BUILD_VECTOR %c(s32), %c(s32), %c(s32), %c(s32)
%2:_(<4 x s32>) = G_FREEZE %1
$q0 = COPY %2(<4 x s32>)
RET_ReallyLR implicit $q0
...
---
name: freeze_disjoint_or_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_disjoint_or_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: $x0 = COPY %c(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = disjoint G_OR %c, %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_or_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_or_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: $x0 = COPY %c(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_OR %c, %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_nneg_zext_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_nneg_zext_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s32) = G_CONSTANT i32 9
; CHECK-NEXT: %c:_(s32) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT %c(s32)
; CHECK-NEXT: $x0 = COPY [[ZEXT]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s32) = G_CONSTANT i32 9
%c:_(s32) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = nneg G_ZEXT %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_zext_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_zext_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s32) = G_CONSTANT i32 9
; CHECK-NEXT: %c:_(s32) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT %c(s32)
; CHECK-NEXT: $x0 = COPY [[ZEXT]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s32) = G_CONSTANT i32 9
%c:_(s32) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_ZEXT %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_udiv_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_udiv_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[UDIV:%[0-9]+]]:_(s64) = G_UDIV %c, %c
; CHECK-NEXT: $x0 = COPY [[UDIV]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_UDIV %c, %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_exact_udiv_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_exact_udiv_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[UDIV:%[0-9]+]]:_(s64) = G_UDIV %c, %c
; CHECK-NEXT: $x0 = COPY [[UDIV]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = exact G_UDIV %c, %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_mul_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_mul_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[MUL:%[0-9]+]]:_(s64) = G_MUL %c, %c
; CHECK-NEXT: $x0 = COPY [[MUL]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_MUL %c, %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_nsw_mul_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_nsw_mul_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[MUL:%[0-9]+]]:_(s64) = G_MUL %c, %c
; CHECK-NEXT: $x0 = COPY [[MUL]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = nsw G_MUL %c, %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_trunc_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_trunc_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC %c(s64)
; CHECK-NEXT: $w0 = COPY [[TRUNC]](s32)
; CHECK-NEXT: RET_ReallyLR implicit $q0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s32) = G_TRUNC %c
%2:_(s32) = G_FREEZE %1
$w0 = COPY %2(s32)
RET_ReallyLR implicit $q0
...
---
name: freeze_nuw_trunc_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_nuw_trunc_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC %c(s64)
; CHECK-NEXT: $w0 = COPY [[TRUNC]](s32)
; CHECK-NEXT: RET_ReallyLR implicit $q0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s32) = nuw G_TRUNC %c
%2:_(s32) = G_FREEZE %1
$w0 = COPY %2(s32)
RET_ReallyLR implicit $q0
...
---
name: freeze_add_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_add_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s64) = G_ADD %c, %c
; CHECK-NEXT: $x0 = COPY [[ADD]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_ADD %c, %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_nuw_add_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_nuw_add_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s64) = G_ADD %c, %c
; CHECK-NEXT: $x0 = COPY [[ADD]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = nuw G_ADD %c, %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_xor_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_xor_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR %c, %c
; CHECK-NEXT: $x0 = COPY [[XOR]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_XOR %c, %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_fptosi_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_fptosi_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[FPTOSI:%[0-9]+]]:_(s64) = G_FPTOSI %c(s64)
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s64) = G_FREEZE [[FPTOSI]]
; CHECK-NEXT: $x0 = COPY [[FREEZE]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_FPTOSI %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_fptoui_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_fptoui_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[FPTOUI:%[0-9]+]]:_(s64) = G_FPTOUI %c(s64)
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s64) = G_FREEZE [[FPTOUI]]
; CHECK-NEXT: $x0 = COPY [[FREEZE]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_FPTOUI %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_shl_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_shl_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s64) = G_SHL %c, %c(s64)
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s64) = G_FREEZE [[SHL]]
; CHECK-NEXT: $x0 = COPY [[FREEZE]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_SHL %c, %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_ashr_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_ashr_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[ASHR:%[0-9]+]]:_(s64) = G_ASHR %c, %c(s64)
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s64) = G_FREEZE [[ASHR]]
; CHECK-NEXT: $x0 = COPY [[FREEZE]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_ASHR %c, %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_lshr_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_lshr_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s64) = G_LSHR %c, %c(s64)
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s64) = G_FREEZE [[LSHR]]
; CHECK-NEXT: $x0 = COPY [[FREEZE]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_LSHR %c, %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_ctlz_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_ctlz_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[CTLZ:%[0-9]+]]:_(s64) = G_CTLZ %c(s64)
; CHECK-NEXT: $x0 = COPY [[CTLZ]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_CTLZ %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_cttz_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_cttz_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[CTTZ:%[0-9]+]]:_(s64) = G_CTTZ %c(s64)
; CHECK-NEXT: $x0 = COPY [[CTTZ]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_CTTZ %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_abs_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_abs_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[ABS:%[0-9]+]]:_(s64) = G_ABS %c
; CHECK-NEXT: $x0 = COPY [[ABS]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_ABS %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_bswap_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_bswap_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[BSWAP:%[0-9]+]]:_(s64) = G_BSWAP %c
; CHECK-NEXT: $x0 = COPY [[BSWAP]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_BSWAP %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_bitreverse_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_bitreverse_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[BITREVERSE:%[0-9]+]]:_(s64) = G_BITREVERSE %c
; CHECK-NEXT: $x0 = COPY [[BITREVERSE]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_BITREVERSE %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_icmp_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_icmp_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %cmp:_(s1) = G_ICMP intpred(eq), %c(s64), %d
; CHECK-NEXT: %ext:_(s64) = G_ZEXT %cmp(s1)
; CHECK-NEXT: $x0 = COPY %ext(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%cmp:_(s1) = G_ICMP intpred(eq), %c(s64), %d
%2:_(s1) = G_FREEZE %cmp
%ext:_(s64) = G_ZEXT %2(s1)
$x0 = COPY %ext(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_fcmp_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_fcmp_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %cmp:_(s1) = G_FCMP floatpred(oeq), %c(s64), %d
; CHECK-NEXT: %ext:_(s64) = G_ZEXT %cmp(s1)
; CHECK-NEXT: $x0 = COPY %ext(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%cmp:_(s1) = G_FCMP floatpred(oeq), %c(s64), %d
%2:_(s1) = G_FREEZE %cmp
%ext:_(s64) = G_ZEXT %2(s1)
$x0 = COPY %ext(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_fshl_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_fshl_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[ROTL:%[0-9]+]]:_(s64) = G_ROTL %c, %c(s64)
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s64) = G_FREEZE [[ROTL]]
; CHECK-NEXT: $x0 = COPY [[FREEZE]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_FSHL %c, %c, %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_fshr_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_fshr_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[ROTR:%[0-9]+]]:_(s64) = G_ROTR %c, %c(s64)
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s64) = G_FREEZE [[ROTR]]
; CHECK-NEXT: $x0 = COPY [[FREEZE]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_FSHR %c, %c, %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_smax_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_smax_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[SMAX:%[0-9]+]]:_(s64) = G_SMAX %c, %d
; CHECK-NEXT: $x0 = COPY [[SMAX]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_SMAX %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_smin_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_smin_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[SMIN:%[0-9]+]]:_(s64) = G_SMIN %c, %d
; CHECK-NEXT: $x0 = COPY [[SMIN]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_SMIN %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_umax_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_umax_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[UMAX:%[0-9]+]]:_(s64) = G_UMAX %c, %d
; CHECK-NEXT: $x0 = COPY [[UMAX]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_UMAX %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_umin_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_umin_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[UMIN:%[0-9]+]]:_(s64) = G_UMIN %c, %d
; CHECK-NEXT: $x0 = COPY [[UMIN]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_UMIN %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_ptrmask_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_ptrmask_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %p:_(p0) = COPY $x0
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(p0) = G_FREEZE %p
; CHECK-NEXT: [[PTRMASK:%[0-9]+]]:_(p0) = G_PTRMASK [[FREEZE]], %cst(s64)
; CHECK-NEXT: $x0 = COPY [[PTRMASK]](p0)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%p:_(p0) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(p0) = G_PTRMASK %p, %cst
%2:_(p0) = G_FREEZE %1
$x0 = COPY %2(p0)
RET_ReallyLR implicit $x0
...
---
name: freeze_saddo_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_saddo_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s64) = G_ADD %c, %d
; CHECK-NEXT: $x0 = COPY [[ADD]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64), %o:_(s1) = G_SADDO %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_ssubo_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_ssubo_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %4:_(s64), %o:_(s1) = G_SSUBO %c, %d
; CHECK-NEXT: $x0 = COPY %4(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64), %o:_(s1) = G_SSUBO %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_uaddo_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_uaddo_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s64) = G_ADD %c, %d
; CHECK-NEXT: $x0 = COPY [[ADD]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64), %o:_(s1) = G_UADDO %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_usubo_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_usubo_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %4:_(s64), %o:_(s1) = G_USUBO %c, %d
; CHECK-NEXT: $x0 = COPY %4(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64), %o:_(s1) = G_USUBO %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_smulo_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_smulo_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %4:_(s64), %o:_(s1) = G_SMULO %c, %d
; CHECK-NEXT: $x0 = COPY %4(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64), %o:_(s1) = G_SMULO %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_umulo_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_umulo_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %4:_(s64), %o:_(s1) = G_UMULO %c, %d
; CHECK-NEXT: $x0 = COPY %4(s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64), %o:_(s1) = G_UMULO %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_saddsat_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_saddsat_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[SADDSAT:%[0-9]+]]:_(s64) = G_SADDSAT %c, %d
; CHECK-NEXT: $x0 = COPY [[SADDSAT]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_SADDSAT %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_uaddsat_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_uaddsat_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[UADDSAT:%[0-9]+]]:_(s64) = G_UADDSAT %c, %d
; CHECK-NEXT: $x0 = COPY [[UADDSAT]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_UADDSAT %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_ssubsat_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_ssubsat_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[SSUBSAT:%[0-9]+]]:_(s64) = G_SSUBSAT %c, %d
; CHECK-NEXT: $x0 = COPY [[SSUBSAT]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_SSUBSAT %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_usubsat_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_usubsat_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[USUBSAT:%[0-9]+]]:_(s64) = G_USUBSAT %c, %d
; CHECK-NEXT: $x0 = COPY [[USUBSAT]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_USUBSAT %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_sshlsat_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_sshlsat_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[SSHLSAT:%[0-9]+]]:_(s64) = G_SSHLSAT %c, %d(s64)
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s64) = G_FREEZE [[SSHLSAT]]
; CHECK-NEXT: $x0 = COPY [[FREEZE]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_SSHLSAT %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_ushlsat_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_ushlsat_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[USHLSAT:%[0-9]+]]:_(s64) = G_USHLSAT %c, %d(s64)
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s64) = G_FREEZE [[USHLSAT]]
; CHECK-NEXT: $x0 = COPY [[FREEZE]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_USHLSAT %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_fneg_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_fneg_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_FCONSTANT double 0.000000e+00
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[FNEG:%[0-9]+]]:_(s64) = G_FNEG %c
; CHECK-NEXT: $x0 = COPY [[FNEG]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_FCONSTANT double 0.0
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_FNEG %c
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_frem_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_frem_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_FCONSTANT double 0.000000e+00
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[FREM:%[0-9]+]]:_(s64) = G_FREM %c, %d
; CHECK-NEXT: $x0 = COPY [[FREM]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_FCONSTANT double 0.0
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_FREM %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_fdiv_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_fdiv_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_FCONSTANT double 0.000000e+00
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[FDIV:%[0-9]+]]:_(s64) = G_FDIV %c, %d
; CHECK-NEXT: $x0 = COPY [[FDIV]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_FCONSTANT double 0.0
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_FDIV %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_fmul_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_fmul_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_FCONSTANT double 0.000000e+00
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[FMUL:%[0-9]+]]:_(s64) = G_FMUL %c, %d
; CHECK-NEXT: $x0 = COPY [[FMUL]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_FCONSTANT double 0.0
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_FMUL %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_fsub_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_fsub_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_FCONSTANT double 0.000000e+00
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[FSUB:%[0-9]+]]:_(s64) = G_FSUB %c, %d
; CHECK-NEXT: $x0 = COPY [[FSUB]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_FCONSTANT double 0.0
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_FSUB %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_fadd_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_fadd_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_FCONSTANT double 0.000000e+00
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[FADD:%[0-9]+]]:_(s64) = G_FADD %c, %d
; CHECK-NEXT: $x0 = COPY [[FADD]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_FCONSTANT double 0.0
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_FADD %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_urem_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_urem_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[UREM:%[0-9]+]]:_(s64) = G_UREM %c, %d
; CHECK-NEXT: $x0 = COPY [[UREM]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_UREM %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_srem_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_srem_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: %c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: %d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
; CHECK-NEXT: [[SREM:%[0-9]+]]:_(s64) = G_SREM %c, %d
; CHECK-NEXT: $x0 = COPY [[SREM]](s64)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(s64) = G_SREM %c, %d
%2:_(s64) = G_FREEZE %1
$x0 = COPY %2(s64)
RET_ReallyLR implicit $x0
...
---
name: freeze_ptradd_fold_barrier
body: |
bb.1:
liveins: $w0
; CHECK-LABEL: name: freeze_ptradd_fold_barrier
; CHECK: liveins: $w0
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %p:_(p0) = COPY $x0
; CHECK-NEXT: %cst:_(s64) = G_CONSTANT i64 9
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(p0) = G_FREEZE %p
; CHECK-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[FREEZE]], %cst(s64)
; CHECK-NEXT: $x0 = COPY [[PTR_ADD]](p0)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%0:_(s64) = COPY $x0
%p:_(p0) = COPY $x0
%cst:_(s64) = G_CONSTANT i64 9
%c:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%d:_(s64) = G_CONSTANT_FOLD_BARRIER %cst
%1:_(p0) = G_PTR_ADD %p, %cst
%2:_(p0) = G_FREEZE %1
$x0 = COPY %2(p0)
RET_ReallyLR implicit $x0
...
---
# select (false, x, y) -> y
name: freeze_select_fold_barrier
body: |
bb.1:
liveins: $x0, $x1
; CHECK-LABEL: name: freeze_select_fold_barrier
; CHECK: liveins: $x0, $x1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $x1
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s64) = G_FREEZE [[COPY]]
; CHECK-NEXT: $x0 = COPY [[FREEZE]](s64)
%0:_(s64) = COPY $x0
%1:_(s64) = COPY $x1
%2:_(s1) = G_CONSTANT i1 false
%3:_(s64) = G_SELECT %2, %0, %1
%4:_(s64) = G_FREEZE %3
$x0 = COPY %4(s64)
...
---
name: freeze_extract_and_shuffle_vector_fold_barrier
body: |
bb.1:
liveins: $x0, $x1
; CHECK-LABEL: name: freeze_extract_and_shuffle_vector_fold_barrier
; CHECK: liveins: $x0, $x1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %arg1:_(<4 x s32>) = COPY $q0
; CHECK-NEXT: %arg2:_(<4 x s32>) = COPY $q1
; CHECK-NEXT: %idx:_(s64) = G_CONSTANT i64 0
; CHECK-NEXT: %sv:_(<4 x s32>) = G_SHUFFLE_VECTOR %arg1(<4 x s32>), %arg2, shufflemask(3, 0, 0, 0)
; CHECK-NEXT: %freeze_sv:_(<4 x s32>) = G_FREEZE %sv
; CHECK-NEXT: %extract:_(s32) = G_EXTRACT_VECTOR_ELT %freeze_sv(<4 x s32>), %idx(s64)
; CHECK-NEXT: $w0 = COPY %extract(s32)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%arg1:_(<4 x s32>) = COPY $q0
%arg2:_(<4 x s32>) = COPY $q1
%idx:_(s64) = G_CONSTANT i64 0
%sv:_(<4 x s32>) = G_SHUFFLE_VECTOR %arg1(<4 x s32>), %arg2(<4 x s32>), shufflemask(3, 0, 0, 0)
%freeze_sv:_(<4 x s32>) = G_FREEZE %sv
%extract:_(s32) = G_EXTRACT_VECTOR_ELT %freeze_sv(<4 x s32>), %idx(s64)
%freeze:_(s32) = G_FREEZE %extract
$w0 = COPY %extract(s32)
RET_ReallyLR implicit $x0
...
---
name: freeze_insert_and_shuffle_vector_fold_barrier
body: |
bb.1:
liveins: $x0, $x1
; CHECK-LABEL: name: freeze_insert_and_shuffle_vector_fold_barrier
; CHECK: liveins: $x0, $x1
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: %elt:_(s32) = COPY $w0
; CHECK-NEXT: %arg1:_(<4 x s32>) = COPY $q0
; CHECK-NEXT: %arg2:_(<4 x s32>) = COPY $q1
; CHECK-NEXT: %idx:_(s64) = G_CONSTANT i64 0
; CHECK-NEXT: %sv:_(<4 x s32>) = G_SHUFFLE_VECTOR %arg1(<4 x s32>), %arg2, shufflemask(3, 0, 0, 0)
; CHECK-NEXT: %freeze_sv:_(<4 x s32>) = G_FREEZE %sv
; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s32) = G_FREEZE %elt
; CHECK-NEXT: %extract:_(<4 x s32>) = G_INSERT_VECTOR_ELT %freeze_sv, [[FREEZE]](s32), %idx(s64)
; CHECK-NEXT: $q0 = COPY %extract(<4 x s32>)
; CHECK-NEXT: RET_ReallyLR implicit $x0
%elt:_(s32) = COPY $w0
%arg1:_(<4 x s32>) = COPY $q0
%arg2:_(<4 x s32>) = COPY $q1
%idx:_(s64) = G_CONSTANT i64 0
%sv:_(<4 x s32>) = G_SHUFFLE_VECTOR %arg1(<4 x s32>), %arg2(<4 x s32>), shufflemask(3, 0, 0, 0)
%freeze_sv:_(<4 x s32>) = G_FREEZE %sv
%extract:_(<4 x s32>) = G_INSERT_VECTOR_ELT %freeze_sv(<4 x s32>), %elt(s32), %idx(s64)
%freeze:_(<4 x s32>) = G_FREEZE %extract
$q0 = COPY %freeze(<4 x s32>)
RET_ReallyLR implicit $x0