[MIPS GlobalISel] Select MSA vector generic and builtin add
[llvm-core.git] / test / CodeGen / Mips / GlobalISel / llvm-ir / zext_and_sext.ll
blob1249d5c955411b136c074ca79e6c28d508bd25d9
1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc  -O0 -mtriple=mipsel-linux-gnu -global-isel  -verify-machineinstrs %s -o -| FileCheck %s -check-prefixes=MIPS32
4 define i64 @zext(i32 %x) {
5 ; MIPS32-LABEL: zext:
6 ; MIPS32:       # %bb.0: # %entry
7 ; MIPS32-NEXT:    ori $3, $zero, 0
8 ; MIPS32-NEXT:    move $2, $4
9 ; MIPS32-NEXT:    jr $ra
10 ; MIPS32-NEXT:    nop
11 entry:
12   %conv = zext i32 %x to i64
13   ret i64 %conv
16 define i64 @sext(i32 %x) {
17 ; MIPS32-LABEL: sext:
18 ; MIPS32:       # %bb.0: # %entry
19 ; MIPS32-NEXT:    ori $1, $zero, 31
20 ; MIPS32-NEXT:    srav $3, $4, $1
21 ; MIPS32-NEXT:    move $2, $4
22 ; MIPS32-NEXT:    jr $ra
23 ; MIPS32-NEXT:    nop
24 entry:
25   %conv = sext i32 %x to i64
26   ret i64 %conv