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
5 name: test_scalar_and_small
7 - { id: 0, type: default, offset: 4, size: 1, alignment: 4, stack-id: default,
8 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
9 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
10 - { id: 1, type: default, offset: 0, size: 1, alignment: 8, stack-id: default,
11 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
12 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
15 ; CHECK-LABEL: name: test_scalar_and_small
16 ; CHECK: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0
17 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s8) from %fixed-stack.0, align 8)
18 ; CHECK-NEXT: [[FRAME_INDEX1:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.1
19 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX1]](p0) :: (load (s8) from %fixed-stack.1, align 4)
20 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s8) = G_TRUNC [[LOAD]](s32)
21 ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s8) = G_TRUNC [[LOAD1]](s32)
22 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s8) = G_AND [[TRUNC]], [[TRUNC1]]
23 ; CHECK-NEXT: $bd0 = COPY [[AND]](s8)
24 ; CHECK-NEXT: RTS implicit $bd0
25 %3:_(p0) = G_FRAME_INDEX %fixed-stack.1
26 %2:_(s32) = G_LOAD %3(p0) :: (load (s8) from %fixed-stack.1, align 8)
27 %0:_(s2) = G_TRUNC %2(s32)
28 %5:_(p0) = G_FRAME_INDEX %fixed-stack.0
29 %4:_(s32) = G_LOAD %5(p0) :: (load (s8) from %fixed-stack.0, align 4)
30 %1:_(s2) = G_TRUNC %4(s32)
31 %6:_(s2) = G_AND %0, %1
32 %7:_(s8) = G_ANYEXT %6(s2)
38 name: test_scalar_nonpow2
40 - { id: 0, type: default, offset: 4, size: 4, alignment: 4, stack-id: default,
41 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
42 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
43 - { id: 1, type: default, offset: 0, size: 4, alignment: 8, stack-id: default,
44 isImmutable: true, isAliased: false, callee-saved-register: '', callee-saved-restored: true,
45 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' }
48 ; CHECK-LABEL: name: test_scalar_nonpow2
49 ; CHECK: [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.0
50 ; CHECK-NEXT: [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s32) from %fixed-stack.0, align 8)
51 ; CHECK-NEXT: [[FRAME_INDEX1:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.1
52 ; CHECK-NEXT: [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX1]](p0) :: (load (s32) from %fixed-stack.1)
53 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[LOAD]], [[LOAD1]]
54 ; CHECK-NEXT: $d0 = COPY [[AND]](s32)
55 ; CHECK-NEXT: RTS implicit $d0
56 %3:_(p0) = G_FRAME_INDEX %fixed-stack.1
57 %2:_(s32) = G_LOAD %3(p0) :: (load (s32) from %fixed-stack.1, align 8)
58 %0:_(s17) = G_TRUNC %2(s32)
59 %5:_(p0) = G_FRAME_INDEX %fixed-stack.0
60 %4:_(s32) = G_LOAD %5(p0) :: (load (s32) from %fixed-stack.0)
61 %1:_(s17) = G_TRUNC %4(s32)
62 %6:_(s17) = G_AND %0, %1
63 %7:_(s32) = G_ANYEXT %6(s17)