88 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel -stop-after=irtranslator -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS323 4define i32 @shl(i32 %a) {5 ; MIPS32-LABEL: name: shl6 ; MIPS32: bb.1.entry:7 ; MIPS32: liveins: $a08 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a09 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 110 ; MIPS32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[C]]11 ; MIPS32: $v0 = COPY [[SHL]](s32)12 ; MIPS32: RetRA implicit $v013entry:14 %shl = shl i32 %a, 115 ret i32 %shl16}17 18define i32 @ashr(i32 %a) {19 ; MIPS32-LABEL: name: ashr20 ; MIPS32: bb.1.entry:21 ; MIPS32: liveins: $a022 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a023 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 124 ; MIPS32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[COPY]], [[C]]25 ; MIPS32: $v0 = COPY [[ASHR]](s32)26 ; MIPS32: RetRA implicit $v027entry:28 %shr = ashr i32 %a, 129 ret i32 %shr30}31 32define i32 @lshr(i32 %a) {33 ; MIPS32-LABEL: name: lshr34 ; MIPS32: bb.1.entry:35 ; MIPS32: liveins: $a036 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a037 ; MIPS32: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 138 ; MIPS32: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[C]]39 ; MIPS32: $v0 = COPY [[LSHR]](s32)40 ; MIPS32: RetRA implicit $v041entry:42 %shr = lshr i32 %a, 143 ret i32 %shr44}45 46define i32 @shlv(i32 %a, i32 %b) {47 ; MIPS32-LABEL: name: shlv48 ; MIPS32: bb.1.entry:49 ; MIPS32: liveins: $a0, $a150 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a051 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a152 ; MIPS32: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[COPY]], [[COPY1]]53 ; MIPS32: $v0 = COPY [[SHL]](s32)54 ; MIPS32: RetRA implicit $v055entry:56 %shl = shl i32 %a, %b57 ret i32 %shl58}59 60define i32 @ashrv(i32 %a, i32 %b) {61 ; MIPS32-LABEL: name: ashrv62 ; MIPS32: bb.1.entry:63 ; MIPS32: liveins: $a0, $a164 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a065 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a166 ; MIPS32: [[ASHR:%[0-9]+]]:_(s32) = G_ASHR [[COPY]], [[COPY1]]67 ; MIPS32: $v0 = COPY [[ASHR]](s32)68 ; MIPS32: RetRA implicit $v069entry:70 %shr = ashr i32 %a, %b71 ret i32 %shr72}73 74define i32 @lshrv(i32 %a, i32 %b) {75 ; MIPS32-LABEL: name: lshrv76 ; MIPS32: bb.1.entry:77 ; MIPS32: liveins: $a0, $a178 ; MIPS32: [[COPY:%[0-9]+]]:_(s32) = COPY $a079 ; MIPS32: [[COPY1:%[0-9]+]]:_(s32) = COPY $a180 ; MIPS32: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[COPY1]]81 ; MIPS32: $v0 = COPY [[LSHR]](s32)82 ; MIPS32: RetRA implicit $v083entry:84 %shr = lshr i32 %a, %b85 ret i32 %shr86}87 88