1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=m68k -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s
4 name: test_scalar_small
6 - { id: 0, type: default, offset: 4, size: 1, alignment: 4, stack-id: default,
7 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
8 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
9 - { id: 1, type: default, offset: 0, size: 1, alignment: 8, stack-id: default,
10 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
11 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
14 ; CHECK-LABEL: name: test_scalar_small
15 ; CHECK: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0
16 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s8) from %fixed-stack.0, align 8)
17 ; CHECK-NEXT: [[FRAME_INDEX1:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.1
18 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX1]](p0) :: (load (s8) from %fixed-stack.1, align 4)
19 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[LOAD]](s32)
20 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[LOAD1]](s32)
21 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s8) = G_ADD [[TRUNC]], [[TRUNC1]]
22 ; CHECK-NEXT: $bd0 = COPY [[ADD]](s8)
23 ; CHECK-NEXT: RTS implicit $bd0
24 %3:_(p0) = G_FRAME_INDEX %fixed-stack.1
25 %2:_(s32) = G_LOAD %3(p0) :: (load (s8) from %fixed-stack.1, align 8)
26 %0:_(s1) = G_TRUNC %2(s32)
27 %5:_(p0) = G_FRAME_INDEX %fixed-stack.0
28 %4:_(s32) = G_LOAD %5(p0) :: (load (s8) from %fixed-stack.0, align 4)
29 %1:_(s1) = G_TRUNC %4(s32)
30 %6:_(s1) = G_ADD %0, %1
31 %7:_(s8) = G_ANYEXT %6(s1)
37 name: test_scalar_nonpow2
39 - { id: 0, type: default, offset: 4, size: 4, alignment: 4, stack-id: default,
40 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
41 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
42 - { id: 1, type: default, offset: 0, size: 4, alignment: 8, stack-id: default,
43 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
44 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
47 ; CHECK-LABEL: name: test_scalar_nonpow2
48 ; CHECK: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0
49 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s32) from %fixed-stack.0, align 8)
50 ; CHECK-NEXT: [[FRAME_INDEX1:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.1
51 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX1]](p0) :: (load (s32) from %fixed-stack.1)
52 ; CHECK-NEXT: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[LOAD]], [[LOAD1]]
53 ; CHECK-NEXT: $d0 = COPY [[ADD]](s32)
54 ; CHECK-NEXT: RTS implicit $d0
55 %3:_(p0) = G_FRAME_INDEX %fixed-stack.1
56 %2:_(s32) = G_LOAD %3(p0) :: (load (s32) from %fixed-stack.1, align 8)
57 %0:_(s17) = G_TRUNC %2(s32)
58 %5:_(p0) = G_FRAME_INDEX %fixed-stack.0
59 %4:_(s32) = G_LOAD %5(p0) :: (load (s32) from %fixed-stack.0)
60 %1:_(s17) = G_TRUNC %4(s32)
61 %6:_(s17) = G_ADD %0, %1
62 %7:_(s32) = G_ANYEXT %6(s17)