brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.3 KiB · 5a2c8f0 Raw
107 lines · plain
1; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel -stop-after=irtranslator -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS322 3define i64 @i64_reg(i64 %a) {4  ; MIPS32-LABEL: name: i64_reg5  ; MIPS32: bb.1.entry:6  ; MIPS32:   liveins: $a0, $a17  ; MIPS32:   [[COPY:%[0-9]+]]:_(s32) = COPY $a08  ; MIPS32:   [[COPY1:%[0-9]+]]:_(s32) = COPY $a19  ; MIPS32:   [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[COPY]](s32), [[COPY1]](s32)10  ; MIPS32:   [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[MV]](s64)11  ; MIPS32:   $v0 = COPY [[UV]](s32)12  ; MIPS32:   $v1 = COPY [[UV1]](s32)13  ; MIPS32:   RetRA implicit $v0, implicit $v114entry:15  ret i64 %a16}17 18define i64 @i64_stack(i32 %a0, i32 %a1, i32 %a2, i32 %a3, i64 %a) {19  ; MIPS32-LABEL: name: i64_stack20  ; MIPS32: fixedStack:21  ; MIPS32-DAG:  - { id: [[STACK0:[0-9]+]], type: default, offset: 20, size: 4, alignment: 4,22  ; MIPS32-DAG:  - { id: [[STACK1:[0-9]+]], type: default, offset: 16, size: 4, alignment: 8,23  ; MIPS32: bb.1.entry:24  ; MIPS32:   liveins: $a0, $a1, $a2, $a325  ; MIPS32:   [[COPY:%[0-9]+]]:_(s32) = COPY $a026  ; MIPS32:   [[COPY1:%[0-9]+]]:_(s32) = COPY $a127  ; MIPS32:   [[COPY2:%[0-9]+]]:_(s32) = COPY $a228  ; MIPS32:   [[COPY3:%[0-9]+]]:_(s32) = COPY $a329  ; MIPS32:   [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.130  ; MIPS32:   [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s32) from %fixed-stack.[[STACK1]], align 8)31  ; MIPS32:   [[FRAME_INDEX1:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.032  ; MIPS32:   [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX1]](p0) :: (load (s32) from %fixed-stack.[[STACK0]])33  ; MIPS32:   [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD]](s32), [[LOAD1]](s32)34  ; MIPS32:   [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[MV]](s64)35  ; MIPS32:   $v0 = COPY [[UV]](s32)36  ; MIPS32:   $v1 = COPY [[UV1]](s32)37  ; MIPS32:   RetRA implicit $v0, implicit $v138entry:39  ret i64 %a40}41 42define i64 @i64_reg_allign(i32 %a0, i64 %a) {43  ; MIPS32-LABEL: name: i64_reg_allign44  ; MIPS32: bb.1.entry:45  ; MIPS32:   liveins: $a0, $a2, $a346  ; MIPS32:   [[COPY:%[0-9]+]]:_(s32) = COPY $a047  ; MIPS32:   [[COPY1:%[0-9]+]]:_(s32) = COPY $a248  ; MIPS32:   [[COPY2:%[0-9]+]]:_(s32) = COPY $a349  ; MIPS32:   [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[COPY1]](s32), [[COPY2]](s32)50  ; MIPS32:   [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[MV]](s64)51  ; MIPS32:   $v0 = COPY [[UV]](s32)52  ; MIPS32:   $v1 = COPY [[UV1]](s32)53  ; MIPS32:   RetRA implicit $v0, implicit $v154entry:55  ret i64 %a56}57 58define i64 @i64_stack_allign(i32 %a0, i32 %a1, i32 %a2, i32 %a3, i32 %s16, i64 %a) {59  ; MIPS32-LABEL: name: i64_stack_allign60  ; MIPS32: fixedStack:61  ; MIPS32-DAG:  - { id: [[STACK0:[0-9]+]], type: default, offset: 28, size: 4, alignment: 4,62  ; MIPS32-DAG:  - { id: [[STACK1:[0-9]+]], type: default, offset: 24, size: 4, alignment: 8,63  ; MIPS32-DAG:  - { id: [[STACK2:[0-9]+]], type: default, offset: 16, size: 4, alignment: 8,64  ; MIPS32: bb.1.entry:65  ; MIPS32:   liveins: $a0, $a1, $a2, $a366  ; MIPS32:   [[COPY:%[0-9]+]]:_(s32) = COPY $a067  ; MIPS32:   [[COPY1:%[0-9]+]]:_(s32) = COPY $a168  ; MIPS32:   [[COPY2:%[0-9]+]]:_(s32) = COPY $a269  ; MIPS32:   [[COPY3:%[0-9]+]]:_(s32) = COPY $a370  ; MIPS32:   [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.271  ; MIPS32:   [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s32) from %fixed-stack.[[STACK2]], align 8)72  ; MIPS32:   [[FRAME_INDEX1:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.173  ; MIPS32:   [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX1]](p0) :: (load (s32) from %fixed-stack.[[STACK1]], align 8)74  ; MIPS32:   [[FRAME_INDEX2:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.075  ; MIPS32:   [[LOAD2:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX2]](p0) :: (load (s32) from %fixed-stack.[[STACK0]])76  ; MIPS32:   [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD1]](s32), [[LOAD2]](s32)77  ; MIPS32:   [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[MV]](s64)78  ; MIPS32:   $v0 = COPY [[UV]](s32)79  ; MIPS32:   $v1 = COPY [[UV1]](s32)80  ; MIPS32:   RetRA implicit $v0, implicit $v181entry:82  ret i64 %a83}84 85define i64 @i64_reg_stack(i32 %a0, i32 %a1, i32 %a2, i64 %a) {86  ; MIPS32-LABEL: name: i64_reg_stack87  ; MIPS32: fixedStack:88  ; MIPS32-DAG:  - { id: [[STACK0:[0-9]+]], type: default, offset: 20, size: 4, alignment: 4,89  ; MIPS32-DAG:  - { id: [[STACK1:[0-9]+]], type: default, offset: 16, size: 4, alignment: 8,90  ; MIPS32: bb.1.entry:91  ; MIPS32:   liveins: $a0, $a1, $a292  ; MIPS32:   [[COPY:%[0-9]+]]:_(s32) = COPY $a093  ; MIPS32:   [[COPY1:%[0-9]+]]:_(s32) = COPY $a194  ; MIPS32:   [[COPY2:%[0-9]+]]:_(s32) = COPY $a295  ; MIPS32:   [[FRAME_INDEX:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.196  ; MIPS32:   [[LOAD:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX]](p0) :: (load (s32) from %fixed-stack.[[STACK1]], align 8)97  ; MIPS32:   [[FRAME_INDEX1:%[0-9]+]]:_(p0) = G_FRAME_INDEX %fixed-stack.098  ; MIPS32:   [[LOAD1:%[0-9]+]]:_(s32) = G_LOAD [[FRAME_INDEX1]](p0) :: (load (s32) from %fixed-stack.[[STACK0]])99  ; MIPS32:   [[MV:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[LOAD]](s32), [[LOAD1]](s32)100  ; MIPS32:   [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[MV]](s64)101  ; MIPS32:   $v0 = COPY [[UV]](s32)102  ; MIPS32:   $v1 = COPY [[UV1]](s32)103  ; MIPS32:   RetRA implicit $v0, implicit $v1104entry:105  ret i64 %a106}107