1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs -mtriple aarch64-unknown-unknown %s -o - | FileCheck %s
4 name: shift_immed_chain_mismatch_size_crash
6 tracksRegLiveness: true
10 ; CHECK-LABEL: name: shift_immed_chain_mismatch_size_crash
12 ; CHECK: successors: %bb.1(0x40000000), %bb.2(0x40000000)
14 ; CHECK: [[DEF:%[0-9]+]]:_(s1) = G_IMPLICIT_DEF
15 ; CHECK: [[DEF1:%[0-9]+]]:_(p0) = G_IMPLICIT_DEF
16 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 9
17 ; CHECK: G_BRCOND [[DEF]](s1), %bb.2
22 ; CHECK: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[DEF1]](p0) :: (load (s32) from `ptr undef`, align 8)
23 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 4
24 ; CHECK: [[SHL:%[0-9]+]]:_(s32) = nsw G_SHL [[LOAD]], [[C1]](s32)
25 ; CHECK: [[MUL:%[0-9]+]]:_(s32) = nsw G_MUL [[SHL]], [[C]]
26 ; CHECK: [[C2:%[0-9]+]]:_(s64) = G_CONSTANT i64 2
27 ; CHECK: [[SHL1:%[0-9]+]]:_(s32) = G_SHL [[MUL]], [[C2]](s64)
28 ; CHECK: $w0 = COPY [[SHL1]](s32)
29 ; CHECK: RET_ReallyLR implicit $w0
34 %1:_(s1) = G_IMPLICIT_DEF
35 %3:_(p0) = G_IMPLICIT_DEF
36 %4:_(s32) = G_CONSTANT i32 16
37 %6:_(s32) = G_CONSTANT i32 9
38 %8:_(s32) = G_CONSTANT i32 2
39 %11:_(s64) = G_CONSTANT i64 2
40 G_BRCOND %1(s1), %bb.2
48 %2:_(s32) = G_LOAD %3(p0) :: (load (s32) from `ptr undef`, align 8)
49 %5:_(s32) = nsw G_MUL %4, %2
50 %7:_(s32) = nsw G_MUL %5, %6
51 %9:_(s32) = nsw G_MUL %7, %8
52 %10:_(s64) = G_SEXT %9(s32)
53 %12:_(s64) = G_MUL %10, %11
54 %13:_(s32) = G_TRUNC %12(s64)
56 RET_ReallyLR implicit $w0