Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 1 | ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| 2 | ; RUN: llc < %s -mtriple=mips-unknown-linux-gnu -mcpu=mips32 -disable-mips-delay-filler | FileCheck %s --check-prefixes=ALL,MIPS32,MIPS32EB |
| 3 | ; RUN: llc < %s -mtriple=mips64-unknown-linux-gnu -relocation-model=pic -mcpu=mips64 -disable-mips-delay-filler | FileCheck %s --check-prefixes=ALL,MIPS64,MIPS64EB |
| 4 | ; RUN: llc < %s -mtriple=mips-unknown-linux-gnu -mcpu=mips32r5 -mattr=+fp64,+msa -disable-mips-delay-filler | FileCheck %s --check-prefixes=ALL,MIPS32R5,MIPS32R5EB |
| 5 | ; RUN: llc < %s -mtriple=mips64-unknown-linux-gnu -relocation-model=pic -mcpu=mips64r5 -mattr=+fp64,+msa -disable-mips-delay-filler | FileCheck %s --check-prefixes=ALL,MIPS64R5,MIPS64R5EB |
| 6 | ; RUN: llc < %s -mtriple=mipsel-unknown-linux-gnu -mcpu=mips32 -disable-mips-delay-filler | FileCheck %s --check-prefixes=ALL,MIPS32,MIPS32EL |
| 7 | ; RUN: llc < %s -mtriple=mips64el-unknown-linux-gnu -relocation-model=pic -mcpu=mips64 -disable-mips-delay-filler | FileCheck %s --check-prefixes=ALL,MIPS64,MIPS64EL |
| 8 | ; RUN: llc < %s -mtriple=mipsel-unknown-linux-gnu -mcpu=mips32r5 -mattr=+fp64,+msa -disable-mips-delay-filler | FileCheck %s --check-prefixes=ALL,MIPS32R5,MIPS32R5EL |
| 9 | ; RUN: llc < %s -mtriple=mips64el-unknown-linux-gnu -relocation-model=pic -mcpu=mips64r5 -mattr=+fp64,+msa -disable-mips-delay-filler | FileCheck %s --check-prefixes=ALL,MIPS64R5,MIPS64R5EL |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 10 | |
| 11 | ; Test that vector types are passed through the integer register set whether or |
| 12 | ; not MSA is enabled. This is a ABI requirement for MIPS. For GCC compatibility |
| 13 | ; we need to handle any power of 2 number of elements. We will test this |
| 14 | ; exhaustively for combinations up to MSA register (128 bits) size. |
| 15 | |
| 16 | ; First set of tests are for argument passing. |
| 17 | |
| 18 | define <2 x i8> @i8_2(<2 x i8> %a, <2 x i8> %b) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 19 | ; MIPS32EB-LABEL: i8_2: |
| 20 | ; MIPS32EB: # %bb.0: |
| 21 | ; MIPS32EB-NEXT: srl $1, $5, 24 |
| 22 | ; MIPS32EB-NEXT: srl $2, $4, 24 |
| 23 | ; MIPS32EB-NEXT: addu $1, $2, $1 |
| 24 | ; MIPS32EB-NEXT: sll $1, $1, 8 |
| 25 | ; MIPS32EB-NEXT: srl $2, $5, 16 |
| 26 | ; MIPS32EB-NEXT: srl $3, $4, 16 |
| 27 | ; MIPS32EB-NEXT: addu $2, $3, $2 |
| 28 | ; MIPS32EB-NEXT: andi $2, $2, 255 |
| 29 | ; MIPS32EB-NEXT: or $2, $2, $1 |
| 30 | ; MIPS32EB-NEXT: jr $ra |
| 31 | ; MIPS32EB-NEXT: nop |
| 32 | ; |
| 33 | ; MIPS64EB-LABEL: i8_2: |
| 34 | ; MIPS64EB: # %bb.0: |
| 35 | ; MIPS64EB-NEXT: dsrl $1, $5, 56 |
| 36 | ; MIPS64EB-NEXT: sll $1, $1, 0 |
| 37 | ; MIPS64EB-NEXT: dsrl $2, $4, 56 |
| 38 | ; MIPS64EB-NEXT: sll $2, $2, 0 |
| 39 | ; MIPS64EB-NEXT: addu $1, $2, $1 |
| 40 | ; MIPS64EB-NEXT: dsrl $2, $5, 48 |
| 41 | ; MIPS64EB-NEXT: sll $1, $1, 8 |
| 42 | ; MIPS64EB-NEXT: sll $2, $2, 0 |
| 43 | ; MIPS64EB-NEXT: dsrl $3, $4, 48 |
| 44 | ; MIPS64EB-NEXT: sll $3, $3, 0 |
| 45 | ; MIPS64EB-NEXT: addu $2, $3, $2 |
| 46 | ; MIPS64EB-NEXT: andi $2, $2, 255 |
| 47 | ; MIPS64EB-NEXT: or $2, $2, $1 |
| 48 | ; MIPS64EB-NEXT: jr $ra |
| 49 | ; MIPS64EB-NEXT: nop |
| 50 | ; |
| 51 | ; MIPS32R5EB-LABEL: i8_2: |
| 52 | ; MIPS32R5EB: # %bb.0: |
Simon Pilgrim | 80663ee | 2018-02-15 12:14:15 +0000 | [diff] [blame^] | 53 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, -48 |
| 54 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 48 |
| 55 | ; MIPS32R5EB-NEXT: sw $fp, 44($sp) # 4-byte Folded Spill |
| 56 | ; MIPS32R5EB-NEXT: .cfi_offset 30, -4 |
| 57 | ; MIPS32R5EB-NEXT: move $fp, $sp |
| 58 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 |
| 59 | ; MIPS32R5EB-NEXT: addiu $1, $zero, -16 |
| 60 | ; MIPS32R5EB-NEXT: and $sp, $sp, $1 |
| 61 | ; MIPS32R5EB-NEXT: sw $5, 36($sp) |
| 62 | ; MIPS32R5EB-NEXT: sw $4, 40($sp) |
| 63 | ; MIPS32R5EB-NEXT: lbu $1, 37($sp) |
| 64 | ; MIPS32R5EB-NEXT: sw $1, 20($sp) |
| 65 | ; MIPS32R5EB-NEXT: lbu $1, 36($sp) |
| 66 | ; MIPS32R5EB-NEXT: sw $1, 16($sp) |
| 67 | ; MIPS32R5EB-NEXT: lbu $1, 40($sp) |
| 68 | ; MIPS32R5EB-NEXT: lbu $2, 41($sp) |
| 69 | ; MIPS32R5EB-NEXT: sw $2, 4($sp) |
| 70 | ; MIPS32R5EB-NEXT: sw $1, 0($sp) |
| 71 | ; MIPS32R5EB-NEXT: ld.w $w0, 16($sp) |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 72 | ; MIPS32R5EB-NEXT: ilvr.w $w0, $w0, $w0 |
| 73 | ; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 |
Simon Pilgrim | 80663ee | 2018-02-15 12:14:15 +0000 | [diff] [blame^] | 74 | ; MIPS32R5EB-NEXT: ld.w $w1, 0($sp) |
| 75 | ; MIPS32R5EB-NEXT: ilvr.w $w1, $w1, $w1 |
| 76 | ; MIPS32R5EB-NEXT: shf.w $w1, $w1, 177 |
| 77 | ; MIPS32R5EB-NEXT: addv.d $w0, $w1, $w0 |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 78 | ; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 |
| 79 | ; MIPS32R5EB-NEXT: copy_s.w $1, $w0[1] |
| 80 | ; MIPS32R5EB-NEXT: copy_s.w $2, $w0[3] |
Simon Pilgrim | 80663ee | 2018-02-15 12:14:15 +0000 | [diff] [blame^] | 81 | ; MIPS32R5EB-NEXT: sb $2, 33($sp) |
| 82 | ; MIPS32R5EB-NEXT: sb $1, 32($sp) |
| 83 | ; MIPS32R5EB-NEXT: lhu $2, 32($sp) |
| 84 | ; MIPS32R5EB-NEXT: move $sp, $fp |
| 85 | ; MIPS32R5EB-NEXT: lw $fp, 44($sp) # 4-byte Folded Reload |
| 86 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, 48 |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 87 | ; MIPS32R5EB-NEXT: jr $ra |
| 88 | ; MIPS32R5EB-NEXT: nop |
| 89 | ; |
| 90 | ; MIPS64R5EB-LABEL: i8_2: |
| 91 | ; MIPS64R5EB: # %bb.0: |
| 92 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, -64 |
| 93 | ; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 64 |
| 94 | ; MIPS64R5EB-NEXT: sd $4, 56($sp) |
| 95 | ; MIPS64R5EB-NEXT: ldi.b $w0, 0 |
| 96 | ; MIPS64R5EB-NEXT: lbu $1, 57($sp) |
| 97 | ; MIPS64R5EB-NEXT: lbu $2, 56($sp) |
| 98 | ; MIPS64R5EB-NEXT: move.v $w1, $w0 |
| 99 | ; MIPS64R5EB-NEXT: insert.h $w1[0], $2 |
| 100 | ; MIPS64R5EB-NEXT: insert.h $w1[1], $1 |
| 101 | ; MIPS64R5EB-NEXT: lbu $1, 58($sp) |
| 102 | ; MIPS64R5EB-NEXT: insert.h $w1[2], $1 |
| 103 | ; MIPS64R5EB-NEXT: lbu $1, 59($sp) |
| 104 | ; MIPS64R5EB-NEXT: insert.h $w1[3], $1 |
| 105 | ; MIPS64R5EB-NEXT: lbu $1, 60($sp) |
| 106 | ; MIPS64R5EB-NEXT: insert.h $w1[4], $1 |
| 107 | ; MIPS64R5EB-NEXT: lbu $1, 61($sp) |
| 108 | ; MIPS64R5EB-NEXT: insert.h $w1[5], $1 |
| 109 | ; MIPS64R5EB-NEXT: lbu $1, 63($sp) |
| 110 | ; MIPS64R5EB-NEXT: lbu $2, 62($sp) |
| 111 | ; MIPS64R5EB-NEXT: insert.h $w1[6], $2 |
| 112 | ; MIPS64R5EB-NEXT: insert.h $w1[7], $1 |
| 113 | ; MIPS64R5EB-NEXT: copy_s.h $1, $w1[0] |
| 114 | ; MIPS64R5EB-NEXT: copy_s.h $2, $w1[1] |
| 115 | ; MIPS64R5EB-NEXT: sd $5, 48($sp) |
| 116 | ; MIPS64R5EB-NEXT: lbu $3, 48($sp) |
| 117 | ; MIPS64R5EB-NEXT: insert.h $w0[0], $3 |
| 118 | ; MIPS64R5EB-NEXT: lbu $3, 49($sp) |
| 119 | ; MIPS64R5EB-NEXT: insert.h $w0[1], $3 |
| 120 | ; MIPS64R5EB-NEXT: lbu $3, 50($sp) |
| 121 | ; MIPS64R5EB-NEXT: insert.h $w0[2], $3 |
| 122 | ; MIPS64R5EB-NEXT: lbu $3, 51($sp) |
| 123 | ; MIPS64R5EB-NEXT: insert.h $w0[3], $3 |
| 124 | ; MIPS64R5EB-NEXT: lbu $3, 52($sp) |
| 125 | ; MIPS64R5EB-NEXT: insert.h $w0[4], $3 |
| 126 | ; MIPS64R5EB-NEXT: lbu $3, 53($sp) |
| 127 | ; MIPS64R5EB-NEXT: insert.h $w0[5], $3 |
| 128 | ; MIPS64R5EB-NEXT: lbu $3, 55($sp) |
| 129 | ; MIPS64R5EB-NEXT: lbu $4, 54($sp) |
| 130 | ; MIPS64R5EB-NEXT: insert.h $w0[6], $4 |
| 131 | ; MIPS64R5EB-NEXT: insert.h $w0[7], $3 |
| 132 | ; MIPS64R5EB-NEXT: copy_s.h $3, $w0[0] |
| 133 | ; MIPS64R5EB-NEXT: copy_s.h $4, $w0[1] |
| 134 | ; MIPS64R5EB-NEXT: sw $4, 28($sp) |
| 135 | ; MIPS64R5EB-NEXT: sw $3, 20($sp) |
| 136 | ; MIPS64R5EB-NEXT: sw $2, 12($sp) |
| 137 | ; MIPS64R5EB-NEXT: sw $1, 4($sp) |
| 138 | ; MIPS64R5EB-NEXT: ld.d $w0, 16($sp) |
| 139 | ; MIPS64R5EB-NEXT: ld.d $w1, 0($sp) |
| 140 | ; MIPS64R5EB-NEXT: addv.d $w0, $w1, $w0 |
| 141 | ; MIPS64R5EB-NEXT: copy_s.d $1, $w0[0] |
| 142 | ; MIPS64R5EB-NEXT: copy_s.d $2, $w0[1] |
| 143 | ; MIPS64R5EB-NEXT: sb $2, 45($sp) |
| 144 | ; MIPS64R5EB-NEXT: sb $1, 44($sp) |
| 145 | ; MIPS64R5EB-NEXT: lh $2, 44($sp) |
| 146 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, 64 |
| 147 | ; MIPS64R5EB-NEXT: jr $ra |
| 148 | ; MIPS64R5EB-NEXT: nop |
| 149 | ; |
| 150 | ; MIPS32EL-LABEL: i8_2: |
| 151 | ; MIPS32EL: # %bb.0: |
| 152 | ; MIPS32EL-NEXT: addu $1, $4, $5 |
| 153 | ; MIPS32EL-NEXT: andi $1, $1, 255 |
| 154 | ; MIPS32EL-NEXT: andi $2, $5, 65280 |
| 155 | ; MIPS32EL-NEXT: srl $2, $2, 8 |
| 156 | ; MIPS32EL-NEXT: andi $3, $4, 65280 |
| 157 | ; MIPS32EL-NEXT: srl $3, $3, 8 |
| 158 | ; MIPS32EL-NEXT: addu $2, $3, $2 |
| 159 | ; MIPS32EL-NEXT: sll $2, $2, 8 |
| 160 | ; MIPS32EL-NEXT: or $2, $1, $2 |
| 161 | ; MIPS32EL-NEXT: jr $ra |
| 162 | ; MIPS32EL-NEXT: nop |
| 163 | ; |
| 164 | ; MIPS64EL-LABEL: i8_2: |
| 165 | ; MIPS64EL: # %bb.0: |
| 166 | ; MIPS64EL-NEXT: sll $1, $5, 0 |
| 167 | ; MIPS64EL-NEXT: sll $2, $4, 0 |
| 168 | ; MIPS64EL-NEXT: addu $3, $2, $1 |
| 169 | ; MIPS64EL-NEXT: andi $3, $3, 255 |
| 170 | ; MIPS64EL-NEXT: andi $1, $1, 65280 |
| 171 | ; MIPS64EL-NEXT: srl $1, $1, 8 |
| 172 | ; MIPS64EL-NEXT: andi $2, $2, 65280 |
| 173 | ; MIPS64EL-NEXT: srl $2, $2, 8 |
| 174 | ; MIPS64EL-NEXT: addu $1, $2, $1 |
| 175 | ; MIPS64EL-NEXT: sll $1, $1, 8 |
| 176 | ; MIPS64EL-NEXT: or $2, $3, $1 |
| 177 | ; MIPS64EL-NEXT: jr $ra |
| 178 | ; MIPS64EL-NEXT: nop |
| 179 | ; |
| 180 | ; MIPS32R5EL-LABEL: i8_2: |
| 181 | ; MIPS32R5EL: # %bb.0: |
Simon Pilgrim | 80663ee | 2018-02-15 12:14:15 +0000 | [diff] [blame^] | 182 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, -48 |
| 183 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 48 |
| 184 | ; MIPS32R5EL-NEXT: sw $fp, 44($sp) # 4-byte Folded Spill |
| 185 | ; MIPS32R5EL-NEXT: .cfi_offset 30, -4 |
| 186 | ; MIPS32R5EL-NEXT: move $fp, $sp |
| 187 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 |
| 188 | ; MIPS32R5EL-NEXT: addiu $1, $zero, -16 |
| 189 | ; MIPS32R5EL-NEXT: and $sp, $sp, $1 |
| 190 | ; MIPS32R5EL-NEXT: sw $5, 36($sp) |
| 191 | ; MIPS32R5EL-NEXT: sw $4, 40($sp) |
| 192 | ; MIPS32R5EL-NEXT: lbu $1, 37($sp) |
| 193 | ; MIPS32R5EL-NEXT: sw $1, 20($sp) |
| 194 | ; MIPS32R5EL-NEXT: lbu $1, 36($sp) |
| 195 | ; MIPS32R5EL-NEXT: sw $1, 16($sp) |
| 196 | ; MIPS32R5EL-NEXT: lbu $1, 41($sp) |
| 197 | ; MIPS32R5EL-NEXT: sw $1, 4($sp) |
| 198 | ; MIPS32R5EL-NEXT: lbu $1, 40($sp) |
| 199 | ; MIPS32R5EL-NEXT: sw $1, 0($sp) |
| 200 | ; MIPS32R5EL-NEXT: ld.w $w0, 16($sp) |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 201 | ; MIPS32R5EL-NEXT: ilvr.w $w0, $w0, $w0 |
Simon Pilgrim | 80663ee | 2018-02-15 12:14:15 +0000 | [diff] [blame^] | 202 | ; MIPS32R5EL-NEXT: ld.w $w1, 0($sp) |
| 203 | ; MIPS32R5EL-NEXT: ilvr.w $w1, $w1, $w1 |
| 204 | ; MIPS32R5EL-NEXT: addv.d $w0, $w1, $w0 |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 205 | ; MIPS32R5EL-NEXT: copy_s.w $1, $w0[0] |
| 206 | ; MIPS32R5EL-NEXT: copy_s.w $2, $w0[2] |
Simon Pilgrim | 80663ee | 2018-02-15 12:14:15 +0000 | [diff] [blame^] | 207 | ; MIPS32R5EL-NEXT: sb $2, 33($sp) |
| 208 | ; MIPS32R5EL-NEXT: sb $1, 32($sp) |
| 209 | ; MIPS32R5EL-NEXT: lhu $2, 32($sp) |
| 210 | ; MIPS32R5EL-NEXT: move $sp, $fp |
| 211 | ; MIPS32R5EL-NEXT: lw $fp, 44($sp) # 4-byte Folded Reload |
| 212 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, 48 |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 213 | ; MIPS32R5EL-NEXT: jr $ra |
| 214 | ; MIPS32R5EL-NEXT: nop |
| 215 | ; |
| 216 | ; MIPS64R5EL-LABEL: i8_2: |
| 217 | ; MIPS64R5EL: # %bb.0: |
| 218 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, -64 |
| 219 | ; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 64 |
| 220 | ; MIPS64R5EL-NEXT: sd $4, 56($sp) |
| 221 | ; MIPS64R5EL-NEXT: ldi.b $w0, 0 |
| 222 | ; MIPS64R5EL-NEXT: lbu $1, 57($sp) |
| 223 | ; MIPS64R5EL-NEXT: lbu $2, 56($sp) |
| 224 | ; MIPS64R5EL-NEXT: move.v $w1, $w0 |
| 225 | ; MIPS64R5EL-NEXT: insert.h $w1[0], $2 |
| 226 | ; MIPS64R5EL-NEXT: insert.h $w1[1], $1 |
| 227 | ; MIPS64R5EL-NEXT: lbu $1, 58($sp) |
| 228 | ; MIPS64R5EL-NEXT: insert.h $w1[2], $1 |
| 229 | ; MIPS64R5EL-NEXT: lbu $1, 59($sp) |
| 230 | ; MIPS64R5EL-NEXT: insert.h $w1[3], $1 |
| 231 | ; MIPS64R5EL-NEXT: lbu $1, 60($sp) |
| 232 | ; MIPS64R5EL-NEXT: insert.h $w1[4], $1 |
| 233 | ; MIPS64R5EL-NEXT: lbu $1, 61($sp) |
| 234 | ; MIPS64R5EL-NEXT: insert.h $w1[5], $1 |
| 235 | ; MIPS64R5EL-NEXT: lbu $1, 63($sp) |
| 236 | ; MIPS64R5EL-NEXT: lbu $2, 62($sp) |
| 237 | ; MIPS64R5EL-NEXT: insert.h $w1[6], $2 |
| 238 | ; MIPS64R5EL-NEXT: insert.h $w1[7], $1 |
| 239 | ; MIPS64R5EL-NEXT: copy_s.h $1, $w1[0] |
| 240 | ; MIPS64R5EL-NEXT: copy_s.h $2, $w1[1] |
| 241 | ; MIPS64R5EL-NEXT: sd $5, 48($sp) |
| 242 | ; MIPS64R5EL-NEXT: lbu $3, 48($sp) |
| 243 | ; MIPS64R5EL-NEXT: insert.h $w0[0], $3 |
| 244 | ; MIPS64R5EL-NEXT: lbu $3, 49($sp) |
| 245 | ; MIPS64R5EL-NEXT: insert.h $w0[1], $3 |
| 246 | ; MIPS64R5EL-NEXT: lbu $3, 50($sp) |
| 247 | ; MIPS64R5EL-NEXT: insert.h $w0[2], $3 |
| 248 | ; MIPS64R5EL-NEXT: lbu $3, 51($sp) |
| 249 | ; MIPS64R5EL-NEXT: insert.h $w0[3], $3 |
| 250 | ; MIPS64R5EL-NEXT: lbu $3, 52($sp) |
| 251 | ; MIPS64R5EL-NEXT: insert.h $w0[4], $3 |
| 252 | ; MIPS64R5EL-NEXT: lbu $3, 53($sp) |
| 253 | ; MIPS64R5EL-NEXT: insert.h $w0[5], $3 |
| 254 | ; MIPS64R5EL-NEXT: lbu $3, 55($sp) |
| 255 | ; MIPS64R5EL-NEXT: lbu $4, 54($sp) |
| 256 | ; MIPS64R5EL-NEXT: insert.h $w0[6], $4 |
| 257 | ; MIPS64R5EL-NEXT: insert.h $w0[7], $3 |
| 258 | ; MIPS64R5EL-NEXT: copy_s.h $3, $w0[0] |
| 259 | ; MIPS64R5EL-NEXT: copy_s.h $4, $w0[1] |
| 260 | ; MIPS64R5EL-NEXT: sw $4, 24($sp) |
| 261 | ; MIPS64R5EL-NEXT: sw $3, 16($sp) |
| 262 | ; MIPS64R5EL-NEXT: sw $2, 8($sp) |
| 263 | ; MIPS64R5EL-NEXT: sw $1, 0($sp) |
| 264 | ; MIPS64R5EL-NEXT: ld.d $w0, 16($sp) |
| 265 | ; MIPS64R5EL-NEXT: ld.d $w1, 0($sp) |
| 266 | ; MIPS64R5EL-NEXT: addv.d $w0, $w1, $w0 |
| 267 | ; MIPS64R5EL-NEXT: copy_s.d $1, $w0[0] |
| 268 | ; MIPS64R5EL-NEXT: copy_s.d $2, $w0[1] |
| 269 | ; MIPS64R5EL-NEXT: sb $2, 45($sp) |
| 270 | ; MIPS64R5EL-NEXT: sb $1, 44($sp) |
| 271 | ; MIPS64R5EL-NEXT: lh $2, 44($sp) |
| 272 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, 64 |
| 273 | ; MIPS64R5EL-NEXT: jr $ra |
| 274 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 275 | %1 = add <2 x i8> %a, %b |
| 276 | ret <2 x i8> %1 |
| 277 | } |
| 278 | |
| 279 | ; Test that vector spilled to the outgoing argument area have the expected |
| 280 | ; offset from $sp. |
| 281 | |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 282 | define <2 x i8> @i8x2_7(<2 x i8> %a, <2 x i8> %b, <2 x i8> %c, <2 x i8> %d, <2 x i8> %e, <2 x i8> %f, <2 x i8> %g) { |
| 283 | ; MIPS32EB-LABEL: i8x2_7: |
| 284 | ; MIPS32EB: # %bb.0: # %entry |
| 285 | ; MIPS32EB-NEXT: srl $1, $5, 24 |
| 286 | ; MIPS32EB-NEXT: srl $2, $4, 24 |
| 287 | ; MIPS32EB-NEXT: addu $1, $2, $1 |
| 288 | ; MIPS32EB-NEXT: srl $2, $6, 24 |
| 289 | ; MIPS32EB-NEXT: addu $1, $1, $2 |
| 290 | ; MIPS32EB-NEXT: srl $2, $7, 24 |
| 291 | ; MIPS32EB-NEXT: addu $1, $1, $2 |
| 292 | ; MIPS32EB-NEXT: srl $2, $5, 16 |
| 293 | ; MIPS32EB-NEXT: srl $3, $4, 16 |
| 294 | ; MIPS32EB-NEXT: addu $2, $3, $2 |
| 295 | ; MIPS32EB-NEXT: srl $3, $6, 16 |
| 296 | ; MIPS32EB-NEXT: lbu $4, 16($sp) |
| 297 | ; MIPS32EB-NEXT: addu $2, $2, $3 |
| 298 | ; MIPS32EB-NEXT: addu $1, $1, $4 |
| 299 | ; MIPS32EB-NEXT: lbu $3, 20($sp) |
| 300 | ; MIPS32EB-NEXT: addu $1, $1, $3 |
| 301 | ; MIPS32EB-NEXT: lbu $3, 24($sp) |
| 302 | ; MIPS32EB-NEXT: addu $1, $1, $3 |
| 303 | ; MIPS32EB-NEXT: srl $3, $7, 16 |
| 304 | ; MIPS32EB-NEXT: sll $1, $1, 8 |
| 305 | ; MIPS32EB-NEXT: addu $2, $2, $3 |
| 306 | ; MIPS32EB-NEXT: lbu $3, 17($sp) |
| 307 | ; MIPS32EB-NEXT: addu $2, $2, $3 |
| 308 | ; MIPS32EB-NEXT: lbu $3, 21($sp) |
| 309 | ; MIPS32EB-NEXT: addu $2, $2, $3 |
| 310 | ; MIPS32EB-NEXT: lbu $3, 25($sp) |
| 311 | ; MIPS32EB-NEXT: addu $2, $2, $3 |
| 312 | ; MIPS32EB-NEXT: andi $2, $2, 255 |
| 313 | ; MIPS32EB-NEXT: or $2, $2, $1 |
| 314 | ; MIPS32EB-NEXT: jr $ra |
| 315 | ; MIPS32EB-NEXT: nop |
| 316 | ; |
| 317 | ; MIPS64EB-LABEL: i8x2_7: |
| 318 | ; MIPS64EB: # %bb.0: # %entry |
| 319 | ; MIPS64EB-NEXT: dsrl $1, $5, 56 |
| 320 | ; MIPS64EB-NEXT: dsrl $2, $6, 56 |
| 321 | ; MIPS64EB-NEXT: sll $1, $1, 0 |
| 322 | ; MIPS64EB-NEXT: dsrl $3, $4, 56 |
| 323 | ; MIPS64EB-NEXT: sll $3, $3, 0 |
| 324 | ; MIPS64EB-NEXT: addu $1, $3, $1 |
| 325 | ; MIPS64EB-NEXT: dsrl $3, $6, 48 |
| 326 | ; MIPS64EB-NEXT: sll $2, $2, 0 |
| 327 | ; MIPS64EB-NEXT: dsrl $5, $5, 48 |
| 328 | ; MIPS64EB-NEXT: sll $5, $5, 0 |
| 329 | ; MIPS64EB-NEXT: dsrl $4, $4, 48 |
| 330 | ; MIPS64EB-NEXT: sll $4, $4, 0 |
| 331 | ; MIPS64EB-NEXT: addu $4, $4, $5 |
| 332 | ; MIPS64EB-NEXT: addu $1, $1, $2 |
| 333 | ; MIPS64EB-NEXT: dsrl $2, $8, 48 |
| 334 | ; MIPS64EB-NEXT: dsrl $5, $8, 56 |
| 335 | ; MIPS64EB-NEXT: sll $3, $3, 0 |
| 336 | ; MIPS64EB-NEXT: dsrl $6, $7, 56 |
| 337 | ; MIPS64EB-NEXT: sll $6, $6, 0 |
| 338 | ; MIPS64EB-NEXT: addu $1, $1, $6 |
| 339 | ; MIPS64EB-NEXT: addu $3, $4, $3 |
| 340 | ; MIPS64EB-NEXT: sll $4, $5, 0 |
| 341 | ; MIPS64EB-NEXT: dsrl $5, $7, 48 |
| 342 | ; MIPS64EB-NEXT: sll $5, $5, 0 |
| 343 | ; MIPS64EB-NEXT: addu $3, $3, $5 |
| 344 | ; MIPS64EB-NEXT: dsrl $5, $10, 48 |
| 345 | ; MIPS64EB-NEXT: sll $2, $2, 0 |
| 346 | ; MIPS64EB-NEXT: dsrl $6, $10, 56 |
| 347 | ; MIPS64EB-NEXT: addu $1, $1, $4 |
| 348 | ; MIPS64EB-NEXT: dsrl $4, $9, 56 |
| 349 | ; MIPS64EB-NEXT: sll $4, $4, 0 |
| 350 | ; MIPS64EB-NEXT: addu $1, $1, $4 |
| 351 | ; MIPS64EB-NEXT: sll $4, $6, 0 |
| 352 | ; MIPS64EB-NEXT: addu $1, $1, $4 |
| 353 | ; MIPS64EB-NEXT: sll $1, $1, 8 |
| 354 | ; MIPS64EB-NEXT: addu $2, $3, $2 |
| 355 | ; MIPS64EB-NEXT: dsrl $3, $9, 48 |
| 356 | ; MIPS64EB-NEXT: sll $3, $3, 0 |
| 357 | ; MIPS64EB-NEXT: addu $2, $2, $3 |
| 358 | ; MIPS64EB-NEXT: sll $3, $5, 0 |
| 359 | ; MIPS64EB-NEXT: addu $2, $2, $3 |
| 360 | ; MIPS64EB-NEXT: andi $2, $2, 255 |
| 361 | ; MIPS64EB-NEXT: or $2, $2, $1 |
| 362 | ; MIPS64EB-NEXT: jr $ra |
| 363 | ; MIPS64EB-NEXT: nop |
| 364 | ; |
| 365 | ; MIPS32R5EB-LABEL: i8x2_7: |
| 366 | ; MIPS32R5EB: # %bb.0: # %entry |
Simon Pilgrim | 80663ee | 2018-02-15 12:14:15 +0000 | [diff] [blame^] | 367 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, -144 |
| 368 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 144 |
| 369 | ; MIPS32R5EB-NEXT: sw $fp, 140($sp) # 4-byte Folded Spill |
| 370 | ; MIPS32R5EB-NEXT: .cfi_offset 30, -4 |
| 371 | ; MIPS32R5EB-NEXT: move $fp, $sp |
| 372 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 |
| 373 | ; MIPS32R5EB-NEXT: addiu $1, $zero, -16 |
| 374 | ; MIPS32R5EB-NEXT: and $sp, $sp, $1 |
| 375 | ; MIPS32R5EB-NEXT: sw $5, 132($sp) |
| 376 | ; MIPS32R5EB-NEXT: sw $4, 136($sp) |
| 377 | ; MIPS32R5EB-NEXT: lbu $1, 133($sp) |
| 378 | ; MIPS32R5EB-NEXT: sw $1, 68($sp) |
| 379 | ; MIPS32R5EB-NEXT: lbu $1, 132($sp) |
| 380 | ; MIPS32R5EB-NEXT: sw $1, 64($sp) |
| 381 | ; MIPS32R5EB-NEXT: lbu $1, 136($sp) |
| 382 | ; MIPS32R5EB-NEXT: lbu $2, 137($sp) |
| 383 | ; MIPS32R5EB-NEXT: sw $2, 52($sp) |
| 384 | ; MIPS32R5EB-NEXT: sw $1, 48($sp) |
| 385 | ; MIPS32R5EB-NEXT: ld.w $w0, 64($sp) |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 386 | ; MIPS32R5EB-NEXT: ilvr.w $w0, $w0, $w0 |
| 387 | ; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 |
Simon Pilgrim | 80663ee | 2018-02-15 12:14:15 +0000 | [diff] [blame^] | 388 | ; MIPS32R5EB-NEXT: ld.w $w1, 48($sp) |
| 389 | ; MIPS32R5EB-NEXT: ilvr.w $w1, $w1, $w1 |
| 390 | ; MIPS32R5EB-NEXT: shf.w $w1, $w1, 177 |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 391 | ; MIPS32R5EB-NEXT: addv.d $w0, $w1, $w0 |
Simon Pilgrim | 80663ee | 2018-02-15 12:14:15 +0000 | [diff] [blame^] | 392 | ; MIPS32R5EB-NEXT: sw $6, 128($sp) |
| 393 | ; MIPS32R5EB-NEXT: lbu $1, 129($sp) |
| 394 | ; MIPS32R5EB-NEXT: sw $1, 84($sp) |
| 395 | ; MIPS32R5EB-NEXT: lbu $1, 128($sp) |
| 396 | ; MIPS32R5EB-NEXT: sw $1, 80($sp) |
| 397 | ; MIPS32R5EB-NEXT: ld.w $w1, 80($sp) |
| 398 | ; MIPS32R5EB-NEXT: ilvr.w $w1, $w1, $w1 |
| 399 | ; MIPS32R5EB-NEXT: shf.w $w1, $w1, 177 |
| 400 | ; MIPS32R5EB-NEXT: addv.d $w0, $w0, $w1 |
| 401 | ; MIPS32R5EB-NEXT: sw $7, 124($sp) |
| 402 | ; MIPS32R5EB-NEXT: lbu $1, 125($sp) |
| 403 | ; MIPS32R5EB-NEXT: sw $1, 100($sp) |
| 404 | ; MIPS32R5EB-NEXT: lbu $1, 124($sp) |
| 405 | ; MIPS32R5EB-NEXT: sw $1, 96($sp) |
| 406 | ; MIPS32R5EB-NEXT: ld.w $w1, 96($sp) |
| 407 | ; MIPS32R5EB-NEXT: ilvr.w $w1, $w1, $w1 |
| 408 | ; MIPS32R5EB-NEXT: shf.w $w1, $w1, 177 |
| 409 | ; MIPS32R5EB-NEXT: addv.d $w0, $w0, $w1 |
| 410 | ; MIPS32R5EB-NEXT: lbu $1, 161($fp) |
| 411 | ; MIPS32R5EB-NEXT: sw $1, 4($sp) |
| 412 | ; MIPS32R5EB-NEXT: lbu $1, 160($fp) |
| 413 | ; MIPS32R5EB-NEXT: sw $1, 0($sp) |
| 414 | ; MIPS32R5EB-NEXT: ld.w $w1, 0($sp) |
| 415 | ; MIPS32R5EB-NEXT: ilvr.w $w1, $w1, $w1 |
| 416 | ; MIPS32R5EB-NEXT: shf.w $w1, $w1, 177 |
| 417 | ; MIPS32R5EB-NEXT: addv.d $w0, $w0, $w1 |
| 418 | ; MIPS32R5EB-NEXT: lbu $1, 165($fp) |
| 419 | ; MIPS32R5EB-NEXT: sw $1, 20($sp) |
| 420 | ; MIPS32R5EB-NEXT: lbu $1, 164($fp) |
| 421 | ; MIPS32R5EB-NEXT: sw $1, 16($sp) |
| 422 | ; MIPS32R5EB-NEXT: ld.w $w1, 16($sp) |
| 423 | ; MIPS32R5EB-NEXT: ilvr.w $w1, $w1, $w1 |
| 424 | ; MIPS32R5EB-NEXT: shf.w $w1, $w1, 177 |
| 425 | ; MIPS32R5EB-NEXT: addv.d $w0, $w0, $w1 |
| 426 | ; MIPS32R5EB-NEXT: lbu $1, 169($fp) |
| 427 | ; MIPS32R5EB-NEXT: sw $1, 36($sp) |
| 428 | ; MIPS32R5EB-NEXT: lbu $1, 168($fp) |
| 429 | ; MIPS32R5EB-NEXT: sw $1, 32($sp) |
| 430 | ; MIPS32R5EB-NEXT: ld.w $w1, 32($sp) |
| 431 | ; MIPS32R5EB-NEXT: ilvr.w $w1, $w1, $w1 |
| 432 | ; MIPS32R5EB-NEXT: shf.w $w1, $w1, 177 |
| 433 | ; MIPS32R5EB-NEXT: addv.d $w0, $w0, $w1 |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 434 | ; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 |
| 435 | ; MIPS32R5EB-NEXT: copy_s.w $1, $w0[1] |
| 436 | ; MIPS32R5EB-NEXT: copy_s.w $2, $w0[3] |
Simon Pilgrim | 80663ee | 2018-02-15 12:14:15 +0000 | [diff] [blame^] | 437 | ; MIPS32R5EB-NEXT: sb $2, 121($sp) |
| 438 | ; MIPS32R5EB-NEXT: sb $1, 120($sp) |
| 439 | ; MIPS32R5EB-NEXT: lhu $2, 120($sp) |
| 440 | ; MIPS32R5EB-NEXT: move $sp, $fp |
| 441 | ; MIPS32R5EB-NEXT: lw $fp, 140($sp) # 4-byte Folded Reload |
| 442 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, 144 |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 443 | ; MIPS32R5EB-NEXT: jr $ra |
| 444 | ; MIPS32R5EB-NEXT: nop |
| 445 | ; |
| 446 | ; MIPS64R5EB-LABEL: i8x2_7: |
| 447 | ; MIPS64R5EB: # %bb.0: # %entry |
| 448 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, -176 |
| 449 | ; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 176 |
| 450 | ; MIPS64R5EB-NEXT: sd $4, 168($sp) |
| 451 | ; MIPS64R5EB-NEXT: ldi.b $w0, 0 |
| 452 | ; MIPS64R5EB-NEXT: lbu $1, 169($sp) |
| 453 | ; MIPS64R5EB-NEXT: lbu $2, 168($sp) |
| 454 | ; MIPS64R5EB-NEXT: move.v $w1, $w0 |
| 455 | ; MIPS64R5EB-NEXT: insert.h $w1[0], $2 |
| 456 | ; MIPS64R5EB-NEXT: insert.h $w1[1], $1 |
| 457 | ; MIPS64R5EB-NEXT: lbu $1, 170($sp) |
| 458 | ; MIPS64R5EB-NEXT: insert.h $w1[2], $1 |
| 459 | ; MIPS64R5EB-NEXT: lbu $1, 171($sp) |
| 460 | ; MIPS64R5EB-NEXT: insert.h $w1[3], $1 |
| 461 | ; MIPS64R5EB-NEXT: lbu $1, 172($sp) |
| 462 | ; MIPS64R5EB-NEXT: insert.h $w1[4], $1 |
| 463 | ; MIPS64R5EB-NEXT: lbu $1, 173($sp) |
| 464 | ; MIPS64R5EB-NEXT: insert.h $w1[5], $1 |
| 465 | ; MIPS64R5EB-NEXT: lbu $1, 175($sp) |
| 466 | ; MIPS64R5EB-NEXT: lbu $2, 174($sp) |
| 467 | ; MIPS64R5EB-NEXT: insert.h $w1[6], $2 |
| 468 | ; MIPS64R5EB-NEXT: insert.h $w1[7], $1 |
| 469 | ; MIPS64R5EB-NEXT: copy_s.h $1, $w1[0] |
| 470 | ; MIPS64R5EB-NEXT: copy_s.h $2, $w1[1] |
| 471 | ; MIPS64R5EB-NEXT: sd $5, 160($sp) |
| 472 | ; MIPS64R5EB-NEXT: lbu $3, 161($sp) |
| 473 | ; MIPS64R5EB-NEXT: lbu $4, 160($sp) |
| 474 | ; MIPS64R5EB-NEXT: move.v $w1, $w0 |
| 475 | ; MIPS64R5EB-NEXT: insert.h $w1[0], $4 |
| 476 | ; MIPS64R5EB-NEXT: insert.h $w1[1], $3 |
| 477 | ; MIPS64R5EB-NEXT: lbu $3, 162($sp) |
| 478 | ; MIPS64R5EB-NEXT: insert.h $w1[2], $3 |
| 479 | ; MIPS64R5EB-NEXT: lbu $3, 163($sp) |
| 480 | ; MIPS64R5EB-NEXT: insert.h $w1[3], $3 |
| 481 | ; MIPS64R5EB-NEXT: lbu $3, 164($sp) |
| 482 | ; MIPS64R5EB-NEXT: insert.h $w1[4], $3 |
| 483 | ; MIPS64R5EB-NEXT: lbu $3, 165($sp) |
| 484 | ; MIPS64R5EB-NEXT: insert.h $w1[5], $3 |
| 485 | ; MIPS64R5EB-NEXT: lbu $3, 167($sp) |
| 486 | ; MIPS64R5EB-NEXT: lbu $4, 166($sp) |
| 487 | ; MIPS64R5EB-NEXT: insert.h $w1[6], $4 |
| 488 | ; MIPS64R5EB-NEXT: insert.h $w1[7], $3 |
| 489 | ; MIPS64R5EB-NEXT: copy_s.h $3, $w1[0] |
| 490 | ; MIPS64R5EB-NEXT: copy_s.h $4, $w1[1] |
| 491 | ; MIPS64R5EB-NEXT: sw $4, 28($sp) |
| 492 | ; MIPS64R5EB-NEXT: sw $3, 20($sp) |
| 493 | ; MIPS64R5EB-NEXT: sw $2, 12($sp) |
| 494 | ; MIPS64R5EB-NEXT: sw $1, 4($sp) |
| 495 | ; MIPS64R5EB-NEXT: ld.d $w1, 16($sp) |
| 496 | ; MIPS64R5EB-NEXT: ld.d $w2, 0($sp) |
| 497 | ; MIPS64R5EB-NEXT: addv.d $w1, $w2, $w1 |
| 498 | ; MIPS64R5EB-NEXT: sd $6, 152($sp) |
| 499 | ; MIPS64R5EB-NEXT: lbu $1, 153($sp) |
| 500 | ; MIPS64R5EB-NEXT: lbu $2, 152($sp) |
| 501 | ; MIPS64R5EB-NEXT: move.v $w2, $w0 |
| 502 | ; MIPS64R5EB-NEXT: insert.h $w2[0], $2 |
| 503 | ; MIPS64R5EB-NEXT: insert.h $w2[1], $1 |
| 504 | ; MIPS64R5EB-NEXT: lbu $1, 154($sp) |
| 505 | ; MIPS64R5EB-NEXT: insert.h $w2[2], $1 |
| 506 | ; MIPS64R5EB-NEXT: lbu $1, 155($sp) |
| 507 | ; MIPS64R5EB-NEXT: insert.h $w2[3], $1 |
| 508 | ; MIPS64R5EB-NEXT: lbu $1, 156($sp) |
| 509 | ; MIPS64R5EB-NEXT: insert.h $w2[4], $1 |
| 510 | ; MIPS64R5EB-NEXT: lbu $1, 157($sp) |
| 511 | ; MIPS64R5EB-NEXT: insert.h $w2[5], $1 |
| 512 | ; MIPS64R5EB-NEXT: lbu $1, 159($sp) |
| 513 | ; MIPS64R5EB-NEXT: lbu $2, 158($sp) |
| 514 | ; MIPS64R5EB-NEXT: insert.h $w2[6], $2 |
| 515 | ; MIPS64R5EB-NEXT: insert.h $w2[7], $1 |
| 516 | ; MIPS64R5EB-NEXT: copy_s.h $1, $w2[0] |
| 517 | ; MIPS64R5EB-NEXT: copy_s.h $2, $w2[1] |
| 518 | ; MIPS64R5EB-NEXT: sw $2, 44($sp) |
| 519 | ; MIPS64R5EB-NEXT: sw $1, 36($sp) |
| 520 | ; MIPS64R5EB-NEXT: ld.d $w2, 32($sp) |
| 521 | ; MIPS64R5EB-NEXT: addv.d $w1, $w1, $w2 |
| 522 | ; MIPS64R5EB-NEXT: sd $7, 144($sp) |
| 523 | ; MIPS64R5EB-NEXT: lbu $1, 145($sp) |
| 524 | ; MIPS64R5EB-NEXT: lbu $2, 144($sp) |
| 525 | ; MIPS64R5EB-NEXT: move.v $w2, $w0 |
| 526 | ; MIPS64R5EB-NEXT: insert.h $w2[0], $2 |
| 527 | ; MIPS64R5EB-NEXT: insert.h $w2[1], $1 |
| 528 | ; MIPS64R5EB-NEXT: lbu $1, 146($sp) |
| 529 | ; MIPS64R5EB-NEXT: insert.h $w2[2], $1 |
| 530 | ; MIPS64R5EB-NEXT: lbu $1, 147($sp) |
| 531 | ; MIPS64R5EB-NEXT: insert.h $w2[3], $1 |
| 532 | ; MIPS64R5EB-NEXT: lbu $1, 148($sp) |
| 533 | ; MIPS64R5EB-NEXT: insert.h $w2[4], $1 |
| 534 | ; MIPS64R5EB-NEXT: lbu $1, 149($sp) |
| 535 | ; MIPS64R5EB-NEXT: insert.h $w2[5], $1 |
| 536 | ; MIPS64R5EB-NEXT: lbu $1, 151($sp) |
| 537 | ; MIPS64R5EB-NEXT: lbu $2, 150($sp) |
| 538 | ; MIPS64R5EB-NEXT: insert.h $w2[6], $2 |
| 539 | ; MIPS64R5EB-NEXT: insert.h $w2[7], $1 |
| 540 | ; MIPS64R5EB-NEXT: copy_s.h $1, $w2[0] |
| 541 | ; MIPS64R5EB-NEXT: copy_s.h $2, $w2[1] |
| 542 | ; MIPS64R5EB-NEXT: sw $2, 60($sp) |
| 543 | ; MIPS64R5EB-NEXT: sw $1, 52($sp) |
| 544 | ; MIPS64R5EB-NEXT: ld.d $w2, 48($sp) |
| 545 | ; MIPS64R5EB-NEXT: addv.d $w1, $w1, $w2 |
| 546 | ; MIPS64R5EB-NEXT: sd $8, 136($sp) |
| 547 | ; MIPS64R5EB-NEXT: lbu $1, 137($sp) |
| 548 | ; MIPS64R5EB-NEXT: lbu $2, 136($sp) |
| 549 | ; MIPS64R5EB-NEXT: move.v $w2, $w0 |
| 550 | ; MIPS64R5EB-NEXT: insert.h $w2[0], $2 |
| 551 | ; MIPS64R5EB-NEXT: insert.h $w2[1], $1 |
| 552 | ; MIPS64R5EB-NEXT: lbu $1, 138($sp) |
| 553 | ; MIPS64R5EB-NEXT: insert.h $w2[2], $1 |
| 554 | ; MIPS64R5EB-NEXT: lbu $1, 139($sp) |
| 555 | ; MIPS64R5EB-NEXT: insert.h $w2[3], $1 |
| 556 | ; MIPS64R5EB-NEXT: lbu $1, 140($sp) |
| 557 | ; MIPS64R5EB-NEXT: insert.h $w2[4], $1 |
| 558 | ; MIPS64R5EB-NEXT: lbu $1, 141($sp) |
| 559 | ; MIPS64R5EB-NEXT: insert.h $w2[5], $1 |
| 560 | ; MIPS64R5EB-NEXT: lbu $1, 143($sp) |
| 561 | ; MIPS64R5EB-NEXT: lbu $2, 142($sp) |
| 562 | ; MIPS64R5EB-NEXT: insert.h $w2[6], $2 |
| 563 | ; MIPS64R5EB-NEXT: insert.h $w2[7], $1 |
| 564 | ; MIPS64R5EB-NEXT: copy_s.h $1, $w2[0] |
| 565 | ; MIPS64R5EB-NEXT: copy_s.h $2, $w2[1] |
| 566 | ; MIPS64R5EB-NEXT: sd $10, 120($sp) |
| 567 | ; MIPS64R5EB-NEXT: lbu $3, 121($sp) |
| 568 | ; MIPS64R5EB-NEXT: lbu $4, 120($sp) |
| 569 | ; MIPS64R5EB-NEXT: move.v $w2, $w0 |
| 570 | ; MIPS64R5EB-NEXT: insert.h $w2[0], $4 |
| 571 | ; MIPS64R5EB-NEXT: insert.h $w2[1], $3 |
| 572 | ; MIPS64R5EB-NEXT: lbu $3, 122($sp) |
| 573 | ; MIPS64R5EB-NEXT: insert.h $w2[2], $3 |
| 574 | ; MIPS64R5EB-NEXT: lbu $3, 123($sp) |
| 575 | ; MIPS64R5EB-NEXT: insert.h $w2[3], $3 |
| 576 | ; MIPS64R5EB-NEXT: lbu $3, 124($sp) |
| 577 | ; MIPS64R5EB-NEXT: insert.h $w2[4], $3 |
| 578 | ; MIPS64R5EB-NEXT: lbu $3, 125($sp) |
| 579 | ; MIPS64R5EB-NEXT: insert.h $w2[5], $3 |
| 580 | ; MIPS64R5EB-NEXT: lbu $3, 127($sp) |
| 581 | ; MIPS64R5EB-NEXT: lbu $4, 126($sp) |
| 582 | ; MIPS64R5EB-NEXT: insert.h $w2[6], $4 |
| 583 | ; MIPS64R5EB-NEXT: insert.h $w2[7], $3 |
| 584 | ; MIPS64R5EB-NEXT: copy_s.h $3, $w2[0] |
| 585 | ; MIPS64R5EB-NEXT: copy_s.h $4, $w2[1] |
| 586 | ; MIPS64R5EB-NEXT: sw $2, 76($sp) |
| 587 | ; MIPS64R5EB-NEXT: sw $1, 68($sp) |
| 588 | ; MIPS64R5EB-NEXT: ld.d $w2, 64($sp) |
| 589 | ; MIPS64R5EB-NEXT: addv.d $w1, $w1, $w2 |
| 590 | ; MIPS64R5EB-NEXT: sd $9, 128($sp) |
| 591 | ; MIPS64R5EB-NEXT: lbu $1, 128($sp) |
| 592 | ; MIPS64R5EB-NEXT: insert.h $w0[0], $1 |
| 593 | ; MIPS64R5EB-NEXT: lbu $1, 129($sp) |
| 594 | ; MIPS64R5EB-NEXT: insert.h $w0[1], $1 |
| 595 | ; MIPS64R5EB-NEXT: lbu $1, 130($sp) |
| 596 | ; MIPS64R5EB-NEXT: insert.h $w0[2], $1 |
| 597 | ; MIPS64R5EB-NEXT: lbu $1, 131($sp) |
| 598 | ; MIPS64R5EB-NEXT: insert.h $w0[3], $1 |
| 599 | ; MIPS64R5EB-NEXT: lbu $1, 132($sp) |
| 600 | ; MIPS64R5EB-NEXT: insert.h $w0[4], $1 |
| 601 | ; MIPS64R5EB-NEXT: lbu $1, 133($sp) |
| 602 | ; MIPS64R5EB-NEXT: insert.h $w0[5], $1 |
| 603 | ; MIPS64R5EB-NEXT: lbu $1, 135($sp) |
| 604 | ; MIPS64R5EB-NEXT: lbu $2, 134($sp) |
| 605 | ; MIPS64R5EB-NEXT: insert.h $w0[6], $2 |
| 606 | ; MIPS64R5EB-NEXT: insert.h $w0[7], $1 |
| 607 | ; MIPS64R5EB-NEXT: copy_s.h $1, $w0[0] |
| 608 | ; MIPS64R5EB-NEXT: copy_s.h $2, $w0[1] |
| 609 | ; MIPS64R5EB-NEXT: sw $2, 92($sp) |
| 610 | ; MIPS64R5EB-NEXT: sw $1, 84($sp) |
| 611 | ; MIPS64R5EB-NEXT: ld.d $w0, 80($sp) |
| 612 | ; MIPS64R5EB-NEXT: addv.d $w0, $w1, $w0 |
| 613 | ; MIPS64R5EB-NEXT: sw $4, 108($sp) |
| 614 | ; MIPS64R5EB-NEXT: sw $3, 100($sp) |
| 615 | ; MIPS64R5EB-NEXT: ld.d $w1, 96($sp) |
| 616 | ; MIPS64R5EB-NEXT: addv.d $w0, $w0, $w1 |
| 617 | ; MIPS64R5EB-NEXT: copy_s.d $1, $w0[0] |
| 618 | ; MIPS64R5EB-NEXT: copy_s.d $2, $w0[1] |
| 619 | ; MIPS64R5EB-NEXT: sb $2, 117($sp) |
| 620 | ; MIPS64R5EB-NEXT: sb $1, 116($sp) |
| 621 | ; MIPS64R5EB-NEXT: lh $2, 116($sp) |
| 622 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, 176 |
| 623 | ; MIPS64R5EB-NEXT: jr $ra |
| 624 | ; MIPS64R5EB-NEXT: nop |
| 625 | ; |
| 626 | ; MIPS32EL-LABEL: i8x2_7: |
| 627 | ; MIPS32EL: # %bb.0: # %entry |
| 628 | ; MIPS32EL-NEXT: addu $1, $4, $5 |
| 629 | ; MIPS32EL-NEXT: addu $1, $1, $6 |
| 630 | ; MIPS32EL-NEXT: addu $1, $1, $7 |
| 631 | ; MIPS32EL-NEXT: andi $2, $5, 65280 |
| 632 | ; MIPS32EL-NEXT: lbu $3, 16($sp) |
| 633 | ; MIPS32EL-NEXT: addu $1, $1, $3 |
| 634 | ; MIPS32EL-NEXT: srl $2, $2, 8 |
| 635 | ; MIPS32EL-NEXT: andi $3, $4, 65280 |
| 636 | ; MIPS32EL-NEXT: srl $3, $3, 8 |
| 637 | ; MIPS32EL-NEXT: addu $2, $3, $2 |
| 638 | ; MIPS32EL-NEXT: andi $3, $6, 65280 |
| 639 | ; MIPS32EL-NEXT: srl $3, $3, 8 |
| 640 | ; MIPS32EL-NEXT: lbu $4, 20($sp) |
| 641 | ; MIPS32EL-NEXT: addu $2, $2, $3 |
| 642 | ; MIPS32EL-NEXT: addu $1, $1, $4 |
| 643 | ; MIPS32EL-NEXT: lbu $3, 24($sp) |
| 644 | ; MIPS32EL-NEXT: addu $1, $1, $3 |
| 645 | ; MIPS32EL-NEXT: andi $3, $7, 65280 |
| 646 | ; MIPS32EL-NEXT: srl $3, $3, 8 |
| 647 | ; MIPS32EL-NEXT: lbu $4, 25($sp) |
| 648 | ; MIPS32EL-NEXT: andi $1, $1, 255 |
| 649 | ; MIPS32EL-NEXT: addu $2, $2, $3 |
| 650 | ; MIPS32EL-NEXT: lbu $3, 17($sp) |
| 651 | ; MIPS32EL-NEXT: addu $2, $2, $3 |
| 652 | ; MIPS32EL-NEXT: lbu $3, 21($sp) |
| 653 | ; MIPS32EL-NEXT: addu $2, $2, $3 |
| 654 | ; MIPS32EL-NEXT: addu $2, $2, $4 |
| 655 | ; MIPS32EL-NEXT: sll $2, $2, 8 |
| 656 | ; MIPS32EL-NEXT: or $2, $1, $2 |
| 657 | ; MIPS32EL-NEXT: jr $ra |
| 658 | ; MIPS32EL-NEXT: nop |
| 659 | ; |
| 660 | ; MIPS64EL-LABEL: i8x2_7: |
| 661 | ; MIPS64EL: # %bb.0: # %entry |
| 662 | ; MIPS64EL-NEXT: sll $1, $5, 0 |
| 663 | ; MIPS64EL-NEXT: sll $2, $4, 0 |
| 664 | ; MIPS64EL-NEXT: addu $3, $2, $1 |
| 665 | ; MIPS64EL-NEXT: sll $4, $6, 0 |
| 666 | ; MIPS64EL-NEXT: andi $1, $1, 65280 |
| 667 | ; MIPS64EL-NEXT: srl $1, $1, 8 |
| 668 | ; MIPS64EL-NEXT: andi $2, $2, 65280 |
| 669 | ; MIPS64EL-NEXT: srl $2, $2, 8 |
| 670 | ; MIPS64EL-NEXT: addu $1, $2, $1 |
| 671 | ; MIPS64EL-NEXT: addu $2, $3, $4 |
| 672 | ; MIPS64EL-NEXT: sll $3, $7, 0 |
| 673 | ; MIPS64EL-NEXT: andi $5, $3, 65280 |
| 674 | ; MIPS64EL-NEXT: andi $4, $4, 65280 |
| 675 | ; MIPS64EL-NEXT: srl $4, $4, 8 |
| 676 | ; MIPS64EL-NEXT: addu $2, $2, $3 |
| 677 | ; MIPS64EL-NEXT: addu $1, $1, $4 |
| 678 | ; MIPS64EL-NEXT: srl $3, $5, 8 |
| 679 | ; MIPS64EL-NEXT: sll $4, $8, 0 |
| 680 | ; MIPS64EL-NEXT: andi $5, $4, 65280 |
| 681 | ; MIPS64EL-NEXT: srl $5, $5, 8 |
| 682 | ; MIPS64EL-NEXT: addu $1, $1, $3 |
| 683 | ; MIPS64EL-NEXT: addu $2, $2, $4 |
| 684 | ; MIPS64EL-NEXT: sll $3, $9, 0 |
| 685 | ; MIPS64EL-NEXT: addu $2, $2, $3 |
| 686 | ; MIPS64EL-NEXT: sll $4, $10, 0 |
| 687 | ; MIPS64EL-NEXT: addu $2, $2, $4 |
| 688 | ; MIPS64EL-NEXT: andi $2, $2, 255 |
| 689 | ; MIPS64EL-NEXT: addu $1, $1, $5 |
| 690 | ; MIPS64EL-NEXT: andi $3, $3, 65280 |
| 691 | ; MIPS64EL-NEXT: srl $3, $3, 8 |
| 692 | ; MIPS64EL-NEXT: addu $1, $1, $3 |
| 693 | ; MIPS64EL-NEXT: andi $3, $4, 65280 |
| 694 | ; MIPS64EL-NEXT: srl $3, $3, 8 |
| 695 | ; MIPS64EL-NEXT: addu $1, $1, $3 |
| 696 | ; MIPS64EL-NEXT: sll $1, $1, 8 |
| 697 | ; MIPS64EL-NEXT: or $2, $2, $1 |
| 698 | ; MIPS64EL-NEXT: jr $ra |
| 699 | ; MIPS64EL-NEXT: nop |
| 700 | ; |
| 701 | ; MIPS32R5EL-LABEL: i8x2_7: |
| 702 | ; MIPS32R5EL: # %bb.0: # %entry |
Simon Pilgrim | 80663ee | 2018-02-15 12:14:15 +0000 | [diff] [blame^] | 703 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, -144 |
| 704 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 144 |
| 705 | ; MIPS32R5EL-NEXT: sw $fp, 140($sp) # 4-byte Folded Spill |
| 706 | ; MIPS32R5EL-NEXT: .cfi_offset 30, -4 |
| 707 | ; MIPS32R5EL-NEXT: move $fp, $sp |
| 708 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 |
| 709 | ; MIPS32R5EL-NEXT: addiu $1, $zero, -16 |
| 710 | ; MIPS32R5EL-NEXT: and $sp, $sp, $1 |
| 711 | ; MIPS32R5EL-NEXT: sw $5, 132($sp) |
| 712 | ; MIPS32R5EL-NEXT: sw $4, 136($sp) |
| 713 | ; MIPS32R5EL-NEXT: lbu $1, 133($sp) |
| 714 | ; MIPS32R5EL-NEXT: sw $1, 68($sp) |
| 715 | ; MIPS32R5EL-NEXT: lbu $1, 132($sp) |
| 716 | ; MIPS32R5EL-NEXT: sw $1, 64($sp) |
| 717 | ; MIPS32R5EL-NEXT: lbu $1, 137($sp) |
| 718 | ; MIPS32R5EL-NEXT: sw $1, 52($sp) |
| 719 | ; MIPS32R5EL-NEXT: lbu $1, 136($sp) |
| 720 | ; MIPS32R5EL-NEXT: sw $1, 48($sp) |
| 721 | ; MIPS32R5EL-NEXT: ld.w $w0, 64($sp) |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 722 | ; MIPS32R5EL-NEXT: ilvr.w $w0, $w0, $w0 |
Simon Pilgrim | 80663ee | 2018-02-15 12:14:15 +0000 | [diff] [blame^] | 723 | ; MIPS32R5EL-NEXT: ld.w $w1, 48($sp) |
| 724 | ; MIPS32R5EL-NEXT: ilvr.w $w1, $w1, $w1 |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 725 | ; MIPS32R5EL-NEXT: addv.d $w0, $w1, $w0 |
Simon Pilgrim | 80663ee | 2018-02-15 12:14:15 +0000 | [diff] [blame^] | 726 | ; MIPS32R5EL-NEXT: sw $6, 128($sp) |
| 727 | ; MIPS32R5EL-NEXT: lbu $1, 129($sp) |
| 728 | ; MIPS32R5EL-NEXT: sw $1, 84($sp) |
| 729 | ; MIPS32R5EL-NEXT: lbu $1, 128($sp) |
| 730 | ; MIPS32R5EL-NEXT: sw $1, 80($sp) |
| 731 | ; MIPS32R5EL-NEXT: ld.w $w1, 80($sp) |
| 732 | ; MIPS32R5EL-NEXT: ilvr.w $w1, $w1, $w1 |
| 733 | ; MIPS32R5EL-NEXT: addv.d $w0, $w0, $w1 |
| 734 | ; MIPS32R5EL-NEXT: sw $7, 124($sp) |
| 735 | ; MIPS32R5EL-NEXT: lbu $1, 125($sp) |
| 736 | ; MIPS32R5EL-NEXT: sw $1, 100($sp) |
| 737 | ; MIPS32R5EL-NEXT: lbu $1, 124($sp) |
| 738 | ; MIPS32R5EL-NEXT: sw $1, 96($sp) |
| 739 | ; MIPS32R5EL-NEXT: ld.w $w1, 96($sp) |
| 740 | ; MIPS32R5EL-NEXT: ilvr.w $w1, $w1, $w1 |
| 741 | ; MIPS32R5EL-NEXT: addv.d $w0, $w0, $w1 |
| 742 | ; MIPS32R5EL-NEXT: lbu $1, 161($fp) |
| 743 | ; MIPS32R5EL-NEXT: sw $1, 4($sp) |
| 744 | ; MIPS32R5EL-NEXT: lbu $1, 160($fp) |
| 745 | ; MIPS32R5EL-NEXT: sw $1, 0($sp) |
| 746 | ; MIPS32R5EL-NEXT: ld.w $w1, 0($sp) |
| 747 | ; MIPS32R5EL-NEXT: ilvr.w $w1, $w1, $w1 |
| 748 | ; MIPS32R5EL-NEXT: addv.d $w0, $w0, $w1 |
| 749 | ; MIPS32R5EL-NEXT: lbu $1, 165($fp) |
| 750 | ; MIPS32R5EL-NEXT: sw $1, 20($sp) |
| 751 | ; MIPS32R5EL-NEXT: lbu $1, 164($fp) |
| 752 | ; MIPS32R5EL-NEXT: sw $1, 16($sp) |
| 753 | ; MIPS32R5EL-NEXT: ld.w $w1, 16($sp) |
| 754 | ; MIPS32R5EL-NEXT: ilvr.w $w1, $w1, $w1 |
| 755 | ; MIPS32R5EL-NEXT: addv.d $w0, $w0, $w1 |
| 756 | ; MIPS32R5EL-NEXT: lbu $1, 169($fp) |
| 757 | ; MIPS32R5EL-NEXT: sw $1, 36($sp) |
| 758 | ; MIPS32R5EL-NEXT: lbu $1, 168($fp) |
| 759 | ; MIPS32R5EL-NEXT: sw $1, 32($sp) |
| 760 | ; MIPS32R5EL-NEXT: ld.w $w1, 32($sp) |
| 761 | ; MIPS32R5EL-NEXT: ilvr.w $w1, $w1, $w1 |
| 762 | ; MIPS32R5EL-NEXT: addv.d $w0, $w0, $w1 |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 763 | ; MIPS32R5EL-NEXT: copy_s.w $1, $w0[0] |
| 764 | ; MIPS32R5EL-NEXT: copy_s.w $2, $w0[2] |
Simon Pilgrim | 80663ee | 2018-02-15 12:14:15 +0000 | [diff] [blame^] | 765 | ; MIPS32R5EL-NEXT: sb $2, 121($sp) |
| 766 | ; MIPS32R5EL-NEXT: sb $1, 120($sp) |
| 767 | ; MIPS32R5EL-NEXT: lhu $2, 120($sp) |
| 768 | ; MIPS32R5EL-NEXT: move $sp, $fp |
| 769 | ; MIPS32R5EL-NEXT: lw $fp, 140($sp) # 4-byte Folded Reload |
| 770 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, 144 |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 771 | ; MIPS32R5EL-NEXT: jr $ra |
| 772 | ; MIPS32R5EL-NEXT: nop |
| 773 | ; |
| 774 | ; MIPS64R5EL-LABEL: i8x2_7: |
| 775 | ; MIPS64R5EL: # %bb.0: # %entry |
| 776 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, -176 |
| 777 | ; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 176 |
| 778 | ; MIPS64R5EL-NEXT: sd $4, 168($sp) |
| 779 | ; MIPS64R5EL-NEXT: ldi.b $w0, 0 |
| 780 | ; MIPS64R5EL-NEXT: lbu $1, 169($sp) |
| 781 | ; MIPS64R5EL-NEXT: lbu $2, 168($sp) |
| 782 | ; MIPS64R5EL-NEXT: move.v $w1, $w0 |
| 783 | ; MIPS64R5EL-NEXT: insert.h $w1[0], $2 |
| 784 | ; MIPS64R5EL-NEXT: insert.h $w1[1], $1 |
| 785 | ; MIPS64R5EL-NEXT: lbu $1, 170($sp) |
| 786 | ; MIPS64R5EL-NEXT: insert.h $w1[2], $1 |
| 787 | ; MIPS64R5EL-NEXT: lbu $1, 171($sp) |
| 788 | ; MIPS64R5EL-NEXT: insert.h $w1[3], $1 |
| 789 | ; MIPS64R5EL-NEXT: lbu $1, 172($sp) |
| 790 | ; MIPS64R5EL-NEXT: insert.h $w1[4], $1 |
| 791 | ; MIPS64R5EL-NEXT: lbu $1, 173($sp) |
| 792 | ; MIPS64R5EL-NEXT: insert.h $w1[5], $1 |
| 793 | ; MIPS64R5EL-NEXT: lbu $1, 175($sp) |
| 794 | ; MIPS64R5EL-NEXT: lbu $2, 174($sp) |
| 795 | ; MIPS64R5EL-NEXT: insert.h $w1[6], $2 |
| 796 | ; MIPS64R5EL-NEXT: insert.h $w1[7], $1 |
| 797 | ; MIPS64R5EL-NEXT: copy_s.h $1, $w1[0] |
| 798 | ; MIPS64R5EL-NEXT: copy_s.h $2, $w1[1] |
| 799 | ; MIPS64R5EL-NEXT: sd $5, 160($sp) |
| 800 | ; MIPS64R5EL-NEXT: lbu $3, 161($sp) |
| 801 | ; MIPS64R5EL-NEXT: lbu $4, 160($sp) |
| 802 | ; MIPS64R5EL-NEXT: move.v $w1, $w0 |
| 803 | ; MIPS64R5EL-NEXT: insert.h $w1[0], $4 |
| 804 | ; MIPS64R5EL-NEXT: insert.h $w1[1], $3 |
| 805 | ; MIPS64R5EL-NEXT: lbu $3, 162($sp) |
| 806 | ; MIPS64R5EL-NEXT: insert.h $w1[2], $3 |
| 807 | ; MIPS64R5EL-NEXT: lbu $3, 163($sp) |
| 808 | ; MIPS64R5EL-NEXT: insert.h $w1[3], $3 |
| 809 | ; MIPS64R5EL-NEXT: lbu $3, 164($sp) |
| 810 | ; MIPS64R5EL-NEXT: insert.h $w1[4], $3 |
| 811 | ; MIPS64R5EL-NEXT: lbu $3, 165($sp) |
| 812 | ; MIPS64R5EL-NEXT: insert.h $w1[5], $3 |
| 813 | ; MIPS64R5EL-NEXT: lbu $3, 167($sp) |
| 814 | ; MIPS64R5EL-NEXT: lbu $4, 166($sp) |
| 815 | ; MIPS64R5EL-NEXT: insert.h $w1[6], $4 |
| 816 | ; MIPS64R5EL-NEXT: insert.h $w1[7], $3 |
| 817 | ; MIPS64R5EL-NEXT: copy_s.h $3, $w1[0] |
| 818 | ; MIPS64R5EL-NEXT: copy_s.h $4, $w1[1] |
| 819 | ; MIPS64R5EL-NEXT: sw $4, 24($sp) |
| 820 | ; MIPS64R5EL-NEXT: sw $3, 16($sp) |
| 821 | ; MIPS64R5EL-NEXT: sw $2, 8($sp) |
| 822 | ; MIPS64R5EL-NEXT: sw $1, 0($sp) |
| 823 | ; MIPS64R5EL-NEXT: ld.d $w1, 16($sp) |
| 824 | ; MIPS64R5EL-NEXT: ld.d $w2, 0($sp) |
| 825 | ; MIPS64R5EL-NEXT: addv.d $w1, $w2, $w1 |
| 826 | ; MIPS64R5EL-NEXT: sd $6, 152($sp) |
| 827 | ; MIPS64R5EL-NEXT: lbu $1, 153($sp) |
| 828 | ; MIPS64R5EL-NEXT: lbu $2, 152($sp) |
| 829 | ; MIPS64R5EL-NEXT: move.v $w2, $w0 |
| 830 | ; MIPS64R5EL-NEXT: insert.h $w2[0], $2 |
| 831 | ; MIPS64R5EL-NEXT: insert.h $w2[1], $1 |
| 832 | ; MIPS64R5EL-NEXT: lbu $1, 154($sp) |
| 833 | ; MIPS64R5EL-NEXT: insert.h $w2[2], $1 |
| 834 | ; MIPS64R5EL-NEXT: lbu $1, 155($sp) |
| 835 | ; MIPS64R5EL-NEXT: insert.h $w2[3], $1 |
| 836 | ; MIPS64R5EL-NEXT: lbu $1, 156($sp) |
| 837 | ; MIPS64R5EL-NEXT: insert.h $w2[4], $1 |
| 838 | ; MIPS64R5EL-NEXT: lbu $1, 157($sp) |
| 839 | ; MIPS64R5EL-NEXT: insert.h $w2[5], $1 |
| 840 | ; MIPS64R5EL-NEXT: lbu $1, 159($sp) |
| 841 | ; MIPS64R5EL-NEXT: lbu $2, 158($sp) |
| 842 | ; MIPS64R5EL-NEXT: insert.h $w2[6], $2 |
| 843 | ; MIPS64R5EL-NEXT: insert.h $w2[7], $1 |
| 844 | ; MIPS64R5EL-NEXT: copy_s.h $1, $w2[0] |
| 845 | ; MIPS64R5EL-NEXT: copy_s.h $2, $w2[1] |
| 846 | ; MIPS64R5EL-NEXT: sw $2, 40($sp) |
| 847 | ; MIPS64R5EL-NEXT: sw $1, 32($sp) |
| 848 | ; MIPS64R5EL-NEXT: ld.d $w2, 32($sp) |
| 849 | ; MIPS64R5EL-NEXT: addv.d $w1, $w1, $w2 |
| 850 | ; MIPS64R5EL-NEXT: sd $7, 144($sp) |
| 851 | ; MIPS64R5EL-NEXT: lbu $1, 145($sp) |
| 852 | ; MIPS64R5EL-NEXT: lbu $2, 144($sp) |
| 853 | ; MIPS64R5EL-NEXT: move.v $w2, $w0 |
| 854 | ; MIPS64R5EL-NEXT: insert.h $w2[0], $2 |
| 855 | ; MIPS64R5EL-NEXT: insert.h $w2[1], $1 |
| 856 | ; MIPS64R5EL-NEXT: lbu $1, 146($sp) |
| 857 | ; MIPS64R5EL-NEXT: insert.h $w2[2], $1 |
| 858 | ; MIPS64R5EL-NEXT: lbu $1, 147($sp) |
| 859 | ; MIPS64R5EL-NEXT: insert.h $w2[3], $1 |
| 860 | ; MIPS64R5EL-NEXT: lbu $1, 148($sp) |
| 861 | ; MIPS64R5EL-NEXT: insert.h $w2[4], $1 |
| 862 | ; MIPS64R5EL-NEXT: lbu $1, 149($sp) |
| 863 | ; MIPS64R5EL-NEXT: insert.h $w2[5], $1 |
| 864 | ; MIPS64R5EL-NEXT: lbu $1, 151($sp) |
| 865 | ; MIPS64R5EL-NEXT: lbu $2, 150($sp) |
| 866 | ; MIPS64R5EL-NEXT: insert.h $w2[6], $2 |
| 867 | ; MIPS64R5EL-NEXT: insert.h $w2[7], $1 |
| 868 | ; MIPS64R5EL-NEXT: copy_s.h $1, $w2[0] |
| 869 | ; MIPS64R5EL-NEXT: copy_s.h $2, $w2[1] |
| 870 | ; MIPS64R5EL-NEXT: sw $2, 56($sp) |
| 871 | ; MIPS64R5EL-NEXT: sw $1, 48($sp) |
| 872 | ; MIPS64R5EL-NEXT: ld.d $w2, 48($sp) |
| 873 | ; MIPS64R5EL-NEXT: addv.d $w1, $w1, $w2 |
| 874 | ; MIPS64R5EL-NEXT: sd $8, 136($sp) |
| 875 | ; MIPS64R5EL-NEXT: lbu $1, 137($sp) |
| 876 | ; MIPS64R5EL-NEXT: lbu $2, 136($sp) |
| 877 | ; MIPS64R5EL-NEXT: move.v $w2, $w0 |
| 878 | ; MIPS64R5EL-NEXT: insert.h $w2[0], $2 |
| 879 | ; MIPS64R5EL-NEXT: insert.h $w2[1], $1 |
| 880 | ; MIPS64R5EL-NEXT: lbu $1, 138($sp) |
| 881 | ; MIPS64R5EL-NEXT: insert.h $w2[2], $1 |
| 882 | ; MIPS64R5EL-NEXT: lbu $1, 139($sp) |
| 883 | ; MIPS64R5EL-NEXT: insert.h $w2[3], $1 |
| 884 | ; MIPS64R5EL-NEXT: lbu $1, 140($sp) |
| 885 | ; MIPS64R5EL-NEXT: insert.h $w2[4], $1 |
| 886 | ; MIPS64R5EL-NEXT: lbu $1, 141($sp) |
| 887 | ; MIPS64R5EL-NEXT: insert.h $w2[5], $1 |
| 888 | ; MIPS64R5EL-NEXT: lbu $1, 143($sp) |
| 889 | ; MIPS64R5EL-NEXT: lbu $2, 142($sp) |
| 890 | ; MIPS64R5EL-NEXT: insert.h $w2[6], $2 |
| 891 | ; MIPS64R5EL-NEXT: insert.h $w2[7], $1 |
| 892 | ; MIPS64R5EL-NEXT: copy_s.h $1, $w2[0] |
| 893 | ; MIPS64R5EL-NEXT: copy_s.h $2, $w2[1] |
| 894 | ; MIPS64R5EL-NEXT: sd $10, 120($sp) |
| 895 | ; MIPS64R5EL-NEXT: lbu $3, 121($sp) |
| 896 | ; MIPS64R5EL-NEXT: lbu $4, 120($sp) |
| 897 | ; MIPS64R5EL-NEXT: move.v $w2, $w0 |
| 898 | ; MIPS64R5EL-NEXT: insert.h $w2[0], $4 |
| 899 | ; MIPS64R5EL-NEXT: insert.h $w2[1], $3 |
| 900 | ; MIPS64R5EL-NEXT: lbu $3, 122($sp) |
| 901 | ; MIPS64R5EL-NEXT: insert.h $w2[2], $3 |
| 902 | ; MIPS64R5EL-NEXT: lbu $3, 123($sp) |
| 903 | ; MIPS64R5EL-NEXT: insert.h $w2[3], $3 |
| 904 | ; MIPS64R5EL-NEXT: lbu $3, 124($sp) |
| 905 | ; MIPS64R5EL-NEXT: insert.h $w2[4], $3 |
| 906 | ; MIPS64R5EL-NEXT: lbu $3, 125($sp) |
| 907 | ; MIPS64R5EL-NEXT: insert.h $w2[5], $3 |
| 908 | ; MIPS64R5EL-NEXT: lbu $3, 127($sp) |
| 909 | ; MIPS64R5EL-NEXT: lbu $4, 126($sp) |
| 910 | ; MIPS64R5EL-NEXT: insert.h $w2[6], $4 |
| 911 | ; MIPS64R5EL-NEXT: insert.h $w2[7], $3 |
| 912 | ; MIPS64R5EL-NEXT: copy_s.h $3, $w2[0] |
| 913 | ; MIPS64R5EL-NEXT: copy_s.h $4, $w2[1] |
| 914 | ; MIPS64R5EL-NEXT: sw $2, 72($sp) |
| 915 | ; MIPS64R5EL-NEXT: sw $1, 64($sp) |
| 916 | ; MIPS64R5EL-NEXT: ld.d $w2, 64($sp) |
| 917 | ; MIPS64R5EL-NEXT: addv.d $w1, $w1, $w2 |
| 918 | ; MIPS64R5EL-NEXT: sd $9, 128($sp) |
| 919 | ; MIPS64R5EL-NEXT: lbu $1, 128($sp) |
| 920 | ; MIPS64R5EL-NEXT: insert.h $w0[0], $1 |
| 921 | ; MIPS64R5EL-NEXT: lbu $1, 129($sp) |
| 922 | ; MIPS64R5EL-NEXT: insert.h $w0[1], $1 |
| 923 | ; MIPS64R5EL-NEXT: lbu $1, 130($sp) |
| 924 | ; MIPS64R5EL-NEXT: insert.h $w0[2], $1 |
| 925 | ; MIPS64R5EL-NEXT: lbu $1, 131($sp) |
| 926 | ; MIPS64R5EL-NEXT: insert.h $w0[3], $1 |
| 927 | ; MIPS64R5EL-NEXT: lbu $1, 132($sp) |
| 928 | ; MIPS64R5EL-NEXT: insert.h $w0[4], $1 |
| 929 | ; MIPS64R5EL-NEXT: lbu $1, 133($sp) |
| 930 | ; MIPS64R5EL-NEXT: insert.h $w0[5], $1 |
| 931 | ; MIPS64R5EL-NEXT: lbu $1, 135($sp) |
| 932 | ; MIPS64R5EL-NEXT: lbu $2, 134($sp) |
| 933 | ; MIPS64R5EL-NEXT: insert.h $w0[6], $2 |
| 934 | ; MIPS64R5EL-NEXT: insert.h $w0[7], $1 |
| 935 | ; MIPS64R5EL-NEXT: copy_s.h $1, $w0[0] |
| 936 | ; MIPS64R5EL-NEXT: copy_s.h $2, $w0[1] |
| 937 | ; MIPS64R5EL-NEXT: sw $2, 88($sp) |
| 938 | ; MIPS64R5EL-NEXT: sw $1, 80($sp) |
| 939 | ; MIPS64R5EL-NEXT: ld.d $w0, 80($sp) |
| 940 | ; MIPS64R5EL-NEXT: addv.d $w0, $w1, $w0 |
| 941 | ; MIPS64R5EL-NEXT: sw $4, 104($sp) |
| 942 | ; MIPS64R5EL-NEXT: sw $3, 96($sp) |
| 943 | ; MIPS64R5EL-NEXT: ld.d $w1, 96($sp) |
| 944 | ; MIPS64R5EL-NEXT: addv.d $w0, $w0, $w1 |
| 945 | ; MIPS64R5EL-NEXT: copy_s.d $1, $w0[0] |
| 946 | ; MIPS64R5EL-NEXT: copy_s.d $2, $w0[1] |
| 947 | ; MIPS64R5EL-NEXT: sb $2, 117($sp) |
| 948 | ; MIPS64R5EL-NEXT: sb $1, 116($sp) |
| 949 | ; MIPS64R5EL-NEXT: lh $2, 116($sp) |
| 950 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, 176 |
| 951 | ; MIPS64R5EL-NEXT: jr $ra |
| 952 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 953 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 954 | %0 = add <2 x i8> %a, %b |
| 955 | %1 = add <2 x i8> %0, %c |
| 956 | %2 = add <2 x i8> %1, %d |
| 957 | %3 = add <2 x i8> %2, %e |
| 958 | %4 = add <2 x i8> %3, %f |
| 959 | %5 = add <2 x i8> %4, %g |
| 960 | ret <2 x i8> %5 |
| 961 | } |
| 962 | |
| 963 | define <4 x i8> @i8_4(<4 x i8> %a, <4 x i8> %b) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 964 | ; MIPS32-LABEL: i8_4: |
| 965 | ; MIPS32: # %bb.0: |
| 966 | ; MIPS32-NEXT: srl $1, $5, 24 |
| 967 | ; MIPS32-NEXT: srl $2, $4, 24 |
| 968 | ; MIPS32-NEXT: addu $1, $2, $1 |
| 969 | ; MIPS32-NEXT: sll $1, $1, 8 |
| 970 | ; MIPS32-NEXT: srl $2, $5, 16 |
| 971 | ; MIPS32-NEXT: srl $3, $4, 16 |
| 972 | ; MIPS32-NEXT: addu $2, $3, $2 |
| 973 | ; MIPS32-NEXT: andi $2, $2, 255 |
| 974 | ; MIPS32-NEXT: or $1, $2, $1 |
| 975 | ; MIPS32-NEXT: addu $2, $4, $5 |
| 976 | ; MIPS32-NEXT: sll $1, $1, 16 |
| 977 | ; MIPS32-NEXT: andi $2, $2, 255 |
| 978 | ; MIPS32-NEXT: srl $3, $5, 8 |
| 979 | ; MIPS32-NEXT: srl $4, $4, 8 |
| 980 | ; MIPS32-NEXT: addu $3, $4, $3 |
| 981 | ; MIPS32-NEXT: sll $3, $3, 8 |
| 982 | ; MIPS32-NEXT: or $2, $2, $3 |
| 983 | ; MIPS32-NEXT: andi $2, $2, 65535 |
| 984 | ; MIPS32-NEXT: or $2, $2, $1 |
| 985 | ; MIPS32-NEXT: jr $ra |
| 986 | ; MIPS32-NEXT: nop |
| 987 | ; |
| 988 | ; MIPS64-LABEL: i8_4: |
| 989 | ; MIPS64: # %bb.0: |
| 990 | ; MIPS64-NEXT: sll $1, $5, 0 |
| 991 | ; MIPS64-NEXT: srl $2, $1, 24 |
| 992 | ; MIPS64-NEXT: sll $3, $4, 0 |
| 993 | ; MIPS64-NEXT: srl $4, $3, 24 |
| 994 | ; MIPS64-NEXT: addu $2, $4, $2 |
| 995 | ; MIPS64-NEXT: sll $2, $2, 8 |
| 996 | ; MIPS64-NEXT: srl $4, $1, 16 |
| 997 | ; MIPS64-NEXT: srl $5, $3, 16 |
| 998 | ; MIPS64-NEXT: addu $4, $5, $4 |
| 999 | ; MIPS64-NEXT: andi $4, $4, 255 |
| 1000 | ; MIPS64-NEXT: or $2, $4, $2 |
| 1001 | ; MIPS64-NEXT: addu $4, $3, $1 |
| 1002 | ; MIPS64-NEXT: sll $2, $2, 16 |
| 1003 | ; MIPS64-NEXT: andi $4, $4, 255 |
| 1004 | ; MIPS64-NEXT: srl $1, $1, 8 |
| 1005 | ; MIPS64-NEXT: srl $3, $3, 8 |
| 1006 | ; MIPS64-NEXT: addu $1, $3, $1 |
| 1007 | ; MIPS64-NEXT: sll $1, $1, 8 |
| 1008 | ; MIPS64-NEXT: or $1, $4, $1 |
| 1009 | ; MIPS64-NEXT: andi $1, $1, 65535 |
| 1010 | ; MIPS64-NEXT: or $2, $1, $2 |
| 1011 | ; MIPS64-NEXT: jr $ra |
| 1012 | ; MIPS64-NEXT: nop |
| 1013 | ; |
| 1014 | ; MIPS32R5-LABEL: i8_4: |
| 1015 | ; MIPS32R5: # %bb.0: |
| 1016 | ; MIPS32R5-NEXT: addiu $sp, $sp, -16 |
| 1017 | ; MIPS32R5-NEXT: .cfi_def_cfa_offset 16 |
| 1018 | ; MIPS32R5-NEXT: sw $5, 8($sp) |
| 1019 | ; MIPS32R5-NEXT: sw $4, 12($sp) |
| 1020 | ; MIPS32R5-NEXT: ldi.b $w0, 0 |
| 1021 | ; MIPS32R5-NEXT: lbu $1, 9($sp) |
| 1022 | ; MIPS32R5-NEXT: lbu $2, 8($sp) |
| 1023 | ; MIPS32R5-NEXT: move.v $w1, $w0 |
| 1024 | ; MIPS32R5-NEXT: insert.w $w1[0], $2 |
| 1025 | ; MIPS32R5-NEXT: insert.w $w1[1], $1 |
| 1026 | ; MIPS32R5-NEXT: lbu $1, 10($sp) |
| 1027 | ; MIPS32R5-NEXT: insert.w $w1[2], $1 |
| 1028 | ; MIPS32R5-NEXT: lbu $1, 12($sp) |
| 1029 | ; MIPS32R5-NEXT: lbu $2, 11($sp) |
| 1030 | ; MIPS32R5-NEXT: insert.w $w1[3], $2 |
| 1031 | ; MIPS32R5-NEXT: insert.w $w0[0], $1 |
| 1032 | ; MIPS32R5-NEXT: lbu $1, 13($sp) |
| 1033 | ; MIPS32R5-NEXT: insert.w $w0[1], $1 |
| 1034 | ; MIPS32R5-NEXT: lbu $1, 14($sp) |
| 1035 | ; MIPS32R5-NEXT: insert.w $w0[2], $1 |
| 1036 | ; MIPS32R5-NEXT: lbu $1, 15($sp) |
| 1037 | ; MIPS32R5-NEXT: insert.w $w0[3], $1 |
| 1038 | ; MIPS32R5-NEXT: addv.w $w0, $w0, $w1 |
| 1039 | ; MIPS32R5-NEXT: copy_s.w $1, $w0[0] |
| 1040 | ; MIPS32R5-NEXT: copy_s.w $2, $w0[1] |
| 1041 | ; MIPS32R5-NEXT: copy_s.w $3, $w0[2] |
| 1042 | ; MIPS32R5-NEXT: copy_s.w $4, $w0[3] |
| 1043 | ; MIPS32R5-NEXT: sb $4, 7($sp) |
| 1044 | ; MIPS32R5-NEXT: sb $3, 6($sp) |
| 1045 | ; MIPS32R5-NEXT: sb $2, 5($sp) |
| 1046 | ; MIPS32R5-NEXT: sb $1, 4($sp) |
| 1047 | ; MIPS32R5-NEXT: lw $2, 4($sp) |
| 1048 | ; MIPS32R5-NEXT: addiu $sp, $sp, 16 |
| 1049 | ; MIPS32R5-NEXT: jr $ra |
| 1050 | ; MIPS32R5-NEXT: nop |
| 1051 | ; |
| 1052 | ; MIPS64R5-LABEL: i8_4: |
| 1053 | ; MIPS64R5: # %bb.0: |
| 1054 | ; MIPS64R5-NEXT: daddiu $sp, $sp, -16 |
| 1055 | ; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 |
| 1056 | ; MIPS64R5-NEXT: sll $1, $5, 0 |
| 1057 | ; MIPS64R5-NEXT: sw $1, 8($sp) |
| 1058 | ; MIPS64R5-NEXT: sll $1, $4, 0 |
| 1059 | ; MIPS64R5-NEXT: sw $1, 12($sp) |
| 1060 | ; MIPS64R5-NEXT: ldi.b $w0, 0 |
| 1061 | ; MIPS64R5-NEXT: lbu $1, 9($sp) |
| 1062 | ; MIPS64R5-NEXT: lbu $2, 8($sp) |
| 1063 | ; MIPS64R5-NEXT: move.v $w1, $w0 |
| 1064 | ; MIPS64R5-NEXT: insert.w $w1[0], $2 |
| 1065 | ; MIPS64R5-NEXT: insert.w $w1[1], $1 |
| 1066 | ; MIPS64R5-NEXT: lbu $1, 10($sp) |
| 1067 | ; MIPS64R5-NEXT: insert.w $w1[2], $1 |
| 1068 | ; MIPS64R5-NEXT: lbu $1, 12($sp) |
| 1069 | ; MIPS64R5-NEXT: lbu $2, 11($sp) |
| 1070 | ; MIPS64R5-NEXT: insert.w $w1[3], $2 |
| 1071 | ; MIPS64R5-NEXT: insert.w $w0[0], $1 |
| 1072 | ; MIPS64R5-NEXT: lbu $1, 13($sp) |
| 1073 | ; MIPS64R5-NEXT: insert.w $w0[1], $1 |
| 1074 | ; MIPS64R5-NEXT: lbu $1, 14($sp) |
| 1075 | ; MIPS64R5-NEXT: insert.w $w0[2], $1 |
| 1076 | ; MIPS64R5-NEXT: lbu $1, 15($sp) |
| 1077 | ; MIPS64R5-NEXT: insert.w $w0[3], $1 |
| 1078 | ; MIPS64R5-NEXT: addv.w $w0, $w0, $w1 |
| 1079 | ; MIPS64R5-NEXT: copy_s.w $1, $w0[0] |
| 1080 | ; MIPS64R5-NEXT: copy_s.w $2, $w0[1] |
| 1081 | ; MIPS64R5-NEXT: copy_s.w $3, $w0[2] |
| 1082 | ; MIPS64R5-NEXT: copy_s.w $4, $w0[3] |
| 1083 | ; MIPS64R5-NEXT: sb $4, 7($sp) |
| 1084 | ; MIPS64R5-NEXT: sb $3, 6($sp) |
| 1085 | ; MIPS64R5-NEXT: sb $2, 5($sp) |
| 1086 | ; MIPS64R5-NEXT: sb $1, 4($sp) |
| 1087 | ; MIPS64R5-NEXT: lw $2, 4($sp) |
| 1088 | ; MIPS64R5-NEXT: daddiu $sp, $sp, 16 |
| 1089 | ; MIPS64R5-NEXT: jr $ra |
| 1090 | ; MIPS64R5-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 1091 | %1 = add <4 x i8> %a, %b |
| 1092 | ret <4 x i8> %1 |
| 1093 | } |
| 1094 | |
| 1095 | define <8 x i8> @i8_8(<8 x i8> %a, <8 x i8> %b) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 1096 | ; MIPS32-LABEL: i8_8: |
| 1097 | ; MIPS32: # %bb.0: |
| 1098 | ; MIPS32-NEXT: srl $1, $6, 24 |
| 1099 | ; MIPS32-NEXT: srl $2, $4, 24 |
| 1100 | ; MIPS32-NEXT: addu $1, $2, $1 |
| 1101 | ; MIPS32-NEXT: sll $1, $1, 8 |
| 1102 | ; MIPS32-NEXT: srl $2, $6, 16 |
| 1103 | ; MIPS32-NEXT: srl $3, $4, 16 |
| 1104 | ; MIPS32-NEXT: addu $2, $3, $2 |
| 1105 | ; MIPS32-NEXT: andi $2, $2, 255 |
| 1106 | ; MIPS32-NEXT: srl $3, $7, 24 |
| 1107 | ; MIPS32-NEXT: srl $8, $5, 24 |
| 1108 | ; MIPS32-NEXT: or $1, $2, $1 |
| 1109 | ; MIPS32-NEXT: addu $2, $8, $3 |
| 1110 | ; MIPS32-NEXT: addu $3, $4, $6 |
| 1111 | ; MIPS32-NEXT: sll $2, $2, 8 |
| 1112 | ; MIPS32-NEXT: srl $8, $7, 16 |
| 1113 | ; MIPS32-NEXT: srl $9, $5, 16 |
| 1114 | ; MIPS32-NEXT: addu $8, $9, $8 |
| 1115 | ; MIPS32-NEXT: andi $8, $8, 255 |
| 1116 | ; MIPS32-NEXT: or $8, $8, $2 |
| 1117 | ; MIPS32-NEXT: sll $1, $1, 16 |
| 1118 | ; MIPS32-NEXT: andi $2, $3, 255 |
| 1119 | ; MIPS32-NEXT: srl $3, $6, 8 |
| 1120 | ; MIPS32-NEXT: srl $4, $4, 8 |
| 1121 | ; MIPS32-NEXT: addu $3, $4, $3 |
| 1122 | ; MIPS32-NEXT: sll $3, $3, 8 |
| 1123 | ; MIPS32-NEXT: or $2, $2, $3 |
| 1124 | ; MIPS32-NEXT: andi $2, $2, 65535 |
| 1125 | ; MIPS32-NEXT: addu $3, $5, $7 |
| 1126 | ; MIPS32-NEXT: or $2, $2, $1 |
| 1127 | ; MIPS32-NEXT: sll $1, $8, 16 |
| 1128 | ; MIPS32-NEXT: andi $3, $3, 255 |
| 1129 | ; MIPS32-NEXT: srl $4, $7, 8 |
| 1130 | ; MIPS32-NEXT: srl $5, $5, 8 |
| 1131 | ; MIPS32-NEXT: addu $4, $5, $4 |
| 1132 | ; MIPS32-NEXT: sll $4, $4, 8 |
| 1133 | ; MIPS32-NEXT: or $3, $3, $4 |
| 1134 | ; MIPS32-NEXT: andi $3, $3, 65535 |
| 1135 | ; MIPS32-NEXT: or $3, $3, $1 |
| 1136 | ; MIPS32-NEXT: jr $ra |
| 1137 | ; MIPS32-NEXT: nop |
| 1138 | ; |
| 1139 | ; MIPS64-LABEL: i8_8: |
| 1140 | ; MIPS64: # %bb.0: |
| 1141 | ; MIPS64-NEXT: dsrl $1, $5, 56 |
| 1142 | ; MIPS64-NEXT: sll $1, $1, 0 |
| 1143 | ; MIPS64-NEXT: dsrl $2, $4, 56 |
| 1144 | ; MIPS64-NEXT: sll $2, $2, 0 |
| 1145 | ; MIPS64-NEXT: addu $1, $2, $1 |
| 1146 | ; MIPS64-NEXT: dsrl $2, $5, 48 |
| 1147 | ; MIPS64-NEXT: sll $1, $1, 8 |
| 1148 | ; MIPS64-NEXT: sll $2, $2, 0 |
| 1149 | ; MIPS64-NEXT: dsrl $3, $4, 48 |
| 1150 | ; MIPS64-NEXT: sll $3, $3, 0 |
| 1151 | ; MIPS64-NEXT: addu $2, $3, $2 |
| 1152 | ; MIPS64-NEXT: andi $2, $2, 255 |
| 1153 | ; MIPS64-NEXT: dsrl $3, $5, 40 |
| 1154 | ; MIPS64-NEXT: or $1, $2, $1 |
| 1155 | ; MIPS64-NEXT: sll $2, $5, 0 |
| 1156 | ; MIPS64-NEXT: sll $3, $3, 0 |
| 1157 | ; MIPS64-NEXT: dsrl $6, $4, 40 |
| 1158 | ; MIPS64-NEXT: sll $6, $6, 0 |
| 1159 | ; MIPS64-NEXT: addu $3, $6, $3 |
| 1160 | ; MIPS64-NEXT: dsrl $5, $5, 32 |
| 1161 | ; MIPS64-NEXT: srl $6, $2, 24 |
| 1162 | ; MIPS64-NEXT: sll $7, $4, 0 |
| 1163 | ; MIPS64-NEXT: srl $8, $7, 24 |
| 1164 | ; MIPS64-NEXT: addu $6, $8, $6 |
| 1165 | ; MIPS64-NEXT: sll $1, $1, 16 |
| 1166 | ; MIPS64-NEXT: sll $3, $3, 8 |
| 1167 | ; MIPS64-NEXT: sll $5, $5, 0 |
| 1168 | ; MIPS64-NEXT: dsrl $4, $4, 32 |
| 1169 | ; MIPS64-NEXT: sll $4, $4, 0 |
| 1170 | ; MIPS64-NEXT: addu $4, $4, $5 |
| 1171 | ; MIPS64-NEXT: andi $4, $4, 255 |
| 1172 | ; MIPS64-NEXT: or $3, $4, $3 |
| 1173 | ; MIPS64-NEXT: andi $3, $3, 65535 |
| 1174 | ; MIPS64-NEXT: or $1, $3, $1 |
| 1175 | ; MIPS64-NEXT: sll $3, $6, 8 |
| 1176 | ; MIPS64-NEXT: srl $4, $2, 16 |
| 1177 | ; MIPS64-NEXT: srl $5, $7, 16 |
| 1178 | ; MIPS64-NEXT: addu $4, $5, $4 |
| 1179 | ; MIPS64-NEXT: andi $4, $4, 255 |
| 1180 | ; MIPS64-NEXT: or $3, $4, $3 |
| 1181 | ; MIPS64-NEXT: addu $4, $7, $2 |
| 1182 | ; MIPS64-NEXT: dsll $1, $1, 32 |
| 1183 | ; MIPS64-NEXT: sll $3, $3, 16 |
| 1184 | ; MIPS64-NEXT: andi $4, $4, 255 |
| 1185 | ; MIPS64-NEXT: srl $2, $2, 8 |
| 1186 | ; MIPS64-NEXT: srl $5, $7, 8 |
| 1187 | ; MIPS64-NEXT: addu $2, $5, $2 |
| 1188 | ; MIPS64-NEXT: sll $2, $2, 8 |
| 1189 | ; MIPS64-NEXT: or $2, $4, $2 |
| 1190 | ; MIPS64-NEXT: andi $2, $2, 65535 |
| 1191 | ; MIPS64-NEXT: or $2, $2, $3 |
| 1192 | ; MIPS64-NEXT: dsll $2, $2, 32 |
| 1193 | ; MIPS64-NEXT: dsrl $2, $2, 32 |
| 1194 | ; MIPS64-NEXT: or $2, $2, $1 |
| 1195 | ; MIPS64-NEXT: jr $ra |
| 1196 | ; MIPS64-NEXT: nop |
| 1197 | ; |
| 1198 | ; MIPS32R5EB-LABEL: i8_8: |
| 1199 | ; MIPS32R5EB: # %bb.0: |
| 1200 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, -48 |
| 1201 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 48 |
| 1202 | ; MIPS32R5EB-NEXT: sw $fp, 44($sp) # 4-byte Folded Spill |
| 1203 | ; MIPS32R5EB-NEXT: .cfi_offset 30, -4 |
| 1204 | ; MIPS32R5EB-NEXT: move $fp, $sp |
| 1205 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 |
| 1206 | ; MIPS32R5EB-NEXT: addiu $1, $zero, -16 |
| 1207 | ; MIPS32R5EB-NEXT: and $sp, $sp, $1 |
| 1208 | ; MIPS32R5EB-NEXT: sw $6, 24($sp) |
| 1209 | ; MIPS32R5EB-NEXT: ldi.b $w0, 0 |
| 1210 | ; MIPS32R5EB-NEXT: lbu $1, 25($sp) |
| 1211 | ; MIPS32R5EB-NEXT: lbu $2, 24($sp) |
| 1212 | ; MIPS32R5EB-NEXT: sw $7, 28($sp) |
| 1213 | ; MIPS32R5EB-NEXT: move.v $w1, $w0 |
| 1214 | ; MIPS32R5EB-NEXT: insert.h $w1[0], $2 |
| 1215 | ; MIPS32R5EB-NEXT: insert.h $w1[1], $1 |
| 1216 | ; MIPS32R5EB-NEXT: lbu $1, 26($sp) |
| 1217 | ; MIPS32R5EB-NEXT: sw $4, 32($sp) |
| 1218 | ; MIPS32R5EB-NEXT: insert.h $w1[2], $1 |
| 1219 | ; MIPS32R5EB-NEXT: lbu $1, 27($sp) |
| 1220 | ; MIPS32R5EB-NEXT: insert.h $w1[3], $1 |
| 1221 | ; MIPS32R5EB-NEXT: lbu $1, 28($sp) |
| 1222 | ; MIPS32R5EB-NEXT: sw $5, 36($sp) |
| 1223 | ; MIPS32R5EB-NEXT: insert.h $w1[4], $1 |
| 1224 | ; MIPS32R5EB-NEXT: lbu $1, 32($sp) |
| 1225 | ; MIPS32R5EB-NEXT: insert.h $w0[0], $1 |
| 1226 | ; MIPS32R5EB-NEXT: lbu $1, 33($sp) |
| 1227 | ; MIPS32R5EB-NEXT: insert.h $w0[1], $1 |
| 1228 | ; MIPS32R5EB-NEXT: lbu $1, 29($sp) |
| 1229 | ; MIPS32R5EB-NEXT: lbu $2, 34($sp) |
| 1230 | ; MIPS32R5EB-NEXT: insert.h $w0[2], $2 |
| 1231 | ; MIPS32R5EB-NEXT: insert.h $w1[5], $1 |
| 1232 | ; MIPS32R5EB-NEXT: lbu $1, 35($sp) |
| 1233 | ; MIPS32R5EB-NEXT: lbu $2, 31($sp) |
| 1234 | ; MIPS32R5EB-NEXT: lbu $3, 30($sp) |
| 1235 | ; MIPS32R5EB-NEXT: lbu $4, 39($sp) |
| 1236 | ; MIPS32R5EB-NEXT: insert.h $w1[6], $3 |
| 1237 | ; MIPS32R5EB-NEXT: insert.h $w1[7], $2 |
| 1238 | ; MIPS32R5EB-NEXT: insert.h $w0[3], $1 |
| 1239 | ; MIPS32R5EB-NEXT: lbu $1, 36($sp) |
| 1240 | ; MIPS32R5EB-NEXT: insert.h $w0[4], $1 |
| 1241 | ; MIPS32R5EB-NEXT: lbu $1, 37($sp) |
| 1242 | ; MIPS32R5EB-NEXT: insert.h $w0[5], $1 |
| 1243 | ; MIPS32R5EB-NEXT: lbu $1, 38($sp) |
| 1244 | ; MIPS32R5EB-NEXT: insert.h $w0[6], $1 |
| 1245 | ; MIPS32R5EB-NEXT: insert.h $w0[7], $4 |
| 1246 | ; MIPS32R5EB-NEXT: addv.h $w0, $w0, $w1 |
| 1247 | ; MIPS32R5EB-NEXT: copy_s.h $1, $w0[0] |
| 1248 | ; MIPS32R5EB-NEXT: copy_s.h $2, $w0[1] |
| 1249 | ; MIPS32R5EB-NEXT: copy_s.h $3, $w0[2] |
| 1250 | ; MIPS32R5EB-NEXT: copy_s.h $4, $w0[3] |
| 1251 | ; MIPS32R5EB-NEXT: copy_s.h $5, $w0[4] |
| 1252 | ; MIPS32R5EB-NEXT: copy_s.h $6, $w0[5] |
| 1253 | ; MIPS32R5EB-NEXT: copy_s.h $7, $w0[6] |
| 1254 | ; MIPS32R5EB-NEXT: copy_s.h $8, $w0[7] |
| 1255 | ; MIPS32R5EB-NEXT: sb $8, 23($sp) |
| 1256 | ; MIPS32R5EB-NEXT: sb $7, 22($sp) |
| 1257 | ; MIPS32R5EB-NEXT: sb $6, 21($sp) |
| 1258 | ; MIPS32R5EB-NEXT: sb $5, 20($sp) |
| 1259 | ; MIPS32R5EB-NEXT: sb $4, 19($sp) |
| 1260 | ; MIPS32R5EB-NEXT: sb $3, 18($sp) |
| 1261 | ; MIPS32R5EB-NEXT: sb $2, 17($sp) |
| 1262 | ; MIPS32R5EB-NEXT: sb $1, 16($sp) |
| 1263 | ; MIPS32R5EB-NEXT: lw $1, 20($sp) |
| 1264 | ; MIPS32R5EB-NEXT: sw $1, 12($sp) |
| 1265 | ; MIPS32R5EB-NEXT: lw $1, 16($sp) |
| 1266 | ; MIPS32R5EB-NEXT: sw $1, 4($sp) |
| 1267 | ; MIPS32R5EB-NEXT: ld.w $w0, 0($sp) |
| 1268 | ; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] |
| 1269 | ; MIPS32R5EB-NEXT: copy_s.w $3, $w0[3] |
| 1270 | ; MIPS32R5EB-NEXT: move $sp, $fp |
| 1271 | ; MIPS32R5EB-NEXT: lw $fp, 44($sp) # 4-byte Folded Reload |
| 1272 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, 48 |
| 1273 | ; MIPS32R5EB-NEXT: jr $ra |
| 1274 | ; MIPS32R5EB-NEXT: nop |
| 1275 | ; |
| 1276 | ; MIPS64R5-LABEL: i8_8: |
| 1277 | ; MIPS64R5: # %bb.0: |
| 1278 | ; MIPS64R5-NEXT: daddiu $sp, $sp, -32 |
| 1279 | ; MIPS64R5-NEXT: .cfi_def_cfa_offset 32 |
| 1280 | ; MIPS64R5-NEXT: sd $5, 16($sp) |
| 1281 | ; MIPS64R5-NEXT: ldi.b $w0, 0 |
| 1282 | ; MIPS64R5-NEXT: lbu $1, 17($sp) |
| 1283 | ; MIPS64R5-NEXT: lbu $2, 16($sp) |
| 1284 | ; MIPS64R5-NEXT: sd $4, 24($sp) |
| 1285 | ; MIPS64R5-NEXT: move.v $w1, $w0 |
| 1286 | ; MIPS64R5-NEXT: insert.h $w1[0], $2 |
| 1287 | ; MIPS64R5-NEXT: insert.h $w1[1], $1 |
| 1288 | ; MIPS64R5-NEXT: lbu $1, 18($sp) |
| 1289 | ; MIPS64R5-NEXT: insert.h $w1[2], $1 |
| 1290 | ; MIPS64R5-NEXT: lbu $1, 19($sp) |
| 1291 | ; MIPS64R5-NEXT: insert.h $w1[3], $1 |
| 1292 | ; MIPS64R5-NEXT: lbu $1, 20($sp) |
| 1293 | ; MIPS64R5-NEXT: insert.h $w1[4], $1 |
| 1294 | ; MIPS64R5-NEXT: lbu $1, 24($sp) |
| 1295 | ; MIPS64R5-NEXT: insert.h $w0[0], $1 |
| 1296 | ; MIPS64R5-NEXT: lbu $1, 25($sp) |
| 1297 | ; MIPS64R5-NEXT: insert.h $w0[1], $1 |
| 1298 | ; MIPS64R5-NEXT: lbu $1, 21($sp) |
| 1299 | ; MIPS64R5-NEXT: lbu $2, 26($sp) |
| 1300 | ; MIPS64R5-NEXT: insert.h $w0[2], $2 |
| 1301 | ; MIPS64R5-NEXT: insert.h $w1[5], $1 |
| 1302 | ; MIPS64R5-NEXT: lbu $1, 27($sp) |
| 1303 | ; MIPS64R5-NEXT: lbu $2, 23($sp) |
| 1304 | ; MIPS64R5-NEXT: lbu $3, 22($sp) |
| 1305 | ; MIPS64R5-NEXT: lbu $4, 31($sp) |
| 1306 | ; MIPS64R5-NEXT: insert.h $w1[6], $3 |
| 1307 | ; MIPS64R5-NEXT: insert.h $w1[7], $2 |
| 1308 | ; MIPS64R5-NEXT: insert.h $w0[3], $1 |
| 1309 | ; MIPS64R5-NEXT: lbu $1, 28($sp) |
| 1310 | ; MIPS64R5-NEXT: insert.h $w0[4], $1 |
| 1311 | ; MIPS64R5-NEXT: lbu $1, 29($sp) |
| 1312 | ; MIPS64R5-NEXT: insert.h $w0[5], $1 |
| 1313 | ; MIPS64R5-NEXT: lbu $1, 30($sp) |
| 1314 | ; MIPS64R5-NEXT: insert.h $w0[6], $1 |
| 1315 | ; MIPS64R5-NEXT: insert.h $w0[7], $4 |
| 1316 | ; MIPS64R5-NEXT: addv.h $w0, $w0, $w1 |
| 1317 | ; MIPS64R5-NEXT: copy_s.h $1, $w0[0] |
| 1318 | ; MIPS64R5-NEXT: copy_s.h $2, $w0[1] |
| 1319 | ; MIPS64R5-NEXT: copy_s.h $3, $w0[2] |
| 1320 | ; MIPS64R5-NEXT: copy_s.h $4, $w0[3] |
| 1321 | ; MIPS64R5-NEXT: copy_s.h $5, $w0[4] |
| 1322 | ; MIPS64R5-NEXT: copy_s.h $6, $w0[5] |
| 1323 | ; MIPS64R5-NEXT: copy_s.h $7, $w0[6] |
| 1324 | ; MIPS64R5-NEXT: copy_s.h $8, $w0[7] |
| 1325 | ; MIPS64R5-NEXT: sb $8, 15($sp) |
| 1326 | ; MIPS64R5-NEXT: sb $7, 14($sp) |
| 1327 | ; MIPS64R5-NEXT: sb $6, 13($sp) |
| 1328 | ; MIPS64R5-NEXT: sb $5, 12($sp) |
| 1329 | ; MIPS64R5-NEXT: sb $4, 11($sp) |
| 1330 | ; MIPS64R5-NEXT: sb $3, 10($sp) |
| 1331 | ; MIPS64R5-NEXT: sb $2, 9($sp) |
| 1332 | ; MIPS64R5-NEXT: sb $1, 8($sp) |
| 1333 | ; MIPS64R5-NEXT: ld $2, 8($sp) |
| 1334 | ; MIPS64R5-NEXT: daddiu $sp, $sp, 32 |
| 1335 | ; MIPS64R5-NEXT: jr $ra |
| 1336 | ; MIPS64R5-NEXT: nop |
| 1337 | ; |
| 1338 | ; MIPS32R5EL-LABEL: i8_8: |
| 1339 | ; MIPS32R5EL: # %bb.0: |
| 1340 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, -48 |
| 1341 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 48 |
| 1342 | ; MIPS32R5EL-NEXT: sw $fp, 44($sp) # 4-byte Folded Spill |
| 1343 | ; MIPS32R5EL-NEXT: .cfi_offset 30, -4 |
| 1344 | ; MIPS32R5EL-NEXT: move $fp, $sp |
| 1345 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 |
| 1346 | ; MIPS32R5EL-NEXT: addiu $1, $zero, -16 |
| 1347 | ; MIPS32R5EL-NEXT: and $sp, $sp, $1 |
| 1348 | ; MIPS32R5EL-NEXT: sw $6, 24($sp) |
| 1349 | ; MIPS32R5EL-NEXT: ldi.b $w0, 0 |
| 1350 | ; MIPS32R5EL-NEXT: lbu $1, 25($sp) |
| 1351 | ; MIPS32R5EL-NEXT: lbu $2, 24($sp) |
| 1352 | ; MIPS32R5EL-NEXT: sw $7, 28($sp) |
| 1353 | ; MIPS32R5EL-NEXT: move.v $w1, $w0 |
| 1354 | ; MIPS32R5EL-NEXT: insert.h $w1[0], $2 |
| 1355 | ; MIPS32R5EL-NEXT: insert.h $w1[1], $1 |
| 1356 | ; MIPS32R5EL-NEXT: lbu $1, 26($sp) |
| 1357 | ; MIPS32R5EL-NEXT: sw $4, 32($sp) |
| 1358 | ; MIPS32R5EL-NEXT: insert.h $w1[2], $1 |
| 1359 | ; MIPS32R5EL-NEXT: lbu $1, 27($sp) |
| 1360 | ; MIPS32R5EL-NEXT: insert.h $w1[3], $1 |
| 1361 | ; MIPS32R5EL-NEXT: lbu $1, 28($sp) |
| 1362 | ; MIPS32R5EL-NEXT: sw $5, 36($sp) |
| 1363 | ; MIPS32R5EL-NEXT: insert.h $w1[4], $1 |
| 1364 | ; MIPS32R5EL-NEXT: lbu $1, 32($sp) |
| 1365 | ; MIPS32R5EL-NEXT: insert.h $w0[0], $1 |
| 1366 | ; MIPS32R5EL-NEXT: lbu $1, 33($sp) |
| 1367 | ; MIPS32R5EL-NEXT: insert.h $w0[1], $1 |
| 1368 | ; MIPS32R5EL-NEXT: lbu $1, 29($sp) |
| 1369 | ; MIPS32R5EL-NEXT: lbu $2, 34($sp) |
| 1370 | ; MIPS32R5EL-NEXT: insert.h $w0[2], $2 |
| 1371 | ; MIPS32R5EL-NEXT: insert.h $w1[5], $1 |
| 1372 | ; MIPS32R5EL-NEXT: lbu $1, 35($sp) |
| 1373 | ; MIPS32R5EL-NEXT: lbu $2, 31($sp) |
| 1374 | ; MIPS32R5EL-NEXT: lbu $3, 30($sp) |
| 1375 | ; MIPS32R5EL-NEXT: lbu $4, 39($sp) |
| 1376 | ; MIPS32R5EL-NEXT: insert.h $w1[6], $3 |
| 1377 | ; MIPS32R5EL-NEXT: insert.h $w1[7], $2 |
| 1378 | ; MIPS32R5EL-NEXT: insert.h $w0[3], $1 |
| 1379 | ; MIPS32R5EL-NEXT: lbu $1, 36($sp) |
| 1380 | ; MIPS32R5EL-NEXT: insert.h $w0[4], $1 |
| 1381 | ; MIPS32R5EL-NEXT: lbu $1, 37($sp) |
| 1382 | ; MIPS32R5EL-NEXT: insert.h $w0[5], $1 |
| 1383 | ; MIPS32R5EL-NEXT: lbu $1, 38($sp) |
| 1384 | ; MIPS32R5EL-NEXT: insert.h $w0[6], $1 |
| 1385 | ; MIPS32R5EL-NEXT: insert.h $w0[7], $4 |
| 1386 | ; MIPS32R5EL-NEXT: addv.h $w0, $w0, $w1 |
| 1387 | ; MIPS32R5EL-NEXT: copy_s.h $1, $w0[0] |
| 1388 | ; MIPS32R5EL-NEXT: copy_s.h $2, $w0[1] |
| 1389 | ; MIPS32R5EL-NEXT: copy_s.h $3, $w0[2] |
| 1390 | ; MIPS32R5EL-NEXT: copy_s.h $4, $w0[3] |
| 1391 | ; MIPS32R5EL-NEXT: copy_s.h $5, $w0[4] |
| 1392 | ; MIPS32R5EL-NEXT: copy_s.h $6, $w0[5] |
| 1393 | ; MIPS32R5EL-NEXT: copy_s.h $7, $w0[6] |
| 1394 | ; MIPS32R5EL-NEXT: copy_s.h $8, $w0[7] |
| 1395 | ; MIPS32R5EL-NEXT: sb $8, 23($sp) |
| 1396 | ; MIPS32R5EL-NEXT: sb $7, 22($sp) |
| 1397 | ; MIPS32R5EL-NEXT: sb $6, 21($sp) |
| 1398 | ; MIPS32R5EL-NEXT: sb $5, 20($sp) |
| 1399 | ; MIPS32R5EL-NEXT: sb $4, 19($sp) |
| 1400 | ; MIPS32R5EL-NEXT: sb $3, 18($sp) |
| 1401 | ; MIPS32R5EL-NEXT: sb $2, 17($sp) |
| 1402 | ; MIPS32R5EL-NEXT: sb $1, 16($sp) |
| 1403 | ; MIPS32R5EL-NEXT: lw $1, 20($sp) |
| 1404 | ; MIPS32R5EL-NEXT: sw $1, 8($sp) |
| 1405 | ; MIPS32R5EL-NEXT: lw $1, 16($sp) |
| 1406 | ; MIPS32R5EL-NEXT: sw $1, 0($sp) |
| 1407 | ; MIPS32R5EL-NEXT: ld.w $w0, 0($sp) |
| 1408 | ; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] |
| 1409 | ; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] |
| 1410 | ; MIPS32R5EL-NEXT: move $sp, $fp |
| 1411 | ; MIPS32R5EL-NEXT: lw $fp, 44($sp) # 4-byte Folded Reload |
| 1412 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, 48 |
| 1413 | ; MIPS32R5EL-NEXT: jr $ra |
| 1414 | ; MIPS32R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 1415 | %1 = add <8 x i8> %a, %b |
| 1416 | ret <8 x i8> %1 |
| 1417 | } |
| 1418 | |
| 1419 | define <16 x i8> @i8_16(<16 x i8> %a, <16 x i8> %b) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 1420 | ; MIPS32-LABEL: i8_16: |
| 1421 | ; MIPS32: # %bb.0: |
| 1422 | ; MIPS32-NEXT: lw $1, 24($sp) |
| 1423 | ; MIPS32-NEXT: srl $2, $1, 24 |
| 1424 | ; MIPS32-NEXT: srl $3, $6, 24 |
| 1425 | ; MIPS32-NEXT: srl $8, $1, 16 |
| 1426 | ; MIPS32-NEXT: srl $9, $6, 16 |
| 1427 | ; MIPS32-NEXT: srl $10, $1, 8 |
| 1428 | ; MIPS32-NEXT: srl $11, $6, 8 |
| 1429 | ; MIPS32-NEXT: lw $12, 20($sp) |
| 1430 | ; MIPS32-NEXT: srl $13, $12, 8 |
| 1431 | ; MIPS32-NEXT: srl $14, $5, 8 |
| 1432 | ; MIPS32-NEXT: addu $13, $14, $13 |
| 1433 | ; MIPS32-NEXT: addu $14, $5, $12 |
| 1434 | ; MIPS32-NEXT: addu $10, $11, $10 |
| 1435 | ; MIPS32-NEXT: addu $1, $6, $1 |
| 1436 | ; MIPS32-NEXT: addu $6, $9, $8 |
| 1437 | ; MIPS32-NEXT: addu $2, $3, $2 |
| 1438 | ; MIPS32-NEXT: srl $3, $12, 24 |
| 1439 | ; MIPS32-NEXT: srl $8, $5, 24 |
| 1440 | ; MIPS32-NEXT: srl $9, $12, 16 |
| 1441 | ; MIPS32-NEXT: srl $5, $5, 16 |
| 1442 | ; MIPS32-NEXT: addu $5, $5, $9 |
| 1443 | ; MIPS32-NEXT: addu $3, $8, $3 |
| 1444 | ; MIPS32-NEXT: sll $2, $2, 8 |
| 1445 | ; MIPS32-NEXT: andi $6, $6, 255 |
| 1446 | ; MIPS32-NEXT: andi $1, $1, 255 |
| 1447 | ; MIPS32-NEXT: sll $8, $10, 8 |
| 1448 | ; MIPS32-NEXT: andi $9, $14, 255 |
| 1449 | ; MIPS32-NEXT: sll $10, $13, 8 |
| 1450 | ; MIPS32-NEXT: lw $11, 28($sp) |
| 1451 | ; MIPS32-NEXT: lw $12, 16($sp) |
| 1452 | ; MIPS32-NEXT: srl $13, $12, 24 |
| 1453 | ; MIPS32-NEXT: srl $14, $4, 24 |
| 1454 | ; MIPS32-NEXT: srl $15, $11, 24 |
| 1455 | ; MIPS32-NEXT: srl $24, $7, 24 |
| 1456 | ; MIPS32-NEXT: or $9, $9, $10 |
| 1457 | ; MIPS32-NEXT: or $1, $1, $8 |
| 1458 | ; MIPS32-NEXT: or $2, $6, $2 |
| 1459 | ; MIPS32-NEXT: addu $6, $24, $15 |
| 1460 | ; MIPS32-NEXT: sll $3, $3, 8 |
| 1461 | ; MIPS32-NEXT: andi $5, $5, 255 |
| 1462 | ; MIPS32-NEXT: addu $8, $14, $13 |
| 1463 | ; MIPS32-NEXT: sll $8, $8, 8 |
| 1464 | ; MIPS32-NEXT: srl $10, $12, 16 |
| 1465 | ; MIPS32-NEXT: srl $13, $4, 16 |
| 1466 | ; MIPS32-NEXT: addu $10, $13, $10 |
| 1467 | ; MIPS32-NEXT: andi $10, $10, 255 |
| 1468 | ; MIPS32-NEXT: or $8, $10, $8 |
| 1469 | ; MIPS32-NEXT: or $3, $5, $3 |
| 1470 | ; MIPS32-NEXT: addu $5, $4, $12 |
| 1471 | ; MIPS32-NEXT: sll $6, $6, 8 |
| 1472 | ; MIPS32-NEXT: srl $10, $11, 16 |
| 1473 | ; MIPS32-NEXT: srl $13, $7, 16 |
| 1474 | ; MIPS32-NEXT: addu $10, $13, $10 |
| 1475 | ; MIPS32-NEXT: andi $10, $10, 255 |
| 1476 | ; MIPS32-NEXT: or $6, $10, $6 |
| 1477 | ; MIPS32-NEXT: sll $10, $2, 16 |
| 1478 | ; MIPS32-NEXT: andi $1, $1, 65535 |
| 1479 | ; MIPS32-NEXT: sll $3, $3, 16 |
| 1480 | ; MIPS32-NEXT: andi $9, $9, 65535 |
| 1481 | ; MIPS32-NEXT: sll $2, $8, 16 |
| 1482 | ; MIPS32-NEXT: andi $5, $5, 255 |
| 1483 | ; MIPS32-NEXT: srl $8, $12, 8 |
| 1484 | ; MIPS32-NEXT: srl $4, $4, 8 |
| 1485 | ; MIPS32-NEXT: addu $4, $4, $8 |
| 1486 | ; MIPS32-NEXT: sll $4, $4, 8 |
| 1487 | ; MIPS32-NEXT: or $4, $5, $4 |
| 1488 | ; MIPS32-NEXT: andi $4, $4, 65535 |
| 1489 | ; MIPS32-NEXT: addu $5, $7, $11 |
| 1490 | ; MIPS32-NEXT: or $2, $4, $2 |
| 1491 | ; MIPS32-NEXT: or $3, $9, $3 |
| 1492 | ; MIPS32-NEXT: or $4, $1, $10 |
| 1493 | ; MIPS32-NEXT: sll $1, $6, 16 |
| 1494 | ; MIPS32-NEXT: andi $5, $5, 255 |
| 1495 | ; MIPS32-NEXT: srl $6, $11, 8 |
| 1496 | ; MIPS32-NEXT: srl $7, $7, 8 |
| 1497 | ; MIPS32-NEXT: addu $6, $7, $6 |
| 1498 | ; MIPS32-NEXT: sll $6, $6, 8 |
| 1499 | ; MIPS32-NEXT: or $5, $5, $6 |
| 1500 | ; MIPS32-NEXT: andi $5, $5, 65535 |
| 1501 | ; MIPS32-NEXT: or $5, $5, $1 |
| 1502 | ; MIPS32-NEXT: jr $ra |
| 1503 | ; MIPS32-NEXT: nop |
| 1504 | ; |
| 1505 | ; MIPS64-LABEL: i8_16: |
| 1506 | ; MIPS64: # %bb.0: |
| 1507 | ; MIPS64-NEXT: dsrl $1, $7, 56 |
| 1508 | ; MIPS64-NEXT: dsrl $2, $5, 56 |
| 1509 | ; MIPS64-NEXT: dsrl $3, $7, 48 |
| 1510 | ; MIPS64-NEXT: dsrl $8, $5, 48 |
| 1511 | ; MIPS64-NEXT: dsrl $9, $6, 56 |
| 1512 | ; MIPS64-NEXT: dsrl $10, $4, 56 |
| 1513 | ; MIPS64-NEXT: dsrl $11, $7, 32 |
| 1514 | ; MIPS64-NEXT: sll $1, $1, 0 |
| 1515 | ; MIPS64-NEXT: sll $2, $2, 0 |
| 1516 | ; MIPS64-NEXT: sll $3, $3, 0 |
| 1517 | ; MIPS64-NEXT: sll $8, $8, 0 |
| 1518 | ; MIPS64-NEXT: dsrl $12, $7, 40 |
| 1519 | ; MIPS64-NEXT: sll $12, $12, 0 |
| 1520 | ; MIPS64-NEXT: dsrl $13, $5, 40 |
| 1521 | ; MIPS64-NEXT: sll $13, $13, 0 |
| 1522 | ; MIPS64-NEXT: addu $12, $13, $12 |
| 1523 | ; MIPS64-NEXT: addu $3, $8, $3 |
| 1524 | ; MIPS64-NEXT: addu $1, $2, $1 |
| 1525 | ; MIPS64-NEXT: sll $2, $9, 0 |
| 1526 | ; MIPS64-NEXT: sll $8, $10, 0 |
| 1527 | ; MIPS64-NEXT: dsrl $9, $6, 48 |
| 1528 | ; MIPS64-NEXT: sll $9, $9, 0 |
| 1529 | ; MIPS64-NEXT: dsrl $10, $4, 48 |
| 1530 | ; MIPS64-NEXT: sll $10, $10, 0 |
| 1531 | ; MIPS64-NEXT: addu $9, $10, $9 |
| 1532 | ; MIPS64-NEXT: addu $2, $8, $2 |
| 1533 | ; MIPS64-NEXT: sll $1, $1, 8 |
| 1534 | ; MIPS64-NEXT: andi $3, $3, 255 |
| 1535 | ; MIPS64-NEXT: sll $8, $12, 8 |
| 1536 | ; MIPS64-NEXT: sll $10, $11, 0 |
| 1537 | ; MIPS64-NEXT: dsrl $11, $5, 32 |
| 1538 | ; MIPS64-NEXT: sll $11, $11, 0 |
| 1539 | ; MIPS64-NEXT: addu $10, $11, $10 |
| 1540 | ; MIPS64-NEXT: andi $10, $10, 255 |
| 1541 | ; MIPS64-NEXT: or $8, $10, $8 |
| 1542 | ; MIPS64-NEXT: sll $10, $6, 0 |
| 1543 | ; MIPS64-NEXT: or $1, $3, $1 |
| 1544 | ; MIPS64-NEXT: sll $2, $2, 8 |
| 1545 | ; MIPS64-NEXT: andi $3, $9, 255 |
| 1546 | ; MIPS64-NEXT: dsrl $9, $6, 40 |
| 1547 | ; MIPS64-NEXT: srl $11, $10, 24 |
| 1548 | ; MIPS64-NEXT: sll $12, $4, 0 |
| 1549 | ; MIPS64-NEXT: srl $13, $12, 24 |
| 1550 | ; MIPS64-NEXT: srl $14, $10, 16 |
| 1551 | ; MIPS64-NEXT: srl $15, $12, 16 |
| 1552 | ; MIPS64-NEXT: andi $8, $8, 65535 |
| 1553 | ; MIPS64-NEXT: addu $14, $15, $14 |
| 1554 | ; MIPS64-NEXT: addu $11, $13, $11 |
| 1555 | ; MIPS64-NEXT: sll $7, $7, 0 |
| 1556 | ; MIPS64-NEXT: or $2, $3, $2 |
| 1557 | ; MIPS64-NEXT: sll $1, $1, 16 |
| 1558 | ; MIPS64-NEXT: sll $3, $9, 0 |
| 1559 | ; MIPS64-NEXT: dsrl $9, $4, 40 |
| 1560 | ; MIPS64-NEXT: sll $9, $9, 0 |
| 1561 | ; MIPS64-NEXT: addu $3, $9, $3 |
| 1562 | ; MIPS64-NEXT: dsrl $6, $6, 32 |
| 1563 | ; MIPS64-NEXT: srl $9, $7, 24 |
| 1564 | ; MIPS64-NEXT: sll $5, $5, 0 |
| 1565 | ; MIPS64-NEXT: srl $13, $5, 24 |
| 1566 | ; MIPS64-NEXT: or $1, $8, $1 |
| 1567 | ; MIPS64-NEXT: addu $8, $13, $9 |
| 1568 | ; MIPS64-NEXT: sll $9, $11, 8 |
| 1569 | ; MIPS64-NEXT: andi $11, $14, 255 |
| 1570 | ; MIPS64-NEXT: sll $2, $2, 16 |
| 1571 | ; MIPS64-NEXT: sll $3, $3, 8 |
| 1572 | ; MIPS64-NEXT: sll $6, $6, 0 |
| 1573 | ; MIPS64-NEXT: dsrl $4, $4, 32 |
| 1574 | ; MIPS64-NEXT: sll $4, $4, 0 |
| 1575 | ; MIPS64-NEXT: addu $4, $4, $6 |
| 1576 | ; MIPS64-NEXT: andi $4, $4, 255 |
| 1577 | ; MIPS64-NEXT: or $3, $4, $3 |
| 1578 | ; MIPS64-NEXT: andi $3, $3, 65535 |
| 1579 | ; MIPS64-NEXT: or $2, $3, $2 |
| 1580 | ; MIPS64-NEXT: or $3, $11, $9 |
| 1581 | ; MIPS64-NEXT: addu $4, $12, $10 |
| 1582 | ; MIPS64-NEXT: sll $6, $8, 8 |
| 1583 | ; MIPS64-NEXT: srl $8, $7, 16 |
| 1584 | ; MIPS64-NEXT: srl $9, $5, 16 |
| 1585 | ; MIPS64-NEXT: addu $8, $9, $8 |
| 1586 | ; MIPS64-NEXT: andi $8, $8, 255 |
| 1587 | ; MIPS64-NEXT: or $6, $8, $6 |
| 1588 | ; MIPS64-NEXT: addu $8, $5, $7 |
| 1589 | ; MIPS64-NEXT: dsll $2, $2, 32 |
| 1590 | ; MIPS64-NEXT: sll $3, $3, 16 |
| 1591 | ; MIPS64-NEXT: andi $4, $4, 255 |
| 1592 | ; MIPS64-NEXT: srl $9, $10, 8 |
| 1593 | ; MIPS64-NEXT: srl $10, $12, 8 |
| 1594 | ; MIPS64-NEXT: addu $9, $10, $9 |
| 1595 | ; MIPS64-NEXT: sll $9, $9, 8 |
| 1596 | ; MIPS64-NEXT: or $4, $4, $9 |
| 1597 | ; MIPS64-NEXT: andi $4, $4, 65535 |
| 1598 | ; MIPS64-NEXT: or $3, $4, $3 |
| 1599 | ; MIPS64-NEXT: dsll $3, $3, 32 |
| 1600 | ; MIPS64-NEXT: dsrl $3, $3, 32 |
| 1601 | ; MIPS64-NEXT: or $2, $3, $2 |
| 1602 | ; MIPS64-NEXT: dsll $1, $1, 32 |
| 1603 | ; MIPS64-NEXT: sll $3, $6, 16 |
| 1604 | ; MIPS64-NEXT: andi $4, $8, 255 |
| 1605 | ; MIPS64-NEXT: srl $6, $7, 8 |
| 1606 | ; MIPS64-NEXT: srl $5, $5, 8 |
| 1607 | ; MIPS64-NEXT: addu $5, $5, $6 |
| 1608 | ; MIPS64-NEXT: sll $5, $5, 8 |
| 1609 | ; MIPS64-NEXT: or $4, $4, $5 |
| 1610 | ; MIPS64-NEXT: andi $4, $4, 65535 |
| 1611 | ; MIPS64-NEXT: or $3, $4, $3 |
| 1612 | ; MIPS64-NEXT: dsll $3, $3, 32 |
| 1613 | ; MIPS64-NEXT: dsrl $3, $3, 32 |
| 1614 | ; MIPS64-NEXT: or $3, $3, $1 |
| 1615 | ; MIPS64-NEXT: jr $ra |
| 1616 | ; MIPS64-NEXT: nop |
| 1617 | ; |
| 1618 | ; MIPS32R5EB-LABEL: i8_16: |
| 1619 | ; MIPS32R5EB: # %bb.0: |
| 1620 | ; MIPS32R5EB-NEXT: ldi.b $w0, 0 |
| 1621 | ; MIPS32R5EB-NEXT: lw $1, 20($sp) |
| 1622 | ; MIPS32R5EB-NEXT: lw $2, 16($sp) |
| 1623 | ; MIPS32R5EB-NEXT: move.v $w1, $w0 |
| 1624 | ; MIPS32R5EB-NEXT: insert.w $w1[0], $2 |
| 1625 | ; MIPS32R5EB-NEXT: insert.w $w1[1], $1 |
| 1626 | ; MIPS32R5EB-NEXT: lw $1, 24($sp) |
| 1627 | ; MIPS32R5EB-NEXT: insert.w $w0[0], $4 |
| 1628 | ; MIPS32R5EB-NEXT: insert.w $w1[2], $1 |
| 1629 | ; MIPS32R5EB-NEXT: lw $1, 28($sp) |
| 1630 | ; MIPS32R5EB-NEXT: insert.w $w1[3], $1 |
| 1631 | ; MIPS32R5EB-NEXT: shf.b $w1, $w1, 27 |
| 1632 | ; MIPS32R5EB-NEXT: insert.w $w0[1], $5 |
| 1633 | ; MIPS32R5EB-NEXT: insert.w $w0[2], $6 |
| 1634 | ; MIPS32R5EB-NEXT: insert.w $w0[3], $7 |
| 1635 | ; MIPS32R5EB-NEXT: shf.b $w0, $w0, 27 |
| 1636 | ; MIPS32R5EB-NEXT: addv.b $w0, $w0, $w1 |
| 1637 | ; MIPS32R5EB-NEXT: shf.b $w0, $w0, 27 |
| 1638 | ; MIPS32R5EB-NEXT: copy_s.w $2, $w0[0] |
| 1639 | ; MIPS32R5EB-NEXT: copy_s.w $3, $w0[1] |
| 1640 | ; MIPS32R5EB-NEXT: copy_s.w $4, $w0[2] |
| 1641 | ; MIPS32R5EB-NEXT: copy_s.w $5, $w0[3] |
| 1642 | ; MIPS32R5EB-NEXT: jr $ra |
| 1643 | ; MIPS32R5EB-NEXT: nop |
| 1644 | ; |
| 1645 | ; MIPS64R5EB-LABEL: i8_16: |
| 1646 | ; MIPS64R5EB: # %bb.0: |
| 1647 | ; MIPS64R5EB-NEXT: ldi.b $w0, 0 |
| 1648 | ; MIPS64R5EB-NEXT: move.v $w1, $w0 |
| 1649 | ; MIPS64R5EB-NEXT: insert.d $w1[0], $6 |
| 1650 | ; MIPS64R5EB-NEXT: insert.d $w1[1], $7 |
| 1651 | ; MIPS64R5EB-NEXT: shf.b $w1, $w1, 27 |
| 1652 | ; MIPS64R5EB-NEXT: shf.w $w1, $w1, 177 |
| 1653 | ; MIPS64R5EB-NEXT: insert.d $w0[0], $4 |
| 1654 | ; MIPS64R5EB-NEXT: insert.d $w0[1], $5 |
| 1655 | ; MIPS64R5EB-NEXT: shf.b $w0, $w0, 27 |
| 1656 | ; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 |
| 1657 | ; MIPS64R5EB-NEXT: addv.b $w0, $w0, $w1 |
| 1658 | ; MIPS64R5EB-NEXT: shf.b $w0, $w0, 27 |
| 1659 | ; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 |
| 1660 | ; MIPS64R5EB-NEXT: copy_s.d $2, $w0[0] |
| 1661 | ; MIPS64R5EB-NEXT: copy_s.d $3, $w0[1] |
| 1662 | ; MIPS64R5EB-NEXT: jr $ra |
| 1663 | ; MIPS64R5EB-NEXT: nop |
| 1664 | ; |
| 1665 | ; MIPS32R5EL-LABEL: i8_16: |
| 1666 | ; MIPS32R5EL: # %bb.0: |
| 1667 | ; MIPS32R5EL-NEXT: ldi.b $w0, 0 |
| 1668 | ; MIPS32R5EL-NEXT: lw $1, 20($sp) |
| 1669 | ; MIPS32R5EL-NEXT: lw $2, 16($sp) |
| 1670 | ; MIPS32R5EL-NEXT: move.v $w1, $w0 |
| 1671 | ; MIPS32R5EL-NEXT: insert.w $w1[0], $2 |
| 1672 | ; MIPS32R5EL-NEXT: insert.w $w1[1], $1 |
| 1673 | ; MIPS32R5EL-NEXT: lw $1, 24($sp) |
| 1674 | ; MIPS32R5EL-NEXT: insert.w $w1[2], $1 |
| 1675 | ; MIPS32R5EL-NEXT: lw $1, 28($sp) |
| 1676 | ; MIPS32R5EL-NEXT: insert.w $w1[3], $1 |
| 1677 | ; MIPS32R5EL-NEXT: insert.w $w0[0], $4 |
| 1678 | ; MIPS32R5EL-NEXT: insert.w $w0[1], $5 |
| 1679 | ; MIPS32R5EL-NEXT: insert.w $w0[2], $6 |
| 1680 | ; MIPS32R5EL-NEXT: insert.w $w0[3], $7 |
| 1681 | ; MIPS32R5EL-NEXT: addv.b $w0, $w0, $w1 |
| 1682 | ; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] |
| 1683 | ; MIPS32R5EL-NEXT: copy_s.w $3, $w0[1] |
| 1684 | ; MIPS32R5EL-NEXT: copy_s.w $4, $w0[2] |
| 1685 | ; MIPS32R5EL-NEXT: copy_s.w $5, $w0[3] |
| 1686 | ; MIPS32R5EL-NEXT: jr $ra |
| 1687 | ; MIPS32R5EL-NEXT: nop |
| 1688 | ; |
| 1689 | ; MIPS64R5EL-LABEL: i8_16: |
| 1690 | ; MIPS64R5EL: # %bb.0: |
| 1691 | ; MIPS64R5EL-NEXT: ldi.b $w0, 0 |
| 1692 | ; MIPS64R5EL-NEXT: move.v $w1, $w0 |
| 1693 | ; MIPS64R5EL-NEXT: insert.d $w1[0], $6 |
| 1694 | ; MIPS64R5EL-NEXT: insert.d $w1[1], $7 |
| 1695 | ; MIPS64R5EL-NEXT: insert.d $w0[0], $4 |
| 1696 | ; MIPS64R5EL-NEXT: insert.d $w0[1], $5 |
| 1697 | ; MIPS64R5EL-NEXT: addv.b $w0, $w0, $w1 |
| 1698 | ; MIPS64R5EL-NEXT: copy_s.d $2, $w0[0] |
| 1699 | ; MIPS64R5EL-NEXT: copy_s.d $3, $w0[1] |
| 1700 | ; MIPS64R5EL-NEXT: jr $ra |
| 1701 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 1702 | %1 = add <16 x i8> %a, %b |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 1703 | ret <16 x i8> %1 |
| 1704 | } |
| 1705 | |
| 1706 | define <2 x i16> @i16_2(<2 x i16> %a, <2 x i16> %b) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 1707 | ; MIPS32-LABEL: i16_2: |
| 1708 | ; MIPS32: # %bb.0: |
| 1709 | ; MIPS32-NEXT: addu $1, $4, $5 |
| 1710 | ; MIPS32-NEXT: andi $1, $1, 65535 |
| 1711 | ; MIPS32-NEXT: srl $2, $5, 16 |
| 1712 | ; MIPS32-NEXT: srl $3, $4, 16 |
| 1713 | ; MIPS32-NEXT: addu $2, $3, $2 |
| 1714 | ; MIPS32-NEXT: sll $2, $2, 16 |
| 1715 | ; MIPS32-NEXT: or $2, $1, $2 |
| 1716 | ; MIPS32-NEXT: jr $ra |
| 1717 | ; MIPS32-NEXT: nop |
| 1718 | ; |
| 1719 | ; MIPS64-LABEL: i16_2: |
| 1720 | ; MIPS64: # %bb.0: |
| 1721 | ; MIPS64-NEXT: sll $1, $5, 0 |
| 1722 | ; MIPS64-NEXT: sll $2, $4, 0 |
| 1723 | ; MIPS64-NEXT: addu $3, $2, $1 |
| 1724 | ; MIPS64-NEXT: andi $3, $3, 65535 |
| 1725 | ; MIPS64-NEXT: srl $1, $1, 16 |
| 1726 | ; MIPS64-NEXT: srl $2, $2, 16 |
| 1727 | ; MIPS64-NEXT: addu $1, $2, $1 |
| 1728 | ; MIPS64-NEXT: sll $1, $1, 16 |
| 1729 | ; MIPS64-NEXT: or $2, $3, $1 |
| 1730 | ; MIPS64-NEXT: jr $ra |
| 1731 | ; MIPS64-NEXT: nop |
| 1732 | ; |
| 1733 | ; MIPS32R5EB-LABEL: i16_2: |
| 1734 | ; MIPS32R5EB: # %bb.0: |
| 1735 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, -48 |
| 1736 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 48 |
| 1737 | ; MIPS32R5EB-NEXT: sw $fp, 44($sp) # 4-byte Folded Spill |
| 1738 | ; MIPS32R5EB-NEXT: .cfi_offset 30, -4 |
| 1739 | ; MIPS32R5EB-NEXT: move $fp, $sp |
| 1740 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 |
| 1741 | ; MIPS32R5EB-NEXT: addiu $1, $zero, -16 |
| 1742 | ; MIPS32R5EB-NEXT: and $sp, $sp, $1 |
| 1743 | ; MIPS32R5EB-NEXT: sw $5, 36($sp) |
| 1744 | ; MIPS32R5EB-NEXT: sw $4, 40($sp) |
| 1745 | ; MIPS32R5EB-NEXT: lhu $1, 38($sp) |
| 1746 | ; MIPS32R5EB-NEXT: sw $1, 28($sp) |
| 1747 | ; MIPS32R5EB-NEXT: lhu $1, 36($sp) |
| 1748 | ; MIPS32R5EB-NEXT: sw $1, 20($sp) |
| 1749 | ; MIPS32R5EB-NEXT: lhu $1, 42($sp) |
| 1750 | ; MIPS32R5EB-NEXT: sw $1, 12($sp) |
| 1751 | ; MIPS32R5EB-NEXT: lhu $1, 40($sp) |
| 1752 | ; MIPS32R5EB-NEXT: sw $1, 4($sp) |
| 1753 | ; MIPS32R5EB-NEXT: ld.d $w0, 16($sp) |
| 1754 | ; MIPS32R5EB-NEXT: ld.d $w1, 0($sp) |
| 1755 | ; MIPS32R5EB-NEXT: addv.d $w0, $w1, $w0 |
| 1756 | ; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 |
| 1757 | ; MIPS32R5EB-NEXT: copy_s.w $1, $w0[1] |
| 1758 | ; MIPS32R5EB-NEXT: copy_s.w $2, $w0[3] |
| 1759 | ; MIPS32R5EB-NEXT: sh $2, 34($sp) |
| 1760 | ; MIPS32R5EB-NEXT: sh $1, 32($sp) |
| 1761 | ; MIPS32R5EB-NEXT: lw $2, 32($sp) |
| 1762 | ; MIPS32R5EB-NEXT: move $sp, $fp |
| 1763 | ; MIPS32R5EB-NEXT: lw $fp, 44($sp) # 4-byte Folded Reload |
| 1764 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, 48 |
| 1765 | ; MIPS32R5EB-NEXT: jr $ra |
| 1766 | ; MIPS32R5EB-NEXT: nop |
| 1767 | ; |
| 1768 | ; MIPS64R5-LABEL: i16_2: |
| 1769 | ; MIPS64R5: # %bb.0: |
| 1770 | ; MIPS64R5-NEXT: daddiu $sp, $sp, -16 |
| 1771 | ; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 |
| 1772 | ; MIPS64R5-NEXT: sll $1, $5, 0 |
| 1773 | ; MIPS64R5-NEXT: sw $1, 8($sp) |
| 1774 | ; MIPS64R5-NEXT: sll $1, $4, 0 |
| 1775 | ; MIPS64R5-NEXT: sw $1, 12($sp) |
| 1776 | ; MIPS64R5-NEXT: ldi.b $w0, 0 |
| 1777 | ; MIPS64R5-NEXT: lh $1, 10($sp) |
| 1778 | ; MIPS64R5-NEXT: lh $2, 8($sp) |
| 1779 | ; MIPS64R5-NEXT: move.v $w1, $w0 |
| 1780 | ; MIPS64R5-NEXT: insert.d $w1[0], $2 |
| 1781 | ; MIPS64R5-NEXT: insert.d $w1[1], $1 |
| 1782 | ; MIPS64R5-NEXT: lh $1, 12($sp) |
| 1783 | ; MIPS64R5-NEXT: insert.d $w0[0], $1 |
| 1784 | ; MIPS64R5-NEXT: lh $1, 14($sp) |
| 1785 | ; MIPS64R5-NEXT: insert.d $w0[1], $1 |
| 1786 | ; MIPS64R5-NEXT: addv.d $w0, $w0, $w1 |
| 1787 | ; MIPS64R5-NEXT: copy_s.d $1, $w0[0] |
| 1788 | ; MIPS64R5-NEXT: copy_s.d $2, $w0[1] |
| 1789 | ; MIPS64R5-NEXT: sh $2, 6($sp) |
| 1790 | ; MIPS64R5-NEXT: sh $1, 4($sp) |
| 1791 | ; MIPS64R5-NEXT: lw $2, 4($sp) |
| 1792 | ; MIPS64R5-NEXT: daddiu $sp, $sp, 16 |
| 1793 | ; MIPS64R5-NEXT: jr $ra |
| 1794 | ; MIPS64R5-NEXT: nop |
| 1795 | ; |
| 1796 | ; MIPS32R5EL-LABEL: i16_2: |
| 1797 | ; MIPS32R5EL: # %bb.0: |
| 1798 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, -48 |
| 1799 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 48 |
| 1800 | ; MIPS32R5EL-NEXT: sw $fp, 44($sp) # 4-byte Folded Spill |
| 1801 | ; MIPS32R5EL-NEXT: .cfi_offset 30, -4 |
| 1802 | ; MIPS32R5EL-NEXT: move $fp, $sp |
| 1803 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 |
| 1804 | ; MIPS32R5EL-NEXT: addiu $1, $zero, -16 |
| 1805 | ; MIPS32R5EL-NEXT: and $sp, $sp, $1 |
| 1806 | ; MIPS32R5EL-NEXT: sw $5, 36($sp) |
| 1807 | ; MIPS32R5EL-NEXT: sw $4, 40($sp) |
| 1808 | ; MIPS32R5EL-NEXT: lhu $1, 38($sp) |
| 1809 | ; MIPS32R5EL-NEXT: sw $1, 24($sp) |
| 1810 | ; MIPS32R5EL-NEXT: lhu $1, 36($sp) |
| 1811 | ; MIPS32R5EL-NEXT: sw $1, 16($sp) |
| 1812 | ; MIPS32R5EL-NEXT: lhu $1, 42($sp) |
| 1813 | ; MIPS32R5EL-NEXT: sw $1, 8($sp) |
| 1814 | ; MIPS32R5EL-NEXT: lhu $1, 40($sp) |
| 1815 | ; MIPS32R5EL-NEXT: sw $1, 0($sp) |
| 1816 | ; MIPS32R5EL-NEXT: ld.d $w0, 16($sp) |
| 1817 | ; MIPS32R5EL-NEXT: ld.d $w1, 0($sp) |
| 1818 | ; MIPS32R5EL-NEXT: addv.d $w0, $w1, $w0 |
| 1819 | ; MIPS32R5EL-NEXT: copy_s.w $1, $w0[0] |
| 1820 | ; MIPS32R5EL-NEXT: copy_s.w $2, $w0[2] |
| 1821 | ; MIPS32R5EL-NEXT: sh $2, 34($sp) |
| 1822 | ; MIPS32R5EL-NEXT: sh $1, 32($sp) |
| 1823 | ; MIPS32R5EL-NEXT: lw $2, 32($sp) |
| 1824 | ; MIPS32R5EL-NEXT: move $sp, $fp |
| 1825 | ; MIPS32R5EL-NEXT: lw $fp, 44($sp) # 4-byte Folded Reload |
| 1826 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, 48 |
| 1827 | ; MIPS32R5EL-NEXT: jr $ra |
| 1828 | ; MIPS32R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 1829 | %1 = add <2 x i16> %a, %b |
| 1830 | ret <2 x i16> %1 |
| 1831 | } |
| 1832 | |
| 1833 | define <4 x i16> @i16_4(<4 x i16> %a, <4 x i16> %b) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 1834 | ; MIPS32-LABEL: i16_4: |
| 1835 | ; MIPS32: # %bb.0: |
| 1836 | ; MIPS32-NEXT: addu $1, $4, $6 |
| 1837 | ; MIPS32-NEXT: andi $1, $1, 65535 |
| 1838 | ; MIPS32-NEXT: srl $2, $6, 16 |
| 1839 | ; MIPS32-NEXT: srl $3, $4, 16 |
| 1840 | ; MIPS32-NEXT: addu $2, $3, $2 |
| 1841 | ; MIPS32-NEXT: sll $2, $2, 16 |
| 1842 | ; MIPS32-NEXT: or $2, $1, $2 |
| 1843 | ; MIPS32-NEXT: addu $1, $5, $7 |
| 1844 | ; MIPS32-NEXT: andi $1, $1, 65535 |
| 1845 | ; MIPS32-NEXT: srl $3, $7, 16 |
| 1846 | ; MIPS32-NEXT: srl $4, $5, 16 |
| 1847 | ; MIPS32-NEXT: addu $3, $4, $3 |
| 1848 | ; MIPS32-NEXT: sll $3, $3, 16 |
| 1849 | ; MIPS32-NEXT: or $3, $1, $3 |
| 1850 | ; MIPS32-NEXT: jr $ra |
| 1851 | ; MIPS32-NEXT: nop |
| 1852 | ; |
| 1853 | ; MIPS64-LABEL: i16_4: |
| 1854 | ; MIPS64: # %bb.0: |
| 1855 | ; MIPS64-NEXT: dsrl $1, $5, 48 |
| 1856 | ; MIPS64-NEXT: sll $1, $1, 0 |
| 1857 | ; MIPS64-NEXT: dsrl $2, $4, 48 |
| 1858 | ; MIPS64-NEXT: sll $2, $2, 0 |
| 1859 | ; MIPS64-NEXT: addu $1, $2, $1 |
| 1860 | ; MIPS64-NEXT: dsrl $2, $5, 32 |
| 1861 | ; MIPS64-NEXT: sll $1, $1, 16 |
| 1862 | ; MIPS64-NEXT: sll $2, $2, 0 |
| 1863 | ; MIPS64-NEXT: dsrl $3, $4, 32 |
| 1864 | ; MIPS64-NEXT: sll $3, $3, 0 |
| 1865 | ; MIPS64-NEXT: addu $2, $3, $2 |
| 1866 | ; MIPS64-NEXT: andi $2, $2, 65535 |
| 1867 | ; MIPS64-NEXT: or $1, $2, $1 |
| 1868 | ; MIPS64-NEXT: sll $2, $5, 0 |
| 1869 | ; MIPS64-NEXT: sll $3, $4, 0 |
| 1870 | ; MIPS64-NEXT: addu $4, $3, $2 |
| 1871 | ; MIPS64-NEXT: dsll $1, $1, 32 |
| 1872 | ; MIPS64-NEXT: andi $4, $4, 65535 |
| 1873 | ; MIPS64-NEXT: srl $2, $2, 16 |
| 1874 | ; MIPS64-NEXT: srl $3, $3, 16 |
| 1875 | ; MIPS64-NEXT: addu $2, $3, $2 |
| 1876 | ; MIPS64-NEXT: sll $2, $2, 16 |
| 1877 | ; MIPS64-NEXT: or $2, $4, $2 |
| 1878 | ; MIPS64-NEXT: dsll $2, $2, 32 |
| 1879 | ; MIPS64-NEXT: dsrl $2, $2, 32 |
| 1880 | ; MIPS64-NEXT: or $2, $2, $1 |
| 1881 | ; MIPS64-NEXT: jr $ra |
| 1882 | ; MIPS64-NEXT: nop |
| 1883 | ; |
| 1884 | ; MIPS32R5EB-LABEL: i16_4: |
| 1885 | ; MIPS32R5EB: # %bb.0: |
| 1886 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, -48 |
| 1887 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 48 |
| 1888 | ; MIPS32R5EB-NEXT: sw $fp, 44($sp) # 4-byte Folded Spill |
| 1889 | ; MIPS32R5EB-NEXT: .cfi_offset 30, -4 |
| 1890 | ; MIPS32R5EB-NEXT: move $fp, $sp |
| 1891 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 |
| 1892 | ; MIPS32R5EB-NEXT: addiu $1, $zero, -16 |
| 1893 | ; MIPS32R5EB-NEXT: and $sp, $sp, $1 |
| 1894 | ; MIPS32R5EB-NEXT: sw $6, 24($sp) |
| 1895 | ; MIPS32R5EB-NEXT: sw $7, 28($sp) |
| 1896 | ; MIPS32R5EB-NEXT: sw $4, 32($sp) |
| 1897 | ; MIPS32R5EB-NEXT: ldi.b $w0, 0 |
| 1898 | ; MIPS32R5EB-NEXT: lhu $1, 26($sp) |
| 1899 | ; MIPS32R5EB-NEXT: lhu $2, 24($sp) |
| 1900 | ; MIPS32R5EB-NEXT: move.v $w1, $w0 |
| 1901 | ; MIPS32R5EB-NEXT: insert.w $w1[0], $2 |
| 1902 | ; MIPS32R5EB-NEXT: insert.w $w1[1], $1 |
| 1903 | ; MIPS32R5EB-NEXT: lhu $1, 28($sp) |
| 1904 | ; MIPS32R5EB-NEXT: sw $5, 36($sp) |
| 1905 | ; MIPS32R5EB-NEXT: insert.w $w1[2], $1 |
| 1906 | ; MIPS32R5EB-NEXT: lhu $1, 32($sp) |
| 1907 | ; MIPS32R5EB-NEXT: lhu $2, 30($sp) |
| 1908 | ; MIPS32R5EB-NEXT: insert.w $w1[3], $2 |
| 1909 | ; MIPS32R5EB-NEXT: insert.w $w0[0], $1 |
| 1910 | ; MIPS32R5EB-NEXT: lhu $1, 34($sp) |
| 1911 | ; MIPS32R5EB-NEXT: insert.w $w0[1], $1 |
| 1912 | ; MIPS32R5EB-NEXT: lhu $1, 36($sp) |
| 1913 | ; MIPS32R5EB-NEXT: insert.w $w0[2], $1 |
| 1914 | ; MIPS32R5EB-NEXT: lhu $1, 38($sp) |
| 1915 | ; MIPS32R5EB-NEXT: insert.w $w0[3], $1 |
| 1916 | ; MIPS32R5EB-NEXT: addv.w $w0, $w0, $w1 |
| 1917 | ; MIPS32R5EB-NEXT: copy_s.w $1, $w0[0] |
| 1918 | ; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] |
| 1919 | ; MIPS32R5EB-NEXT: copy_s.w $3, $w0[2] |
| 1920 | ; MIPS32R5EB-NEXT: copy_s.w $4, $w0[3] |
| 1921 | ; MIPS32R5EB-NEXT: sh $4, 22($sp) |
| 1922 | ; MIPS32R5EB-NEXT: sh $3, 20($sp) |
| 1923 | ; MIPS32R5EB-NEXT: sh $2, 18($sp) |
| 1924 | ; MIPS32R5EB-NEXT: sh $1, 16($sp) |
| 1925 | ; MIPS32R5EB-NEXT: lw $1, 20($sp) |
| 1926 | ; MIPS32R5EB-NEXT: sw $1, 12($sp) |
| 1927 | ; MIPS32R5EB-NEXT: lw $1, 16($sp) |
| 1928 | ; MIPS32R5EB-NEXT: sw $1, 4($sp) |
| 1929 | ; MIPS32R5EB-NEXT: ld.w $w0, 0($sp) |
| 1930 | ; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] |
| 1931 | ; MIPS32R5EB-NEXT: copy_s.w $3, $w0[3] |
| 1932 | ; MIPS32R5EB-NEXT: move $sp, $fp |
| 1933 | ; MIPS32R5EB-NEXT: lw $fp, 44($sp) # 4-byte Folded Reload |
| 1934 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, 48 |
| 1935 | ; MIPS32R5EB-NEXT: jr $ra |
| 1936 | ; MIPS32R5EB-NEXT: nop |
| 1937 | ; |
| 1938 | ; MIPS64R5-LABEL: i16_4: |
| 1939 | ; MIPS64R5: # %bb.0: |
| 1940 | ; MIPS64R5-NEXT: daddiu $sp, $sp, -32 |
| 1941 | ; MIPS64R5-NEXT: .cfi_def_cfa_offset 32 |
| 1942 | ; MIPS64R5-NEXT: sd $5, 16($sp) |
| 1943 | ; MIPS64R5-NEXT: sd $4, 24($sp) |
| 1944 | ; MIPS64R5-NEXT: ldi.b $w0, 0 |
| 1945 | ; MIPS64R5-NEXT: lhu $1, 18($sp) |
| 1946 | ; MIPS64R5-NEXT: lhu $2, 16($sp) |
| 1947 | ; MIPS64R5-NEXT: move.v $w1, $w0 |
| 1948 | ; MIPS64R5-NEXT: insert.w $w1[0], $2 |
| 1949 | ; MIPS64R5-NEXT: insert.w $w1[1], $1 |
| 1950 | ; MIPS64R5-NEXT: lhu $1, 20($sp) |
| 1951 | ; MIPS64R5-NEXT: insert.w $w1[2], $1 |
| 1952 | ; MIPS64R5-NEXT: lhu $1, 24($sp) |
| 1953 | ; MIPS64R5-NEXT: lhu $2, 22($sp) |
| 1954 | ; MIPS64R5-NEXT: insert.w $w1[3], $2 |
| 1955 | ; MIPS64R5-NEXT: insert.w $w0[0], $1 |
| 1956 | ; MIPS64R5-NEXT: lhu $1, 26($sp) |
| 1957 | ; MIPS64R5-NEXT: insert.w $w0[1], $1 |
| 1958 | ; MIPS64R5-NEXT: lhu $1, 28($sp) |
| 1959 | ; MIPS64R5-NEXT: insert.w $w0[2], $1 |
| 1960 | ; MIPS64R5-NEXT: lhu $1, 30($sp) |
| 1961 | ; MIPS64R5-NEXT: insert.w $w0[3], $1 |
| 1962 | ; MIPS64R5-NEXT: addv.w $w0, $w0, $w1 |
| 1963 | ; MIPS64R5-NEXT: copy_s.w $1, $w0[0] |
| 1964 | ; MIPS64R5-NEXT: copy_s.w $2, $w0[1] |
| 1965 | ; MIPS64R5-NEXT: copy_s.w $3, $w0[2] |
| 1966 | ; MIPS64R5-NEXT: copy_s.w $4, $w0[3] |
| 1967 | ; MIPS64R5-NEXT: sh $4, 14($sp) |
| 1968 | ; MIPS64R5-NEXT: sh $3, 12($sp) |
| 1969 | ; MIPS64R5-NEXT: sh $2, 10($sp) |
| 1970 | ; MIPS64R5-NEXT: sh $1, 8($sp) |
| 1971 | ; MIPS64R5-NEXT: ld $2, 8($sp) |
| 1972 | ; MIPS64R5-NEXT: daddiu $sp, $sp, 32 |
| 1973 | ; MIPS64R5-NEXT: jr $ra |
| 1974 | ; MIPS64R5-NEXT: nop |
| 1975 | ; |
| 1976 | ; MIPS32R5EL-LABEL: i16_4: |
| 1977 | ; MIPS32R5EL: # %bb.0: |
| 1978 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, -48 |
| 1979 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 48 |
| 1980 | ; MIPS32R5EL-NEXT: sw $fp, 44($sp) # 4-byte Folded Spill |
| 1981 | ; MIPS32R5EL-NEXT: .cfi_offset 30, -4 |
| 1982 | ; MIPS32R5EL-NEXT: move $fp, $sp |
| 1983 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 |
| 1984 | ; MIPS32R5EL-NEXT: addiu $1, $zero, -16 |
| 1985 | ; MIPS32R5EL-NEXT: and $sp, $sp, $1 |
| 1986 | ; MIPS32R5EL-NEXT: sw $6, 24($sp) |
| 1987 | ; MIPS32R5EL-NEXT: sw $7, 28($sp) |
| 1988 | ; MIPS32R5EL-NEXT: sw $4, 32($sp) |
| 1989 | ; MIPS32R5EL-NEXT: ldi.b $w0, 0 |
| 1990 | ; MIPS32R5EL-NEXT: lhu $1, 26($sp) |
| 1991 | ; MIPS32R5EL-NEXT: lhu $2, 24($sp) |
| 1992 | ; MIPS32R5EL-NEXT: move.v $w1, $w0 |
| 1993 | ; MIPS32R5EL-NEXT: insert.w $w1[0], $2 |
| 1994 | ; MIPS32R5EL-NEXT: insert.w $w1[1], $1 |
| 1995 | ; MIPS32R5EL-NEXT: lhu $1, 28($sp) |
| 1996 | ; MIPS32R5EL-NEXT: sw $5, 36($sp) |
| 1997 | ; MIPS32R5EL-NEXT: insert.w $w1[2], $1 |
| 1998 | ; MIPS32R5EL-NEXT: lhu $1, 32($sp) |
| 1999 | ; MIPS32R5EL-NEXT: lhu $2, 30($sp) |
| 2000 | ; MIPS32R5EL-NEXT: insert.w $w1[3], $2 |
| 2001 | ; MIPS32R5EL-NEXT: insert.w $w0[0], $1 |
| 2002 | ; MIPS32R5EL-NEXT: lhu $1, 34($sp) |
| 2003 | ; MIPS32R5EL-NEXT: insert.w $w0[1], $1 |
| 2004 | ; MIPS32R5EL-NEXT: lhu $1, 36($sp) |
| 2005 | ; MIPS32R5EL-NEXT: insert.w $w0[2], $1 |
| 2006 | ; MIPS32R5EL-NEXT: lhu $1, 38($sp) |
| 2007 | ; MIPS32R5EL-NEXT: insert.w $w0[3], $1 |
| 2008 | ; MIPS32R5EL-NEXT: addv.w $w0, $w0, $w1 |
| 2009 | ; MIPS32R5EL-NEXT: copy_s.w $1, $w0[0] |
| 2010 | ; MIPS32R5EL-NEXT: copy_s.w $2, $w0[1] |
| 2011 | ; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] |
| 2012 | ; MIPS32R5EL-NEXT: copy_s.w $4, $w0[3] |
| 2013 | ; MIPS32R5EL-NEXT: sh $4, 22($sp) |
| 2014 | ; MIPS32R5EL-NEXT: sh $3, 20($sp) |
| 2015 | ; MIPS32R5EL-NEXT: sh $2, 18($sp) |
| 2016 | ; MIPS32R5EL-NEXT: sh $1, 16($sp) |
| 2017 | ; MIPS32R5EL-NEXT: lw $1, 20($sp) |
| 2018 | ; MIPS32R5EL-NEXT: sw $1, 8($sp) |
| 2019 | ; MIPS32R5EL-NEXT: lw $1, 16($sp) |
| 2020 | ; MIPS32R5EL-NEXT: sw $1, 0($sp) |
| 2021 | ; MIPS32R5EL-NEXT: ld.w $w0, 0($sp) |
| 2022 | ; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] |
| 2023 | ; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] |
| 2024 | ; MIPS32R5EL-NEXT: move $sp, $fp |
| 2025 | ; MIPS32R5EL-NEXT: lw $fp, 44($sp) # 4-byte Folded Reload |
| 2026 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, 48 |
| 2027 | ; MIPS32R5EL-NEXT: jr $ra |
| 2028 | ; MIPS32R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 2029 | %1 = add <4 x i16> %a, %b |
| 2030 | ret <4 x i16> %1 |
| 2031 | } |
| 2032 | |
| 2033 | define <8 x i16> @i16_8(<8 x i16> %a, <8 x i16> %b) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 2034 | ; MIPS32-LABEL: i16_8: |
| 2035 | ; MIPS32: # %bb.0: |
| 2036 | ; MIPS32-NEXT: lw $1, 24($sp) |
| 2037 | ; MIPS32-NEXT: srl $2, $1, 16 |
| 2038 | ; MIPS32-NEXT: srl $3, $6, 16 |
| 2039 | ; MIPS32-NEXT: lw $8, 20($sp) |
| 2040 | ; MIPS32-NEXT: srl $9, $8, 16 |
| 2041 | ; MIPS32-NEXT: srl $10, $5, 16 |
| 2042 | ; MIPS32-NEXT: addu $9, $10, $9 |
| 2043 | ; MIPS32-NEXT: addu $5, $5, $8 |
| 2044 | ; MIPS32-NEXT: addu $2, $3, $2 |
| 2045 | ; MIPS32-NEXT: addu $1, $6, $1 |
| 2046 | ; MIPS32-NEXT: lw $3, 16($sp) |
| 2047 | ; MIPS32-NEXT: lw $6, 28($sp) |
| 2048 | ; MIPS32-NEXT: addu $8, $7, $6 |
| 2049 | ; MIPS32-NEXT: andi $1, $1, 65535 |
| 2050 | ; MIPS32-NEXT: sll $10, $2, 16 |
| 2051 | ; MIPS32-NEXT: andi $5, $5, 65535 |
| 2052 | ; MIPS32-NEXT: sll $9, $9, 16 |
| 2053 | ; MIPS32-NEXT: addu $2, $4, $3 |
| 2054 | ; MIPS32-NEXT: andi $2, $2, 65535 |
| 2055 | ; MIPS32-NEXT: srl $3, $3, 16 |
| 2056 | ; MIPS32-NEXT: srl $4, $4, 16 |
| 2057 | ; MIPS32-NEXT: addu $3, $4, $3 |
| 2058 | ; MIPS32-NEXT: sll $3, $3, 16 |
| 2059 | ; MIPS32-NEXT: or $2, $2, $3 |
| 2060 | ; MIPS32-NEXT: or $3, $5, $9 |
| 2061 | ; MIPS32-NEXT: or $4, $1, $10 |
| 2062 | ; MIPS32-NEXT: andi $1, $8, 65535 |
| 2063 | ; MIPS32-NEXT: srl $5, $6, 16 |
| 2064 | ; MIPS32-NEXT: srl $6, $7, 16 |
| 2065 | ; MIPS32-NEXT: addu $5, $6, $5 |
| 2066 | ; MIPS32-NEXT: sll $5, $5, 16 |
| 2067 | ; MIPS32-NEXT: or $5, $1, $5 |
| 2068 | ; MIPS32-NEXT: jr $ra |
| 2069 | ; MIPS32-NEXT: nop |
| 2070 | ; |
| 2071 | ; MIPS64-LABEL: i16_8: |
| 2072 | ; MIPS64: # %bb.0: |
| 2073 | ; MIPS64-NEXT: dsrl $1, $6, 48 |
| 2074 | ; MIPS64-NEXT: dsrl $2, $7, 48 |
| 2075 | ; MIPS64-NEXT: sll $1, $1, 0 |
| 2076 | ; MIPS64-NEXT: dsrl $3, $4, 48 |
| 2077 | ; MIPS64-NEXT: sll $3, $3, 0 |
| 2078 | ; MIPS64-NEXT: addu $1, $3, $1 |
| 2079 | ; MIPS64-NEXT: dsrl $3, $6, 32 |
| 2080 | ; MIPS64-NEXT: sll $2, $2, 0 |
| 2081 | ; MIPS64-NEXT: dsrl $8, $5, 48 |
| 2082 | ; MIPS64-NEXT: sll $8, $8, 0 |
| 2083 | ; MIPS64-NEXT: addu $2, $8, $2 |
| 2084 | ; MIPS64-NEXT: sll $1, $1, 16 |
| 2085 | ; MIPS64-NEXT: sll $3, $3, 0 |
| 2086 | ; MIPS64-NEXT: dsrl $8, $4, 32 |
| 2087 | ; MIPS64-NEXT: sll $8, $8, 0 |
| 2088 | ; MIPS64-NEXT: addu $3, $8, $3 |
| 2089 | ; MIPS64-NEXT: andi $3, $3, 65535 |
| 2090 | ; MIPS64-NEXT: dsrl $8, $7, 32 |
| 2091 | ; MIPS64-NEXT: or $1, $3, $1 |
| 2092 | ; MIPS64-NEXT: sll $2, $2, 16 |
| 2093 | ; MIPS64-NEXT: sll $3, $8, 0 |
| 2094 | ; MIPS64-NEXT: dsrl $8, $5, 32 |
| 2095 | ; MIPS64-NEXT: sll $8, $8, 0 |
| 2096 | ; MIPS64-NEXT: addu $3, $8, $3 |
| 2097 | ; MIPS64-NEXT: andi $3, $3, 65535 |
| 2098 | ; MIPS64-NEXT: or $3, $3, $2 |
| 2099 | ; MIPS64-NEXT: sll $2, $6, 0 |
| 2100 | ; MIPS64-NEXT: sll $4, $4, 0 |
| 2101 | ; MIPS64-NEXT: addu $6, $4, $2 |
| 2102 | ; MIPS64-NEXT: andi $6, $6, 65535 |
| 2103 | ; MIPS64-NEXT: srl $2, $2, 16 |
| 2104 | ; MIPS64-NEXT: srl $4, $4, 16 |
| 2105 | ; MIPS64-NEXT: addu $2, $4, $2 |
| 2106 | ; MIPS64-NEXT: sll $2, $2, 16 |
| 2107 | ; MIPS64-NEXT: dsll $1, $1, 32 |
| 2108 | ; MIPS64-NEXT: or $2, $6, $2 |
| 2109 | ; MIPS64-NEXT: dsll $2, $2, 32 |
| 2110 | ; MIPS64-NEXT: dsrl $2, $2, 32 |
| 2111 | ; MIPS64-NEXT: sll $4, $7, 0 |
| 2112 | ; MIPS64-NEXT: sll $5, $5, 0 |
| 2113 | ; MIPS64-NEXT: addu $6, $5, $4 |
| 2114 | ; MIPS64-NEXT: or $2, $2, $1 |
| 2115 | ; MIPS64-NEXT: dsll $1, $3, 32 |
| 2116 | ; MIPS64-NEXT: andi $3, $6, 65535 |
| 2117 | ; MIPS64-NEXT: srl $4, $4, 16 |
| 2118 | ; MIPS64-NEXT: srl $5, $5, 16 |
| 2119 | ; MIPS64-NEXT: addu $4, $5, $4 |
| 2120 | ; MIPS64-NEXT: sll $4, $4, 16 |
| 2121 | ; MIPS64-NEXT: or $3, $3, $4 |
| 2122 | ; MIPS64-NEXT: dsll $3, $3, 32 |
| 2123 | ; MIPS64-NEXT: dsrl $3, $3, 32 |
| 2124 | ; MIPS64-NEXT: or $3, $3, $1 |
| 2125 | ; MIPS64-NEXT: jr $ra |
| 2126 | ; MIPS64-NEXT: nop |
| 2127 | ; |
| 2128 | ; MIPS32R5EB-LABEL: i16_8: |
| 2129 | ; MIPS32R5EB: # %bb.0: |
| 2130 | ; MIPS32R5EB-NEXT: ldi.b $w0, 0 |
| 2131 | ; MIPS32R5EB-NEXT: lw $1, 20($sp) |
| 2132 | ; MIPS32R5EB-NEXT: lw $2, 16($sp) |
| 2133 | ; MIPS32R5EB-NEXT: move.v $w1, $w0 |
| 2134 | ; MIPS32R5EB-NEXT: insert.w $w1[0], $2 |
| 2135 | ; MIPS32R5EB-NEXT: insert.w $w1[1], $1 |
| 2136 | ; MIPS32R5EB-NEXT: lw $1, 24($sp) |
| 2137 | ; MIPS32R5EB-NEXT: insert.w $w0[0], $4 |
| 2138 | ; MIPS32R5EB-NEXT: insert.w $w1[2], $1 |
| 2139 | ; MIPS32R5EB-NEXT: lw $1, 28($sp) |
| 2140 | ; MIPS32R5EB-NEXT: insert.w $w1[3], $1 |
| 2141 | ; MIPS32R5EB-NEXT: shf.h $w1, $w1, 177 |
| 2142 | ; MIPS32R5EB-NEXT: insert.w $w0[1], $5 |
| 2143 | ; MIPS32R5EB-NEXT: insert.w $w0[2], $6 |
| 2144 | ; MIPS32R5EB-NEXT: insert.w $w0[3], $7 |
| 2145 | ; MIPS32R5EB-NEXT: shf.h $w0, $w0, 177 |
| 2146 | ; MIPS32R5EB-NEXT: addv.h $w0, $w0, $w1 |
| 2147 | ; MIPS32R5EB-NEXT: shf.h $w0, $w0, 177 |
| 2148 | ; MIPS32R5EB-NEXT: copy_s.w $2, $w0[0] |
| 2149 | ; MIPS32R5EB-NEXT: copy_s.w $3, $w0[1] |
| 2150 | ; MIPS32R5EB-NEXT: copy_s.w $4, $w0[2] |
| 2151 | ; MIPS32R5EB-NEXT: copy_s.w $5, $w0[3] |
| 2152 | ; MIPS32R5EB-NEXT: jr $ra |
| 2153 | ; MIPS32R5EB-NEXT: nop |
| 2154 | ; |
| 2155 | ; MIPS64R5EB-LABEL: i16_8: |
| 2156 | ; MIPS64R5EB: # %bb.0: |
| 2157 | ; MIPS64R5EB-NEXT: ldi.b $w0, 0 |
| 2158 | ; MIPS64R5EB-NEXT: move.v $w1, $w0 |
| 2159 | ; MIPS64R5EB-NEXT: insert.d $w1[0], $6 |
| 2160 | ; MIPS64R5EB-NEXT: insert.d $w1[1], $7 |
| 2161 | ; MIPS64R5EB-NEXT: shf.h $w1, $w1, 27 |
| 2162 | ; MIPS64R5EB-NEXT: insert.d $w0[0], $4 |
| 2163 | ; MIPS64R5EB-NEXT: insert.d $w0[1], $5 |
| 2164 | ; MIPS64R5EB-NEXT: shf.h $w0, $w0, 27 |
| 2165 | ; MIPS64R5EB-NEXT: addv.h $w0, $w0, $w1 |
| 2166 | ; MIPS64R5EB-NEXT: shf.h $w0, $w0, 27 |
| 2167 | ; MIPS64R5EB-NEXT: copy_s.d $2, $w0[0] |
| 2168 | ; MIPS64R5EB-NEXT: copy_s.d $3, $w0[1] |
| 2169 | ; MIPS64R5EB-NEXT: jr $ra |
| 2170 | ; MIPS64R5EB-NEXT: nop |
| 2171 | ; |
| 2172 | ; MIPS32R5EL-LABEL: i16_8: |
| 2173 | ; MIPS32R5EL: # %bb.0: |
| 2174 | ; MIPS32R5EL-NEXT: ldi.b $w0, 0 |
| 2175 | ; MIPS32R5EL-NEXT: lw $1, 20($sp) |
| 2176 | ; MIPS32R5EL-NEXT: lw $2, 16($sp) |
| 2177 | ; MIPS32R5EL-NEXT: move.v $w1, $w0 |
| 2178 | ; MIPS32R5EL-NEXT: insert.w $w1[0], $2 |
| 2179 | ; MIPS32R5EL-NEXT: insert.w $w1[1], $1 |
| 2180 | ; MIPS32R5EL-NEXT: lw $1, 24($sp) |
| 2181 | ; MIPS32R5EL-NEXT: insert.w $w1[2], $1 |
| 2182 | ; MIPS32R5EL-NEXT: lw $1, 28($sp) |
| 2183 | ; MIPS32R5EL-NEXT: insert.w $w1[3], $1 |
| 2184 | ; MIPS32R5EL-NEXT: insert.w $w0[0], $4 |
| 2185 | ; MIPS32R5EL-NEXT: insert.w $w0[1], $5 |
| 2186 | ; MIPS32R5EL-NEXT: insert.w $w0[2], $6 |
| 2187 | ; MIPS32R5EL-NEXT: insert.w $w0[3], $7 |
| 2188 | ; MIPS32R5EL-NEXT: addv.h $w0, $w0, $w1 |
| 2189 | ; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] |
| 2190 | ; MIPS32R5EL-NEXT: copy_s.w $3, $w0[1] |
| 2191 | ; MIPS32R5EL-NEXT: copy_s.w $4, $w0[2] |
| 2192 | ; MIPS32R5EL-NEXT: copy_s.w $5, $w0[3] |
| 2193 | ; MIPS32R5EL-NEXT: jr $ra |
| 2194 | ; MIPS32R5EL-NEXT: nop |
| 2195 | ; |
| 2196 | ; MIPS64R5EL-LABEL: i16_8: |
| 2197 | ; MIPS64R5EL: # %bb.0: |
| 2198 | ; MIPS64R5EL-NEXT: ldi.b $w0, 0 |
| 2199 | ; MIPS64R5EL-NEXT: move.v $w1, $w0 |
| 2200 | ; MIPS64R5EL-NEXT: insert.d $w1[0], $6 |
| 2201 | ; MIPS64R5EL-NEXT: insert.d $w1[1], $7 |
| 2202 | ; MIPS64R5EL-NEXT: insert.d $w0[0], $4 |
| 2203 | ; MIPS64R5EL-NEXT: insert.d $w0[1], $5 |
| 2204 | ; MIPS64R5EL-NEXT: addv.h $w0, $w0, $w1 |
| 2205 | ; MIPS64R5EL-NEXT: copy_s.d $2, $w0[0] |
| 2206 | ; MIPS64R5EL-NEXT: copy_s.d $3, $w0[1] |
| 2207 | ; MIPS64R5EL-NEXT: jr $ra |
| 2208 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 2209 | %1 = add <8 x i16> %a, %b |
| 2210 | ret <8 x i16> %1 |
| 2211 | } |
| 2212 | |
| 2213 | define <2 x i32> @i32_2(<2 x i32> %a, <2 x i32> %b) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 2214 | ; MIPS32-LABEL: i32_2: |
| 2215 | ; MIPS32: # %bb.0: |
| 2216 | ; MIPS32-NEXT: addu $2, $4, $6 |
| 2217 | ; MIPS32-NEXT: addu $3, $5, $7 |
| 2218 | ; MIPS32-NEXT: jr $ra |
| 2219 | ; MIPS32-NEXT: nop |
| 2220 | ; |
| 2221 | ; MIPS64-LABEL: i32_2: |
| 2222 | ; MIPS64: # %bb.0: |
| 2223 | ; MIPS64-NEXT: sll $1, $5, 0 |
| 2224 | ; MIPS64-NEXT: sll $2, $4, 0 |
| 2225 | ; MIPS64-NEXT: addu $1, $2, $1 |
| 2226 | ; MIPS64-NEXT: dsll $1, $1, 32 |
| 2227 | ; MIPS64-NEXT: dsrl $2, $5, 32 |
| 2228 | ; MIPS64-NEXT: dsrl $1, $1, 32 |
| 2229 | ; MIPS64-NEXT: sll $2, $2, 0 |
| 2230 | ; MIPS64-NEXT: dsrl $3, $4, 32 |
| 2231 | ; MIPS64-NEXT: sll $3, $3, 0 |
| 2232 | ; MIPS64-NEXT: addu $2, $3, $2 |
| 2233 | ; MIPS64-NEXT: dsll $2, $2, 32 |
| 2234 | ; MIPS64-NEXT: or $2, $1, $2 |
| 2235 | ; MIPS64-NEXT: jr $ra |
| 2236 | ; MIPS64-NEXT: nop |
| 2237 | ; |
| 2238 | ; MIPS32R5EB-LABEL: i32_2: |
| 2239 | ; MIPS32R5EB: # %bb.0: |
| 2240 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, -48 |
| 2241 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 48 |
| 2242 | ; MIPS32R5EB-NEXT: sw $fp, 44($sp) # 4-byte Folded Spill |
| 2243 | ; MIPS32R5EB-NEXT: .cfi_offset 30, -4 |
| 2244 | ; MIPS32R5EB-NEXT: move $fp, $sp |
| 2245 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 |
| 2246 | ; MIPS32R5EB-NEXT: addiu $1, $zero, -16 |
| 2247 | ; MIPS32R5EB-NEXT: and $sp, $sp, $1 |
| 2248 | ; MIPS32R5EB-NEXT: sw $7, 28($sp) |
| 2249 | ; MIPS32R5EB-NEXT: sw $6, 20($sp) |
| 2250 | ; MIPS32R5EB-NEXT: sw $5, 12($sp) |
| 2251 | ; MIPS32R5EB-NEXT: sw $4, 4($sp) |
| 2252 | ; MIPS32R5EB-NEXT: ld.d $w0, 16($sp) |
| 2253 | ; MIPS32R5EB-NEXT: ld.d $w1, 0($sp) |
| 2254 | ; MIPS32R5EB-NEXT: addv.d $w0, $w1, $w0 |
| 2255 | ; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 |
| 2256 | ; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] |
| 2257 | ; MIPS32R5EB-NEXT: copy_s.w $3, $w0[3] |
| 2258 | ; MIPS32R5EB-NEXT: move $sp, $fp |
| 2259 | ; MIPS32R5EB-NEXT: lw $fp, 44($sp) # 4-byte Folded Reload |
| 2260 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, 48 |
| 2261 | ; MIPS32R5EB-NEXT: jr $ra |
| 2262 | ; MIPS32R5EB-NEXT: nop |
| 2263 | ; |
| 2264 | ; MIPS64R5-LABEL: i32_2: |
| 2265 | ; MIPS64R5: # %bb.0: |
| 2266 | ; MIPS64R5-NEXT: daddiu $sp, $sp, -32 |
| 2267 | ; MIPS64R5-NEXT: .cfi_def_cfa_offset 32 |
| 2268 | ; MIPS64R5-NEXT: sd $5, 16($sp) |
| 2269 | ; MIPS64R5-NEXT: sd $4, 24($sp) |
| 2270 | ; MIPS64R5-NEXT: ldi.b $w0, 0 |
| 2271 | ; MIPS64R5-NEXT: lw $1, 20($sp) |
| 2272 | ; MIPS64R5-NEXT: lw $2, 16($sp) |
| 2273 | ; MIPS64R5-NEXT: move.v $w1, $w0 |
| 2274 | ; MIPS64R5-NEXT: insert.d $w1[0], $2 |
| 2275 | ; MIPS64R5-NEXT: insert.d $w1[1], $1 |
| 2276 | ; MIPS64R5-NEXT: lw $1, 24($sp) |
| 2277 | ; MIPS64R5-NEXT: insert.d $w0[0], $1 |
| 2278 | ; MIPS64R5-NEXT: lw $1, 28($sp) |
| 2279 | ; MIPS64R5-NEXT: insert.d $w0[1], $1 |
| 2280 | ; MIPS64R5-NEXT: addv.d $w0, $w0, $w1 |
| 2281 | ; MIPS64R5-NEXT: copy_s.d $1, $w0[0] |
| 2282 | ; MIPS64R5-NEXT: copy_s.d $2, $w0[1] |
| 2283 | ; MIPS64R5-NEXT: sw $2, 12($sp) |
| 2284 | ; MIPS64R5-NEXT: sw $1, 8($sp) |
| 2285 | ; MIPS64R5-NEXT: ld $2, 8($sp) |
| 2286 | ; MIPS64R5-NEXT: daddiu $sp, $sp, 32 |
| 2287 | ; MIPS64R5-NEXT: jr $ra |
| 2288 | ; MIPS64R5-NEXT: nop |
| 2289 | ; |
| 2290 | ; MIPS32R5EL-LABEL: i32_2: |
| 2291 | ; MIPS32R5EL: # %bb.0: |
| 2292 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, -48 |
| 2293 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 48 |
| 2294 | ; MIPS32R5EL-NEXT: sw $fp, 44($sp) # 4-byte Folded Spill |
| 2295 | ; MIPS32R5EL-NEXT: .cfi_offset 30, -4 |
| 2296 | ; MIPS32R5EL-NEXT: move $fp, $sp |
| 2297 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 |
| 2298 | ; MIPS32R5EL-NEXT: addiu $1, $zero, -16 |
| 2299 | ; MIPS32R5EL-NEXT: and $sp, $sp, $1 |
| 2300 | ; MIPS32R5EL-NEXT: sw $7, 24($sp) |
| 2301 | ; MIPS32R5EL-NEXT: sw $6, 16($sp) |
| 2302 | ; MIPS32R5EL-NEXT: sw $5, 8($sp) |
| 2303 | ; MIPS32R5EL-NEXT: sw $4, 0($sp) |
| 2304 | ; MIPS32R5EL-NEXT: ld.d $w0, 16($sp) |
| 2305 | ; MIPS32R5EL-NEXT: ld.d $w1, 0($sp) |
| 2306 | ; MIPS32R5EL-NEXT: addv.d $w0, $w1, $w0 |
| 2307 | ; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] |
| 2308 | ; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] |
| 2309 | ; MIPS32R5EL-NEXT: move $sp, $fp |
| 2310 | ; MIPS32R5EL-NEXT: lw $fp, 44($sp) # 4-byte Folded Reload |
| 2311 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, 48 |
| 2312 | ; MIPS32R5EL-NEXT: jr $ra |
| 2313 | ; MIPS32R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 2314 | %1 = add <2 x i32> %a, %b |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 2315 | ret <2 x i32> %1 |
| 2316 | } |
| 2317 | |
| 2318 | define <4 x i32> @i32_4(<4 x i32> %a, <4 x i32> %b) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 2319 | ; MIPS32-LABEL: i32_4: |
| 2320 | ; MIPS32: # %bb.0: |
| 2321 | ; MIPS32-NEXT: lw $1, 20($sp) |
| 2322 | ; MIPS32-NEXT: lw $2, 16($sp) |
| 2323 | ; MIPS32-NEXT: addu $2, $4, $2 |
| 2324 | ; MIPS32-NEXT: addu $3, $5, $1 |
| 2325 | ; MIPS32-NEXT: lw $1, 24($sp) |
| 2326 | ; MIPS32-NEXT: addu $4, $6, $1 |
| 2327 | ; MIPS32-NEXT: lw $1, 28($sp) |
| 2328 | ; MIPS32-NEXT: addu $5, $7, $1 |
| 2329 | ; MIPS32-NEXT: jr $ra |
| 2330 | ; MIPS32-NEXT: nop |
| 2331 | ; |
| 2332 | ; MIPS64-LABEL: i32_4: |
| 2333 | ; MIPS64: # %bb.0: |
| 2334 | ; MIPS64-NEXT: sll $1, $6, 0 |
| 2335 | ; MIPS64-NEXT: sll $2, $4, 0 |
| 2336 | ; MIPS64-NEXT: addu $1, $2, $1 |
| 2337 | ; MIPS64-NEXT: dsll $1, $1, 32 |
| 2338 | ; MIPS64-NEXT: sll $2, $7, 0 |
| 2339 | ; MIPS64-NEXT: sll $3, $5, 0 |
| 2340 | ; MIPS64-NEXT: addu $2, $3, $2 |
| 2341 | ; MIPS64-NEXT: dsrl $3, $6, 32 |
| 2342 | ; MIPS64-NEXT: dsll $6, $2, 32 |
| 2343 | ; MIPS64-NEXT: dsrl $1, $1, 32 |
| 2344 | ; MIPS64-NEXT: sll $2, $3, 0 |
| 2345 | ; MIPS64-NEXT: dsrl $3, $4, 32 |
| 2346 | ; MIPS64-NEXT: sll $3, $3, 0 |
| 2347 | ; MIPS64-NEXT: addu $2, $3, $2 |
| 2348 | ; MIPS64-NEXT: dsll $2, $2, 32 |
| 2349 | ; MIPS64-NEXT: dsrl $3, $7, 32 |
| 2350 | ; MIPS64-NEXT: or $2, $1, $2 |
| 2351 | ; MIPS64-NEXT: dsrl $1, $6, 32 |
| 2352 | ; MIPS64-NEXT: sll $3, $3, 0 |
| 2353 | ; MIPS64-NEXT: dsrl $4, $5, 32 |
| 2354 | ; MIPS64-NEXT: sll $4, $4, 0 |
| 2355 | ; MIPS64-NEXT: addu $3, $4, $3 |
| 2356 | ; MIPS64-NEXT: dsll $3, $3, 32 |
| 2357 | ; MIPS64-NEXT: or $3, $1, $3 |
| 2358 | ; MIPS64-NEXT: jr $ra |
| 2359 | ; MIPS64-NEXT: nop |
| 2360 | ; |
| 2361 | ; MIPS32R5-LABEL: i32_4: |
| 2362 | ; MIPS32R5: # %bb.0: |
| 2363 | ; MIPS32R5-NEXT: ldi.b $w0, 0 |
| 2364 | ; MIPS32R5-NEXT: lw $1, 20($sp) |
| 2365 | ; MIPS32R5-NEXT: lw $2, 16($sp) |
| 2366 | ; MIPS32R5-NEXT: move.v $w1, $w0 |
| 2367 | ; MIPS32R5-NEXT: insert.w $w1[0], $2 |
| 2368 | ; MIPS32R5-NEXT: insert.w $w1[1], $1 |
| 2369 | ; MIPS32R5-NEXT: lw $1, 24($sp) |
| 2370 | ; MIPS32R5-NEXT: insert.w $w1[2], $1 |
| 2371 | ; MIPS32R5-NEXT: lw $1, 28($sp) |
| 2372 | ; MIPS32R5-NEXT: insert.w $w1[3], $1 |
| 2373 | ; MIPS32R5-NEXT: insert.w $w0[0], $4 |
| 2374 | ; MIPS32R5-NEXT: insert.w $w0[1], $5 |
| 2375 | ; MIPS32R5-NEXT: insert.w $w0[2], $6 |
| 2376 | ; MIPS32R5-NEXT: insert.w $w0[3], $7 |
| 2377 | ; MIPS32R5-NEXT: addv.w $w0, $w0, $w1 |
| 2378 | ; MIPS32R5-NEXT: copy_s.w $2, $w0[0] |
| 2379 | ; MIPS32R5-NEXT: copy_s.w $3, $w0[1] |
| 2380 | ; MIPS32R5-NEXT: copy_s.w $4, $w0[2] |
| 2381 | ; MIPS32R5-NEXT: copy_s.w $5, $w0[3] |
| 2382 | ; MIPS32R5-NEXT: jr $ra |
| 2383 | ; MIPS32R5-NEXT: nop |
| 2384 | ; |
| 2385 | ; MIPS64R5EB-LABEL: i32_4: |
| 2386 | ; MIPS64R5EB: # %bb.0: |
| 2387 | ; MIPS64R5EB-NEXT: ldi.b $w0, 0 |
| 2388 | ; MIPS64R5EB-NEXT: move.v $w1, $w0 |
| 2389 | ; MIPS64R5EB-NEXT: insert.d $w1[0], $6 |
| 2390 | ; MIPS64R5EB-NEXT: insert.d $w1[1], $7 |
| 2391 | ; MIPS64R5EB-NEXT: shf.w $w1, $w1, 177 |
| 2392 | ; MIPS64R5EB-NEXT: insert.d $w0[0], $4 |
| 2393 | ; MIPS64R5EB-NEXT: insert.d $w0[1], $5 |
| 2394 | ; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 |
| 2395 | ; MIPS64R5EB-NEXT: addv.w $w0, $w0, $w1 |
| 2396 | ; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 |
| 2397 | ; MIPS64R5EB-NEXT: copy_s.d $2, $w0[0] |
| 2398 | ; MIPS64R5EB-NEXT: copy_s.d $3, $w0[1] |
| 2399 | ; MIPS64R5EB-NEXT: jr $ra |
| 2400 | ; MIPS64R5EB-NEXT: nop |
| 2401 | ; |
| 2402 | ; MIPS64R5EL-LABEL: i32_4: |
| 2403 | ; MIPS64R5EL: # %bb.0: |
| 2404 | ; MIPS64R5EL-NEXT: ldi.b $w0, 0 |
| 2405 | ; MIPS64R5EL-NEXT: move.v $w1, $w0 |
| 2406 | ; MIPS64R5EL-NEXT: insert.d $w1[0], $6 |
| 2407 | ; MIPS64R5EL-NEXT: insert.d $w1[1], $7 |
| 2408 | ; MIPS64R5EL-NEXT: insert.d $w0[0], $4 |
| 2409 | ; MIPS64R5EL-NEXT: insert.d $w0[1], $5 |
| 2410 | ; MIPS64R5EL-NEXT: addv.w $w0, $w0, $w1 |
| 2411 | ; MIPS64R5EL-NEXT: copy_s.d $2, $w0[0] |
| 2412 | ; MIPS64R5EL-NEXT: copy_s.d $3, $w0[1] |
| 2413 | ; MIPS64R5EL-NEXT: jr $ra |
| 2414 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 2415 | %1 = add <4 x i32> %a, %b |
| 2416 | ret <4 x i32> %1 |
| 2417 | } |
| 2418 | |
| 2419 | define <2 x i64> @i64_2(<2 x i64> %a, <2 x i64> %b) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 2420 | ; MIPS32EB-LABEL: i64_2: |
| 2421 | ; MIPS32EB: # %bb.0: |
| 2422 | ; MIPS32EB-NEXT: lw $1, 16($sp) |
| 2423 | ; MIPS32EB-NEXT: addu $1, $4, $1 |
| 2424 | ; MIPS32EB-NEXT: lw $2, 20($sp) |
| 2425 | ; MIPS32EB-NEXT: addu $3, $5, $2 |
| 2426 | ; MIPS32EB-NEXT: sltu $2, $3, $5 |
| 2427 | ; MIPS32EB-NEXT: lw $4, 24($sp) |
| 2428 | ; MIPS32EB-NEXT: addu $2, $1, $2 |
| 2429 | ; MIPS32EB-NEXT: addu $1, $6, $4 |
| 2430 | ; MIPS32EB-NEXT: lw $4, 28($sp) |
| 2431 | ; MIPS32EB-NEXT: addu $5, $7, $4 |
| 2432 | ; MIPS32EB-NEXT: sltu $4, $5, $7 |
| 2433 | ; MIPS32EB-NEXT: addu $4, $1, $4 |
| 2434 | ; MIPS32EB-NEXT: jr $ra |
| 2435 | ; MIPS32EB-NEXT: nop |
| 2436 | ; |
| 2437 | ; MIPS64-LABEL: i64_2: |
| 2438 | ; MIPS64: # %bb.0: |
| 2439 | ; MIPS64-NEXT: daddu $2, $4, $6 |
| 2440 | ; MIPS64-NEXT: daddu $3, $5, $7 |
| 2441 | ; MIPS64-NEXT: jr $ra |
| 2442 | ; MIPS64-NEXT: nop |
| 2443 | ; |
| 2444 | ; MIPS32R5EB-LABEL: i64_2: |
| 2445 | ; MIPS32R5EB: # %bb.0: |
| 2446 | ; MIPS32R5EB-NEXT: ldi.b $w0, 0 |
| 2447 | ; MIPS32R5EB-NEXT: lw $1, 20($sp) |
| 2448 | ; MIPS32R5EB-NEXT: lw $2, 16($sp) |
| 2449 | ; MIPS32R5EB-NEXT: move.v $w1, $w0 |
| 2450 | ; MIPS32R5EB-NEXT: insert.w $w1[0], $2 |
| 2451 | ; MIPS32R5EB-NEXT: insert.w $w1[1], $1 |
| 2452 | ; MIPS32R5EB-NEXT: lw $1, 24($sp) |
| 2453 | ; MIPS32R5EB-NEXT: insert.w $w0[0], $4 |
| 2454 | ; MIPS32R5EB-NEXT: insert.w $w1[2], $1 |
| 2455 | ; MIPS32R5EB-NEXT: lw $1, 28($sp) |
| 2456 | ; MIPS32R5EB-NEXT: insert.w $w1[3], $1 |
| 2457 | ; MIPS32R5EB-NEXT: shf.w $w1, $w1, 177 |
| 2458 | ; MIPS32R5EB-NEXT: insert.w $w0[1], $5 |
| 2459 | ; MIPS32R5EB-NEXT: insert.w $w0[2], $6 |
| 2460 | ; MIPS32R5EB-NEXT: insert.w $w0[3], $7 |
| 2461 | ; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 |
| 2462 | ; MIPS32R5EB-NEXT: addv.d $w0, $w0, $w1 |
| 2463 | ; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 |
| 2464 | ; MIPS32R5EB-NEXT: copy_s.w $2, $w0[0] |
| 2465 | ; MIPS32R5EB-NEXT: copy_s.w $3, $w0[1] |
| 2466 | ; MIPS32R5EB-NEXT: copy_s.w $4, $w0[2] |
| 2467 | ; MIPS32R5EB-NEXT: copy_s.w $5, $w0[3] |
| 2468 | ; MIPS32R5EB-NEXT: jr $ra |
| 2469 | ; MIPS32R5EB-NEXT: nop |
| 2470 | ; |
| 2471 | ; MIPS64R5-LABEL: i64_2: |
| 2472 | ; MIPS64R5: # %bb.0: |
| 2473 | ; MIPS64R5-NEXT: ldi.b $w0, 0 |
| 2474 | ; MIPS64R5-NEXT: move.v $w1, $w0 |
| 2475 | ; MIPS64R5-NEXT: insert.d $w1[0], $6 |
| 2476 | ; MIPS64R5-NEXT: insert.d $w1[1], $7 |
| 2477 | ; MIPS64R5-NEXT: insert.d $w0[0], $4 |
| 2478 | ; MIPS64R5-NEXT: insert.d $w0[1], $5 |
| 2479 | ; MIPS64R5-NEXT: addv.d $w0, $w0, $w1 |
| 2480 | ; MIPS64R5-NEXT: copy_s.d $2, $w0[0] |
| 2481 | ; MIPS64R5-NEXT: copy_s.d $3, $w0[1] |
| 2482 | ; MIPS64R5-NEXT: jr $ra |
| 2483 | ; MIPS64R5-NEXT: nop |
| 2484 | ; |
| 2485 | ; MIPS32EL-LABEL: i64_2: |
| 2486 | ; MIPS32EL: # %bb.0: |
| 2487 | ; MIPS32EL-NEXT: lw $1, 20($sp) |
| 2488 | ; MIPS32EL-NEXT: addu $1, $5, $1 |
| 2489 | ; MIPS32EL-NEXT: lw $2, 16($sp) |
| 2490 | ; MIPS32EL-NEXT: addu $2, $4, $2 |
| 2491 | ; MIPS32EL-NEXT: sltu $3, $2, $4 |
| 2492 | ; MIPS32EL-NEXT: lw $4, 28($sp) |
| 2493 | ; MIPS32EL-NEXT: addu $3, $1, $3 |
| 2494 | ; MIPS32EL-NEXT: addu $1, $7, $4 |
| 2495 | ; MIPS32EL-NEXT: lw $4, 24($sp) |
| 2496 | ; MIPS32EL-NEXT: addu $4, $6, $4 |
| 2497 | ; MIPS32EL-NEXT: sltu $5, $4, $6 |
| 2498 | ; MIPS32EL-NEXT: addu $5, $1, $5 |
| 2499 | ; MIPS32EL-NEXT: jr $ra |
| 2500 | ; MIPS32EL-NEXT: nop |
| 2501 | ; |
| 2502 | ; MIPS32R5EL-LABEL: i64_2: |
| 2503 | ; MIPS32R5EL: # %bb.0: |
| 2504 | ; MIPS32R5EL-NEXT: ldi.b $w0, 0 |
| 2505 | ; MIPS32R5EL-NEXT: lw $1, 20($sp) |
| 2506 | ; MIPS32R5EL-NEXT: lw $2, 16($sp) |
| 2507 | ; MIPS32R5EL-NEXT: move.v $w1, $w0 |
| 2508 | ; MIPS32R5EL-NEXT: insert.w $w1[0], $2 |
| 2509 | ; MIPS32R5EL-NEXT: insert.w $w1[1], $1 |
| 2510 | ; MIPS32R5EL-NEXT: lw $1, 24($sp) |
| 2511 | ; MIPS32R5EL-NEXT: insert.w $w1[2], $1 |
| 2512 | ; MIPS32R5EL-NEXT: lw $1, 28($sp) |
| 2513 | ; MIPS32R5EL-NEXT: insert.w $w1[3], $1 |
| 2514 | ; MIPS32R5EL-NEXT: insert.w $w0[0], $4 |
| 2515 | ; MIPS32R5EL-NEXT: insert.w $w0[1], $5 |
| 2516 | ; MIPS32R5EL-NEXT: insert.w $w0[2], $6 |
| 2517 | ; MIPS32R5EL-NEXT: insert.w $w0[3], $7 |
| 2518 | ; MIPS32R5EL-NEXT: addv.d $w0, $w0, $w1 |
| 2519 | ; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] |
| 2520 | ; MIPS32R5EL-NEXT: copy_s.w $3, $w0[1] |
| 2521 | ; MIPS32R5EL-NEXT: copy_s.w $4, $w0[2] |
| 2522 | ; MIPS32R5EL-NEXT: copy_s.w $5, $w0[3] |
| 2523 | ; MIPS32R5EL-NEXT: jr $ra |
| 2524 | ; MIPS32R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 2525 | %1 = add <2 x i64> %a, %b |
| 2526 | ret <2 x i64> %1 |
| 2527 | } |
| 2528 | |
| 2529 | ; The MIPS vector ABI treats vectors of floats differently to vectors of |
| 2530 | ; integers. |
| 2531 | |
| 2532 | ; For arguments floating pointer vectors are bitcasted to integer vectors whose |
| 2533 | ; elements are of GPR width and where the element count is deduced from |
| 2534 | ; the length of the floating point vector divided by the size of the GPRs. |
| 2535 | |
| 2536 | ; For returns, integer vectors are passed via the GPR register set, but |
| 2537 | ; floating point vectors are returned via a hidden sret pointer. |
| 2538 | |
| 2539 | ; For testing purposes we skip returning values here and test them below |
| 2540 | ; instead. |
| 2541 | @float_res_v2f32 = external global <2 x float> |
| 2542 | |
| 2543 | define void @float_2(<2 x float> %a, <2 x float> %b) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 2544 | ; MIPS32-LABEL: float_2: |
| 2545 | ; MIPS32: # %bb.0: |
| 2546 | ; MIPS32-NEXT: mtc1 $7, $f0 |
| 2547 | ; MIPS32-NEXT: mtc1 $5, $f1 |
| 2548 | ; MIPS32-NEXT: add.s $f0, $f1, $f0 |
| 2549 | ; MIPS32-NEXT: lui $1, %hi(float_res_v2f32) |
| 2550 | ; MIPS32-NEXT: addiu $2, $1, %lo(float_res_v2f32) |
| 2551 | ; MIPS32-NEXT: swc1 $f0, 4($2) |
| 2552 | ; MIPS32-NEXT: mtc1 $6, $f0 |
| 2553 | ; MIPS32-NEXT: mtc1 $4, $f1 |
| 2554 | ; MIPS32-NEXT: add.s $f0, $f1, $f0 |
| 2555 | ; MIPS32-NEXT: swc1 $f0, %lo(float_res_v2f32)($1) |
| 2556 | ; MIPS32-NEXT: jr $ra |
| 2557 | ; MIPS32-NEXT: nop |
| 2558 | ; |
| 2559 | ; MIPS64EB-LABEL: float_2: |
| 2560 | ; MIPS64EB: # %bb.0: |
| 2561 | ; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(float_2))) |
| 2562 | ; MIPS64EB-NEXT: daddu $1, $1, $25 |
| 2563 | ; MIPS64EB-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_2))) |
| 2564 | ; MIPS64EB-NEXT: sll $2, $5, 0 |
| 2565 | ; MIPS64EB-NEXT: mtc1 $2, $f0 |
| 2566 | ; MIPS64EB-NEXT: sll $2, $4, 0 |
| 2567 | ; MIPS64EB-NEXT: mtc1 $2, $f1 |
| 2568 | ; MIPS64EB-NEXT: add.s $f0, $f1, $f0 |
| 2569 | ; MIPS64EB-NEXT: dsrl $2, $5, 32 |
| 2570 | ; MIPS64EB-NEXT: sll $2, $2, 0 |
| 2571 | ; MIPS64EB-NEXT: ld $1, %got_disp(float_res_v2f32)($1) |
| 2572 | ; MIPS64EB-NEXT: swc1 $f0, 4($1) |
| 2573 | ; MIPS64EB-NEXT: mtc1 $2, $f0 |
| 2574 | ; MIPS64EB-NEXT: dsrl $2, $4, 32 |
| 2575 | ; MIPS64EB-NEXT: sll $2, $2, 0 |
| 2576 | ; MIPS64EB-NEXT: mtc1 $2, $f1 |
| 2577 | ; MIPS64EB-NEXT: add.s $f0, $f1, $f0 |
| 2578 | ; MIPS64EB-NEXT: swc1 $f0, 0($1) |
| 2579 | ; MIPS64EB-NEXT: jr $ra |
| 2580 | ; MIPS64EB-NEXT: nop |
| 2581 | ; |
| 2582 | ; MIPS32R5-LABEL: float_2: |
| 2583 | ; MIPS32R5: # %bb.0: |
| 2584 | ; MIPS32R5-NEXT: addiu $sp, $sp, -48 |
| 2585 | ; MIPS32R5-NEXT: .cfi_def_cfa_offset 48 |
| 2586 | ; MIPS32R5-NEXT: sw $fp, 44($sp) # 4-byte Folded Spill |
| 2587 | ; MIPS32R5-NEXT: .cfi_offset 30, -4 |
| 2588 | ; MIPS32R5-NEXT: move $fp, $sp |
| 2589 | ; MIPS32R5-NEXT: .cfi_def_cfa_register 30 |
| 2590 | ; MIPS32R5-NEXT: addiu $1, $zero, -16 |
| 2591 | ; MIPS32R5-NEXT: and $sp, $sp, $1 |
| 2592 | ; MIPS32R5-NEXT: sw $7, 20($sp) |
| 2593 | ; MIPS32R5-NEXT: sw $6, 16($sp) |
| 2594 | ; MIPS32R5-NEXT: sw $5, 4($sp) |
| 2595 | ; MIPS32R5-NEXT: sw $4, 0($sp) |
| 2596 | ; MIPS32R5-NEXT: ld.w $w0, 16($sp) |
| 2597 | ; MIPS32R5-NEXT: ld.w $w1, 0($sp) |
| 2598 | ; MIPS32R5-NEXT: fadd.w $w0, $w1, $w0 |
| 2599 | ; MIPS32R5-NEXT: lui $1, %hi(float_res_v2f32) |
| 2600 | ; MIPS32R5-NEXT: addiu $2, $1, %lo(float_res_v2f32) |
| 2601 | ; MIPS32R5-NEXT: splati.w $w1, $w0[1] |
| 2602 | ; MIPS32R5-NEXT: swc1 $f1, 4($2) |
| 2603 | ; MIPS32R5-NEXT: swc1 $f0, %lo(float_res_v2f32)($1) |
| 2604 | ; MIPS32R5-NEXT: move $sp, $fp |
| 2605 | ; MIPS32R5-NEXT: lw $fp, 44($sp) # 4-byte Folded Reload |
| 2606 | ; MIPS32R5-NEXT: addiu $sp, $sp, 48 |
| 2607 | ; MIPS32R5-NEXT: jr $ra |
| 2608 | ; MIPS32R5-NEXT: nop |
| 2609 | ; |
| 2610 | ; MIPS64R5EB-LABEL: float_2: |
| 2611 | ; MIPS64R5EB: # %bb.0: |
| 2612 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, -32 |
| 2613 | ; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 32 |
| 2614 | ; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(float_2))) |
| 2615 | ; MIPS64R5EB-NEXT: daddu $1, $1, $25 |
| 2616 | ; MIPS64R5EB-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_2))) |
| 2617 | ; MIPS64R5EB-NEXT: sd $5, 0($sp) |
| 2618 | ; MIPS64R5EB-NEXT: sd $4, 16($sp) |
| 2619 | ; MIPS64R5EB-NEXT: ld.w $w0, 0($sp) |
| 2620 | ; MIPS64R5EB-NEXT: ld.w $w1, 16($sp) |
| 2621 | ; MIPS64R5EB-NEXT: fadd.w $w0, $w1, $w0 |
| 2622 | ; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 |
| 2623 | ; MIPS64R5EB-NEXT: copy_s.d $2, $w0[0] |
| 2624 | ; MIPS64R5EB-NEXT: ld $1, %got_disp(float_res_v2f32)($1) |
| 2625 | ; MIPS64R5EB-NEXT: sd $2, 0($1) |
| 2626 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, 32 |
| 2627 | ; MIPS64R5EB-NEXT: jr $ra |
| 2628 | ; MIPS64R5EB-NEXT: nop |
| 2629 | ; |
| 2630 | ; MIPS64EL-LABEL: float_2: |
| 2631 | ; MIPS64EL: # %bb.0: |
| 2632 | ; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(float_2))) |
| 2633 | ; MIPS64EL-NEXT: daddu $1, $1, $25 |
| 2634 | ; MIPS64EL-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_2))) |
| 2635 | ; MIPS64EL-NEXT: sll $2, $5, 0 |
| 2636 | ; MIPS64EL-NEXT: mtc1 $2, $f0 |
| 2637 | ; MIPS64EL-NEXT: sll $2, $4, 0 |
| 2638 | ; MIPS64EL-NEXT: mtc1 $2, $f1 |
| 2639 | ; MIPS64EL-NEXT: add.s $f0, $f1, $f0 |
| 2640 | ; MIPS64EL-NEXT: dsrl $2, $5, 32 |
| 2641 | ; MIPS64EL-NEXT: sll $2, $2, 0 |
| 2642 | ; MIPS64EL-NEXT: ld $1, %got_disp(float_res_v2f32)($1) |
| 2643 | ; MIPS64EL-NEXT: swc1 $f0, 0($1) |
| 2644 | ; MIPS64EL-NEXT: mtc1 $2, $f0 |
| 2645 | ; MIPS64EL-NEXT: dsrl $2, $4, 32 |
| 2646 | ; MIPS64EL-NEXT: sll $2, $2, 0 |
| 2647 | ; MIPS64EL-NEXT: mtc1 $2, $f1 |
| 2648 | ; MIPS64EL-NEXT: add.s $f0, $f1, $f0 |
| 2649 | ; MIPS64EL-NEXT: swc1 $f0, 4($1) |
| 2650 | ; MIPS64EL-NEXT: jr $ra |
| 2651 | ; MIPS64EL-NEXT: nop |
| 2652 | ; |
| 2653 | ; MIPS64R5EL-LABEL: float_2: |
| 2654 | ; MIPS64R5EL: # %bb.0: |
| 2655 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, -32 |
| 2656 | ; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 32 |
| 2657 | ; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(float_2))) |
| 2658 | ; MIPS64R5EL-NEXT: daddu $1, $1, $25 |
| 2659 | ; MIPS64R5EL-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_2))) |
| 2660 | ; MIPS64R5EL-NEXT: sd $5, 0($sp) |
| 2661 | ; MIPS64R5EL-NEXT: sd $4, 16($sp) |
| 2662 | ; MIPS64R5EL-NEXT: ld.w $w0, 0($sp) |
| 2663 | ; MIPS64R5EL-NEXT: ld.w $w1, 16($sp) |
| 2664 | ; MIPS64R5EL-NEXT: fadd.w $w0, $w1, $w0 |
| 2665 | ; MIPS64R5EL-NEXT: copy_s.d $2, $w0[0] |
| 2666 | ; MIPS64R5EL-NEXT: ld $1, %got_disp(float_res_v2f32)($1) |
| 2667 | ; MIPS64R5EL-NEXT: sd $2, 0($1) |
| 2668 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, 32 |
| 2669 | ; MIPS64R5EL-NEXT: jr $ra |
| 2670 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 2671 | %1 = fadd <2 x float> %a, %b |
| 2672 | store <2 x float> %1, <2 x float> * @float_res_v2f32 |
| 2673 | ret void |
| 2674 | } |
| 2675 | |
| 2676 | @float_res_v4f32 = external global <4 x float> |
| 2677 | |
| 2678 | ; For MSA this case is suboptimal, the 4 loads can be combined into a single |
| 2679 | ; ld.w. |
| 2680 | |
| 2681 | define void @float_4(<4 x float> %a, <4 x float> %b) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 2682 | ; MIPS32-LABEL: float_4: |
| 2683 | ; MIPS32: # %bb.0: |
| 2684 | ; MIPS32-NEXT: mtc1 $7, $f0 |
| 2685 | ; MIPS32-NEXT: mtc1 $6, $f1 |
| 2686 | ; MIPS32-NEXT: lwc1 $f2, 28($sp) |
| 2687 | ; MIPS32-NEXT: lwc1 $f3, 24($sp) |
| 2688 | ; MIPS32-NEXT: add.s $f1, $f1, $f3 |
| 2689 | ; MIPS32-NEXT: add.s $f0, $f0, $f2 |
| 2690 | ; MIPS32-NEXT: mtc1 $5, $f2 |
| 2691 | ; MIPS32-NEXT: lui $1, %hi(float_res_v4f32) |
| 2692 | ; MIPS32-NEXT: addiu $2, $1, %lo(float_res_v4f32) |
| 2693 | ; MIPS32-NEXT: lwc1 $f3, 20($sp) |
| 2694 | ; MIPS32-NEXT: swc1 $f0, 12($2) |
| 2695 | ; MIPS32-NEXT: swc1 $f1, 8($2) |
| 2696 | ; MIPS32-NEXT: add.s $f0, $f2, $f3 |
| 2697 | ; MIPS32-NEXT: swc1 $f0, 4($2) |
| 2698 | ; MIPS32-NEXT: mtc1 $4, $f0 |
| 2699 | ; MIPS32-NEXT: lwc1 $f1, 16($sp) |
| 2700 | ; MIPS32-NEXT: add.s $f0, $f0, $f1 |
| 2701 | ; MIPS32-NEXT: swc1 $f0, %lo(float_res_v4f32)($1) |
| 2702 | ; MIPS32-NEXT: jr $ra |
| 2703 | ; MIPS32-NEXT: nop |
| 2704 | ; |
| 2705 | ; MIPS64EB-LABEL: float_4: |
| 2706 | ; MIPS64EB: # %bb.0: |
| 2707 | ; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(float_4))) |
| 2708 | ; MIPS64EB-NEXT: daddu $1, $1, $25 |
| 2709 | ; MIPS64EB-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_4))) |
| 2710 | ; MIPS64EB-NEXT: dsrl $2, $7, 32 |
| 2711 | ; MIPS64EB-NEXT: sll $2, $2, 0 |
| 2712 | ; MIPS64EB-NEXT: sll $3, $4, 0 |
| 2713 | ; MIPS64EB-NEXT: sll $8, $6, 0 |
| 2714 | ; MIPS64EB-NEXT: sll $7, $7, 0 |
| 2715 | ; MIPS64EB-NEXT: mtc1 $8, $f0 |
| 2716 | ; MIPS64EB-NEXT: mtc1 $3, $f1 |
| 2717 | ; MIPS64EB-NEXT: mtc1 $2, $f2 |
| 2718 | ; MIPS64EB-NEXT: dsrl $2, $5, 32 |
| 2719 | ; MIPS64EB-NEXT: sll $2, $2, 0 |
| 2720 | ; MIPS64EB-NEXT: mtc1 $2, $f3 |
| 2721 | ; MIPS64EB-NEXT: add.s $f2, $f3, $f2 |
| 2722 | ; MIPS64EB-NEXT: add.s $f0, $f1, $f0 |
| 2723 | ; MIPS64EB-NEXT: mtc1 $7, $f1 |
| 2724 | ; MIPS64EB-NEXT: sll $2, $5, 0 |
| 2725 | ; MIPS64EB-NEXT: mtc1 $2, $f3 |
| 2726 | ; MIPS64EB-NEXT: add.s $f1, $f3, $f1 |
| 2727 | ; MIPS64EB-NEXT: dsrl $2, $6, 32 |
| 2728 | ; MIPS64EB-NEXT: sll $2, $2, 0 |
| 2729 | ; MIPS64EB-NEXT: ld $1, %got_disp(float_res_v4f32)($1) |
| 2730 | ; MIPS64EB-NEXT: swc1 $f1, 12($1) |
| 2731 | ; MIPS64EB-NEXT: swc1 $f0, 4($1) |
| 2732 | ; MIPS64EB-NEXT: swc1 $f2, 8($1) |
| 2733 | ; MIPS64EB-NEXT: mtc1 $2, $f0 |
| 2734 | ; MIPS64EB-NEXT: dsrl $2, $4, 32 |
| 2735 | ; MIPS64EB-NEXT: sll $2, $2, 0 |
| 2736 | ; MIPS64EB-NEXT: mtc1 $2, $f1 |
| 2737 | ; MIPS64EB-NEXT: add.s $f0, $f1, $f0 |
| 2738 | ; MIPS64EB-NEXT: swc1 $f0, 0($1) |
| 2739 | ; MIPS64EB-NEXT: jr $ra |
| 2740 | ; MIPS64EB-NEXT: nop |
| 2741 | ; |
| 2742 | ; MIPS32R5-LABEL: float_4: |
| 2743 | ; MIPS32R5: # %bb.0: |
| 2744 | ; MIPS32R5-NEXT: ldi.b $w0, 0 |
| 2745 | ; MIPS32R5-NEXT: lw $1, 20($sp) |
| 2746 | ; MIPS32R5-NEXT: lw $2, 16($sp) |
| 2747 | ; MIPS32R5-NEXT: move.v $w1, $w0 |
| 2748 | ; MIPS32R5-NEXT: insert.w $w1[0], $2 |
| 2749 | ; MIPS32R5-NEXT: insert.w $w1[1], $1 |
| 2750 | ; MIPS32R5-NEXT: lw $1, 24($sp) |
| 2751 | ; MIPS32R5-NEXT: insert.w $w1[2], $1 |
| 2752 | ; MIPS32R5-NEXT: lw $1, 28($sp) |
| 2753 | ; MIPS32R5-NEXT: insert.w $w1[3], $1 |
| 2754 | ; MIPS32R5-NEXT: insert.w $w0[0], $4 |
| 2755 | ; MIPS32R5-NEXT: insert.w $w0[1], $5 |
| 2756 | ; MIPS32R5-NEXT: insert.w $w0[2], $6 |
| 2757 | ; MIPS32R5-NEXT: insert.w $w0[3], $7 |
| 2758 | ; MIPS32R5-NEXT: fadd.w $w0, $w0, $w1 |
| 2759 | ; MIPS32R5-NEXT: lui $1, %hi(float_res_v4f32) |
| 2760 | ; MIPS32R5-NEXT: addiu $1, $1, %lo(float_res_v4f32) |
| 2761 | ; MIPS32R5-NEXT: st.w $w0, 0($1) |
| 2762 | ; MIPS32R5-NEXT: jr $ra |
| 2763 | ; MIPS32R5-NEXT: nop |
| 2764 | ; |
| 2765 | ; MIPS64R5EB-LABEL: float_4: |
| 2766 | ; MIPS64R5EB: # %bb.0: |
| 2767 | ; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(float_4))) |
| 2768 | ; MIPS64R5EB-NEXT: daddu $1, $1, $25 |
| 2769 | ; MIPS64R5EB-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_4))) |
| 2770 | ; MIPS64R5EB-NEXT: ldi.b $w0, 0 |
| 2771 | ; MIPS64R5EB-NEXT: move.v $w1, $w0 |
| 2772 | ; MIPS64R5EB-NEXT: insert.d $w1[0], $6 |
| 2773 | ; MIPS64R5EB-NEXT: insert.d $w1[1], $7 |
| 2774 | ; MIPS64R5EB-NEXT: shf.w $w1, $w1, 177 |
| 2775 | ; MIPS64R5EB-NEXT: insert.d $w0[0], $4 |
| 2776 | ; MIPS64R5EB-NEXT: insert.d $w0[1], $5 |
| 2777 | ; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 |
| 2778 | ; MIPS64R5EB-NEXT: fadd.w $w0, $w0, $w1 |
| 2779 | ; MIPS64R5EB-NEXT: ld $1, %got_disp(float_res_v4f32)($1) |
| 2780 | ; MIPS64R5EB-NEXT: st.w $w0, 0($1) |
| 2781 | ; MIPS64R5EB-NEXT: jr $ra |
| 2782 | ; MIPS64R5EB-NEXT: nop |
| 2783 | ; |
| 2784 | ; MIPS64EL-LABEL: float_4: |
| 2785 | ; MIPS64EL: # %bb.0: |
| 2786 | ; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(float_4))) |
| 2787 | ; MIPS64EL-NEXT: daddu $1, $1, $25 |
| 2788 | ; MIPS64EL-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_4))) |
| 2789 | ; MIPS64EL-NEXT: dsrl $2, $7, 32 |
| 2790 | ; MIPS64EL-NEXT: sll $2, $2, 0 |
| 2791 | ; MIPS64EL-NEXT: sll $3, $4, 0 |
| 2792 | ; MIPS64EL-NEXT: sll $8, $6, 0 |
| 2793 | ; MIPS64EL-NEXT: sll $7, $7, 0 |
| 2794 | ; MIPS64EL-NEXT: mtc1 $8, $f0 |
| 2795 | ; MIPS64EL-NEXT: mtc1 $3, $f1 |
| 2796 | ; MIPS64EL-NEXT: mtc1 $2, $f2 |
| 2797 | ; MIPS64EL-NEXT: dsrl $2, $5, 32 |
| 2798 | ; MIPS64EL-NEXT: sll $2, $2, 0 |
| 2799 | ; MIPS64EL-NEXT: mtc1 $2, $f3 |
| 2800 | ; MIPS64EL-NEXT: add.s $f2, $f3, $f2 |
| 2801 | ; MIPS64EL-NEXT: add.s $f0, $f1, $f0 |
| 2802 | ; MIPS64EL-NEXT: mtc1 $7, $f1 |
| 2803 | ; MIPS64EL-NEXT: sll $2, $5, 0 |
| 2804 | ; MIPS64EL-NEXT: mtc1 $2, $f3 |
| 2805 | ; MIPS64EL-NEXT: add.s $f1, $f3, $f1 |
| 2806 | ; MIPS64EL-NEXT: dsrl $2, $6, 32 |
| 2807 | ; MIPS64EL-NEXT: sll $2, $2, 0 |
| 2808 | ; MIPS64EL-NEXT: ld $1, %got_disp(float_res_v4f32)($1) |
| 2809 | ; MIPS64EL-NEXT: swc1 $f1, 8($1) |
| 2810 | ; MIPS64EL-NEXT: swc1 $f0, 0($1) |
| 2811 | ; MIPS64EL-NEXT: swc1 $f2, 12($1) |
| 2812 | ; MIPS64EL-NEXT: mtc1 $2, $f0 |
| 2813 | ; MIPS64EL-NEXT: dsrl $2, $4, 32 |
| 2814 | ; MIPS64EL-NEXT: sll $2, $2, 0 |
| 2815 | ; MIPS64EL-NEXT: mtc1 $2, $f1 |
| 2816 | ; MIPS64EL-NEXT: add.s $f0, $f1, $f0 |
| 2817 | ; MIPS64EL-NEXT: swc1 $f0, 4($1) |
| 2818 | ; MIPS64EL-NEXT: jr $ra |
| 2819 | ; MIPS64EL-NEXT: nop |
| 2820 | ; |
| 2821 | ; MIPS64R5EL-LABEL: float_4: |
| 2822 | ; MIPS64R5EL: # %bb.0: |
| 2823 | ; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(float_4))) |
| 2824 | ; MIPS64R5EL-NEXT: daddu $1, $1, $25 |
| 2825 | ; MIPS64R5EL-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_4))) |
| 2826 | ; MIPS64R5EL-NEXT: ldi.b $w0, 0 |
| 2827 | ; MIPS64R5EL-NEXT: move.v $w1, $w0 |
| 2828 | ; MIPS64R5EL-NEXT: insert.d $w1[0], $6 |
| 2829 | ; MIPS64R5EL-NEXT: insert.d $w1[1], $7 |
| 2830 | ; MIPS64R5EL-NEXT: insert.d $w0[0], $4 |
| 2831 | ; MIPS64R5EL-NEXT: insert.d $w0[1], $5 |
| 2832 | ; MIPS64R5EL-NEXT: fadd.w $w0, $w0, $w1 |
| 2833 | ; MIPS64R5EL-NEXT: ld $1, %got_disp(float_res_v4f32)($1) |
| 2834 | ; MIPS64R5EL-NEXT: st.w $w0, 0($1) |
| 2835 | ; MIPS64R5EL-NEXT: jr $ra |
| 2836 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 2837 | %1 = fadd <4 x float> %a, %b |
| 2838 | store <4 x float> %1, <4 x float> * @float_res_v4f32 |
| 2839 | ret void |
| 2840 | } |
| 2841 | |
| 2842 | @double_v2f64 = external global <2 x double> |
| 2843 | |
| 2844 | define void @double_2(<2 x double> %a, <2 x double> %b) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 2845 | ; MIPS32-LABEL: double_2: |
| 2846 | ; MIPS32: # %bb.0: |
| 2847 | ; MIPS32-NEXT: addiu $sp, $sp, -32 |
| 2848 | ; MIPS32-NEXT: .cfi_def_cfa_offset 32 |
| 2849 | ; MIPS32-NEXT: lw $1, 60($sp) |
| 2850 | ; MIPS32-NEXT: sw $1, 12($sp) |
| 2851 | ; MIPS32-NEXT: lw $1, 56($sp) |
| 2852 | ; MIPS32-NEXT: sw $1, 8($sp) |
| 2853 | ; MIPS32-NEXT: sw $7, 28($sp) |
| 2854 | ; MIPS32-NEXT: sw $6, 24($sp) |
| 2855 | ; MIPS32-NEXT: ldc1 $f0, 8($sp) |
| 2856 | ; MIPS32-NEXT: ldc1 $f2, 24($sp) |
| 2857 | ; MIPS32-NEXT: add.d $f0, $f2, $f0 |
| 2858 | ; MIPS32-NEXT: lui $1, %hi(double_v2f64) |
| 2859 | ; MIPS32-NEXT: addiu $2, $1, %lo(double_v2f64) |
| 2860 | ; MIPS32-NEXT: lw $3, 52($sp) |
| 2861 | ; MIPS32-NEXT: sdc1 $f0, 8($2) |
| 2862 | ; MIPS32-NEXT: sw $3, 4($sp) |
| 2863 | ; MIPS32-NEXT: lw $2, 48($sp) |
| 2864 | ; MIPS32-NEXT: sw $2, 0($sp) |
| 2865 | ; MIPS32-NEXT: sw $5, 20($sp) |
| 2866 | ; MIPS32-NEXT: sw $4, 16($sp) |
| 2867 | ; MIPS32-NEXT: ldc1 $f0, 0($sp) |
| 2868 | ; MIPS32-NEXT: ldc1 $f2, 16($sp) |
| 2869 | ; MIPS32-NEXT: add.d $f0, $f2, $f0 |
| 2870 | ; MIPS32-NEXT: sdc1 $f0, %lo(double_v2f64)($1) |
| 2871 | ; MIPS32-NEXT: addiu $sp, $sp, 32 |
| 2872 | ; MIPS32-NEXT: jr $ra |
| 2873 | ; MIPS32-NEXT: nop |
| 2874 | ; |
| 2875 | ; MIPS64-LABEL: double_2: |
| 2876 | ; MIPS64: # %bb.0: |
| 2877 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(double_2))) |
| 2878 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 2879 | ; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(double_2))) |
| 2880 | ; MIPS64-NEXT: dmtc1 $7, $f0 |
| 2881 | ; MIPS64-NEXT: dmtc1 $5, $f1 |
| 2882 | ; MIPS64-NEXT: add.d $f0, $f1, $f0 |
| 2883 | ; MIPS64-NEXT: ld $1, %got_disp(double_v2f64)($1) |
| 2884 | ; MIPS64-NEXT: sdc1 $f0, 8($1) |
| 2885 | ; MIPS64-NEXT: dmtc1 $6, $f0 |
| 2886 | ; MIPS64-NEXT: dmtc1 $4, $f1 |
| 2887 | ; MIPS64-NEXT: add.d $f0, $f1, $f0 |
| 2888 | ; MIPS64-NEXT: sdc1 $f0, 0($1) |
| 2889 | ; MIPS64-NEXT: jr $ra |
| 2890 | ; MIPS64-NEXT: nop |
| 2891 | ; |
| 2892 | ; MIPS32R5EB-LABEL: double_2: |
| 2893 | ; MIPS32R5EB: # %bb.0: |
| 2894 | ; MIPS32R5EB-NEXT: ldi.b $w0, 0 |
| 2895 | ; MIPS32R5EB-NEXT: lw $1, 20($sp) |
| 2896 | ; MIPS32R5EB-NEXT: lw $2, 16($sp) |
| 2897 | ; MIPS32R5EB-NEXT: move.v $w1, $w0 |
| 2898 | ; MIPS32R5EB-NEXT: insert.w $w1[0], $2 |
| 2899 | ; MIPS32R5EB-NEXT: insert.w $w1[1], $1 |
| 2900 | ; MIPS32R5EB-NEXT: lw $1, 24($sp) |
| 2901 | ; MIPS32R5EB-NEXT: insert.w $w0[0], $4 |
| 2902 | ; MIPS32R5EB-NEXT: insert.w $w1[2], $1 |
| 2903 | ; MIPS32R5EB-NEXT: lw $1, 28($sp) |
| 2904 | ; MIPS32R5EB-NEXT: insert.w $w1[3], $1 |
| 2905 | ; MIPS32R5EB-NEXT: shf.w $w1, $w1, 177 |
| 2906 | ; MIPS32R5EB-NEXT: insert.w $w0[1], $5 |
| 2907 | ; MIPS32R5EB-NEXT: insert.w $w0[2], $6 |
| 2908 | ; MIPS32R5EB-NEXT: insert.w $w0[3], $7 |
| 2909 | ; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 |
| 2910 | ; MIPS32R5EB-NEXT: fadd.d $w0, $w0, $w1 |
| 2911 | ; MIPS32R5EB-NEXT: lui $1, %hi(double_v2f64) |
| 2912 | ; MIPS32R5EB-NEXT: addiu $1, $1, %lo(double_v2f64) |
| 2913 | ; MIPS32R5EB-NEXT: st.d $w0, 0($1) |
| 2914 | ; MIPS32R5EB-NEXT: jr $ra |
| 2915 | ; MIPS32R5EB-NEXT: nop |
| 2916 | ; |
| 2917 | ; MIPS64R5-LABEL: double_2: |
| 2918 | ; MIPS64R5: # %bb.0: |
| 2919 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(double_2))) |
| 2920 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 2921 | ; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(double_2))) |
| 2922 | ; MIPS64R5-NEXT: ldi.b $w0, 0 |
| 2923 | ; MIPS64R5-NEXT: move.v $w1, $w0 |
| 2924 | ; MIPS64R5-NEXT: insert.d $w1[0], $6 |
| 2925 | ; MIPS64R5-NEXT: insert.d $w1[1], $7 |
| 2926 | ; MIPS64R5-NEXT: insert.d $w0[0], $4 |
| 2927 | ; MIPS64R5-NEXT: insert.d $w0[1], $5 |
| 2928 | ; MIPS64R5-NEXT: fadd.d $w0, $w0, $w1 |
| 2929 | ; MIPS64R5-NEXT: ld $1, %got_disp(double_v2f64)($1) |
| 2930 | ; MIPS64R5-NEXT: st.d $w0, 0($1) |
| 2931 | ; MIPS64R5-NEXT: jr $ra |
| 2932 | ; MIPS64R5-NEXT: nop |
| 2933 | ; |
| 2934 | ; MIPS32R5EL-LABEL: double_2: |
| 2935 | ; MIPS32R5EL: # %bb.0: |
| 2936 | ; MIPS32R5EL-NEXT: ldi.b $w0, 0 |
| 2937 | ; MIPS32R5EL-NEXT: lw $1, 20($sp) |
| 2938 | ; MIPS32R5EL-NEXT: lw $2, 16($sp) |
| 2939 | ; MIPS32R5EL-NEXT: move.v $w1, $w0 |
| 2940 | ; MIPS32R5EL-NEXT: insert.w $w1[0], $2 |
| 2941 | ; MIPS32R5EL-NEXT: insert.w $w1[1], $1 |
| 2942 | ; MIPS32R5EL-NEXT: lw $1, 24($sp) |
| 2943 | ; MIPS32R5EL-NEXT: insert.w $w1[2], $1 |
| 2944 | ; MIPS32R5EL-NEXT: lw $1, 28($sp) |
| 2945 | ; MIPS32R5EL-NEXT: insert.w $w1[3], $1 |
| 2946 | ; MIPS32R5EL-NEXT: insert.w $w0[0], $4 |
| 2947 | ; MIPS32R5EL-NEXT: insert.w $w0[1], $5 |
| 2948 | ; MIPS32R5EL-NEXT: insert.w $w0[2], $6 |
| 2949 | ; MIPS32R5EL-NEXT: insert.w $w0[3], $7 |
| 2950 | ; MIPS32R5EL-NEXT: fadd.d $w0, $w0, $w1 |
| 2951 | ; MIPS32R5EL-NEXT: lui $1, %hi(double_v2f64) |
| 2952 | ; MIPS32R5EL-NEXT: addiu $1, $1, %lo(double_v2f64) |
| 2953 | ; MIPS32R5EL-NEXT: st.d $w0, 0($1) |
| 2954 | ; MIPS32R5EL-NEXT: jr $ra |
| 2955 | ; MIPS32R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 2956 | %1 = fadd <2 x double> %a, %b |
| 2957 | store <2 x double> %1, <2 x double> * @double_v2f64 |
| 2958 | ret void |
| 2959 | } |
| 2960 | |
| 2961 | ; Return value testing. |
| 2962 | ; Integer vectors are returned in $2, $3, $4, $5 for O32, $2, $3 for N32/N64 |
| 2963 | ; Floating point vectors are returned through a hidden sret pointer. |
| 2964 | |
| 2965 | @gv2i8 = global <2 x i8> <i8 1, i8 2> |
| 2966 | @gv4i8 = global <4 x i8> <i8 0, i8 1, i8 2, i8 3> |
| 2967 | @gv8i8 = global <8 x i8> <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7> |
| 2968 | @gv16i8 = global <16 x i8> <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15> |
| 2969 | |
| 2970 | @gv2i16 = global <2 x i16> <i16 1, i16 2> |
| 2971 | @gv4i16 = global <4 x i16> <i16 0, i16 1, i16 2, i16 3> |
| 2972 | @gv8i16 = global <8 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7> |
| 2973 | |
| 2974 | @gv2i32 = global <2 x i32> <i32 0, i32 1> |
| 2975 | @gv4i32 = global <4 x i32> <i32 0, i32 1, i32 2, i32 3> |
| 2976 | |
| 2977 | @gv2i64 = global <2 x i64> <i64 0, i64 1> |
| 2978 | |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 2979 | ; FIXME: why is this lh instead of lhu on mips64? |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 2980 | define <2 x i8> @ret_2_i8() { |
| 2981 | ; MIPS32-LABEL: ret_2_i8: |
| 2982 | ; MIPS32: # %bb.0: |
| 2983 | ; MIPS32-NEXT: lui $1, %hi(gv2i8) |
| 2984 | ; MIPS32-NEXT: lhu $2, %lo(gv2i8)($1) |
| 2985 | ; MIPS32-NEXT: jr $ra |
| 2986 | ; MIPS32-NEXT: nop |
| 2987 | ; |
| 2988 | ; MIPS64-LABEL: ret_2_i8: |
| 2989 | ; MIPS64: # %bb.0: |
| 2990 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i8))) |
| 2991 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 2992 | ; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i8))) |
| 2993 | ; MIPS64-NEXT: ld $1, %got_disp(gv2i8)($1) |
| 2994 | ; MIPS64-NEXT: lh $2, 0($1) |
| 2995 | ; MIPS64-NEXT: jr $ra |
| 2996 | ; MIPS64-NEXT: nop |
| 2997 | ; |
| 2998 | ; MIPS32R5-LABEL: ret_2_i8: |
| 2999 | ; MIPS32R5: # %bb.0: |
| 3000 | ; MIPS32R5-NEXT: lui $1, %hi(gv2i8) |
| 3001 | ; MIPS32R5-NEXT: lhu $2, %lo(gv2i8)($1) |
| 3002 | ; MIPS32R5-NEXT: jr $ra |
| 3003 | ; MIPS32R5-NEXT: nop |
| 3004 | ; |
| 3005 | ; MIPS64R5-LABEL: ret_2_i8: |
| 3006 | ; MIPS64R5: # %bb.0: |
| 3007 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i8))) |
| 3008 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 3009 | ; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i8))) |
| 3010 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv2i8)($1) |
| 3011 | ; MIPS64R5-NEXT: lh $2, 0($1) |
| 3012 | ; MIPS64R5-NEXT: jr $ra |
| 3013 | ; MIPS64R5-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3014 | %1 = load <2 x i8>, <2 x i8> * @gv2i8 |
| 3015 | ret <2 x i8> %1 |
| 3016 | } |
| 3017 | |
| 3018 | define <4 x i8> @ret_4_i8() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 3019 | ; MIPS32-LABEL: ret_4_i8: |
| 3020 | ; MIPS32: # %bb.0: |
| 3021 | ; MIPS32-NEXT: lui $1, %hi(gv4i8) |
| 3022 | ; MIPS32-NEXT: lw $2, %lo(gv4i8)($1) |
| 3023 | ; MIPS32-NEXT: jr $ra |
| 3024 | ; MIPS32-NEXT: nop |
| 3025 | ; |
| 3026 | ; MIPS64-LABEL: ret_4_i8: |
| 3027 | ; MIPS64: # %bb.0: |
| 3028 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_4_i8))) |
| 3029 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 3030 | ; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_4_i8))) |
| 3031 | ; MIPS64-NEXT: ld $1, %got_disp(gv4i8)($1) |
| 3032 | ; MIPS64-NEXT: lw $2, 0($1) |
| 3033 | ; MIPS64-NEXT: jr $ra |
| 3034 | ; MIPS64-NEXT: nop |
| 3035 | ; |
| 3036 | ; MIPS32R5-LABEL: ret_4_i8: |
| 3037 | ; MIPS32R5: # %bb.0: |
| 3038 | ; MIPS32R5-NEXT: lui $1, %hi(gv4i8) |
| 3039 | ; MIPS32R5-NEXT: lw $2, %lo(gv4i8)($1) |
| 3040 | ; MIPS32R5-NEXT: jr $ra |
| 3041 | ; MIPS32R5-NEXT: nop |
| 3042 | ; |
| 3043 | ; MIPS64R5-LABEL: ret_4_i8: |
| 3044 | ; MIPS64R5: # %bb.0: |
| 3045 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_4_i8))) |
| 3046 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 3047 | ; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_4_i8))) |
| 3048 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv4i8)($1) |
| 3049 | ; MIPS64R5-NEXT: lw $2, 0($1) |
| 3050 | ; MIPS64R5-NEXT: jr $ra |
| 3051 | ; MIPS64R5-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3052 | %1 = load <4 x i8>, <4 x i8> * @gv4i8 |
| 3053 | ret <4 x i8> %1 |
| 3054 | } |
| 3055 | |
| 3056 | define <8 x i8> @ret_8_i8() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 3057 | ; MIPS32-LABEL: ret_8_i8: |
| 3058 | ; MIPS32: # %bb.0: |
| 3059 | ; MIPS32-NEXT: lui $1, %hi(gv8i8) |
| 3060 | ; MIPS32-NEXT: lw $2, %lo(gv8i8)($1) |
| 3061 | ; MIPS32-NEXT: addiu $1, $1, %lo(gv8i8) |
| 3062 | ; MIPS32-NEXT: lw $3, 4($1) |
| 3063 | ; MIPS32-NEXT: jr $ra |
| 3064 | ; MIPS32-NEXT: nop |
| 3065 | ; |
| 3066 | ; MIPS64-LABEL: ret_8_i8: |
| 3067 | ; MIPS64: # %bb.0: |
| 3068 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_8_i8))) |
| 3069 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 3070 | ; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_8_i8))) |
| 3071 | ; MIPS64-NEXT: ld $1, %got_disp(gv8i8)($1) |
| 3072 | ; MIPS64-NEXT: ld $2, 0($1) |
| 3073 | ; MIPS64-NEXT: jr $ra |
| 3074 | ; MIPS64-NEXT: nop |
| 3075 | ; |
| 3076 | ; MIPS32R5EB-LABEL: ret_8_i8: |
| 3077 | ; MIPS32R5EB: # %bb.0: |
| 3078 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, -32 |
| 3079 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 32 |
| 3080 | ; MIPS32R5EB-NEXT: sw $fp, 28($sp) # 4-byte Folded Spill |
| 3081 | ; MIPS32R5EB-NEXT: .cfi_offset 30, -4 |
| 3082 | ; MIPS32R5EB-NEXT: move $fp, $sp |
| 3083 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 |
| 3084 | ; MIPS32R5EB-NEXT: addiu $1, $zero, -16 |
| 3085 | ; MIPS32R5EB-NEXT: and $sp, $sp, $1 |
| 3086 | ; MIPS32R5EB-NEXT: lui $1, %hi(gv8i8) |
| 3087 | ; MIPS32R5EB-NEXT: lw $2, %lo(gv8i8)($1) |
| 3088 | ; MIPS32R5EB-NEXT: sw $2, 4($sp) |
| 3089 | ; MIPS32R5EB-NEXT: addiu $1, $1, %lo(gv8i8) |
| 3090 | ; MIPS32R5EB-NEXT: lw $1, 4($1) |
| 3091 | ; MIPS32R5EB-NEXT: sw $1, 12($sp) |
| 3092 | ; MIPS32R5EB-NEXT: ld.w $w0, 0($sp) |
| 3093 | ; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] |
| 3094 | ; MIPS32R5EB-NEXT: copy_s.w $3, $w0[3] |
| 3095 | ; MIPS32R5EB-NEXT: move $sp, $fp |
| 3096 | ; MIPS32R5EB-NEXT: lw $fp, 28($sp) # 4-byte Folded Reload |
| 3097 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, 32 |
| 3098 | ; MIPS32R5EB-NEXT: jr $ra |
| 3099 | ; MIPS32R5EB-NEXT: nop |
| 3100 | ; |
| 3101 | ; MIPS64R5-LABEL: ret_8_i8: |
| 3102 | ; MIPS64R5: # %bb.0: |
| 3103 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_8_i8))) |
| 3104 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 3105 | ; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_8_i8))) |
| 3106 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv8i8)($1) |
| 3107 | ; MIPS64R5-NEXT: ld $2, 0($1) |
| 3108 | ; MIPS64R5-NEXT: jr $ra |
| 3109 | ; MIPS64R5-NEXT: nop |
| 3110 | ; |
| 3111 | ; MIPS32R5EL-LABEL: ret_8_i8: |
| 3112 | ; MIPS32R5EL: # %bb.0: |
| 3113 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, -32 |
| 3114 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 32 |
| 3115 | ; MIPS32R5EL-NEXT: sw $fp, 28($sp) # 4-byte Folded Spill |
| 3116 | ; MIPS32R5EL-NEXT: .cfi_offset 30, -4 |
| 3117 | ; MIPS32R5EL-NEXT: move $fp, $sp |
| 3118 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 |
| 3119 | ; MIPS32R5EL-NEXT: addiu $1, $zero, -16 |
| 3120 | ; MIPS32R5EL-NEXT: and $sp, $sp, $1 |
| 3121 | ; MIPS32R5EL-NEXT: lui $1, %hi(gv8i8) |
| 3122 | ; MIPS32R5EL-NEXT: lw $2, %lo(gv8i8)($1) |
| 3123 | ; MIPS32R5EL-NEXT: sw $2, 0($sp) |
| 3124 | ; MIPS32R5EL-NEXT: addiu $1, $1, %lo(gv8i8) |
| 3125 | ; MIPS32R5EL-NEXT: lw $1, 4($1) |
| 3126 | ; MIPS32R5EL-NEXT: sw $1, 8($sp) |
| 3127 | ; MIPS32R5EL-NEXT: ld.w $w0, 0($sp) |
| 3128 | ; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] |
| 3129 | ; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] |
| 3130 | ; MIPS32R5EL-NEXT: move $sp, $fp |
| 3131 | ; MIPS32R5EL-NEXT: lw $fp, 28($sp) # 4-byte Folded Reload |
| 3132 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, 32 |
| 3133 | ; MIPS32R5EL-NEXT: jr $ra |
| 3134 | ; MIPS32R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3135 | %1 = load <8 x i8>, <8 x i8> * @gv8i8 |
| 3136 | ret <8 x i8> %1 |
| 3137 | } |
| 3138 | |
| 3139 | define <16 x i8> @ret_16_i8() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 3140 | ; MIPS32-LABEL: ret_16_i8: |
| 3141 | ; MIPS32: # %bb.0: |
| 3142 | ; MIPS32-NEXT: lui $1, %hi(gv16i8) |
| 3143 | ; MIPS32-NEXT: lw $2, %lo(gv16i8)($1) |
| 3144 | ; MIPS32-NEXT: addiu $1, $1, %lo(gv16i8) |
| 3145 | ; MIPS32-NEXT: lw $3, 4($1) |
| 3146 | ; MIPS32-NEXT: lw $4, 8($1) |
| 3147 | ; MIPS32-NEXT: lw $5, 12($1) |
| 3148 | ; MIPS32-NEXT: jr $ra |
| 3149 | ; MIPS32-NEXT: nop |
| 3150 | ; |
| 3151 | ; MIPS64-LABEL: ret_16_i8: |
| 3152 | ; MIPS64: # %bb.0: |
| 3153 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_16_i8))) |
| 3154 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 3155 | ; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_16_i8))) |
| 3156 | ; MIPS64-NEXT: ld $1, %got_disp(gv16i8)($1) |
| 3157 | ; MIPS64-NEXT: ld $2, 0($1) |
| 3158 | ; MIPS64-NEXT: ld $3, 8($1) |
| 3159 | ; MIPS64-NEXT: jr $ra |
| 3160 | ; MIPS64-NEXT: nop |
| 3161 | ; |
| 3162 | ; MIPS32R5-LABEL: ret_16_i8: |
| 3163 | ; MIPS32R5: # %bb.0: |
| 3164 | ; MIPS32R5-NEXT: lui $1, %hi(gv16i8) |
| 3165 | ; MIPS32R5-NEXT: addiu $1, $1, %lo(gv16i8) |
| 3166 | ; MIPS32R5-NEXT: ld.w $w0, 0($1) |
| 3167 | ; MIPS32R5-NEXT: copy_s.w $2, $w0[0] |
| 3168 | ; MIPS32R5-NEXT: copy_s.w $3, $w0[1] |
| 3169 | ; MIPS32R5-NEXT: copy_s.w $4, $w0[2] |
| 3170 | ; MIPS32R5-NEXT: copy_s.w $5, $w0[3] |
| 3171 | ; MIPS32R5-NEXT: jr $ra |
| 3172 | ; MIPS32R5-NEXT: nop |
| 3173 | ; |
| 3174 | ; MIPS64R5-LABEL: ret_16_i8: |
| 3175 | ; MIPS64R5: # %bb.0: |
| 3176 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_16_i8))) |
| 3177 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 3178 | ; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_16_i8))) |
| 3179 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv16i8)($1) |
| 3180 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 3181 | ; MIPS64R5-NEXT: copy_s.d $2, $w0[0] |
| 3182 | ; MIPS64R5-NEXT: copy_s.d $3, $w0[1] |
| 3183 | ; MIPS64R5-NEXT: jr $ra |
| 3184 | ; MIPS64R5-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3185 | %1 = load <16 x i8>, <16 x i8> * @gv16i8 |
| 3186 | ret <16 x i8> %1 |
| 3187 | } |
| 3188 | |
| 3189 | define <2 x i16> @ret_2_i16() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 3190 | ; MIPS32-LABEL: ret_2_i16: |
| 3191 | ; MIPS32: # %bb.0: |
| 3192 | ; MIPS32-NEXT: lui $1, %hi(gv2i16) |
| 3193 | ; MIPS32-NEXT: lw $2, %lo(gv2i16)($1) |
| 3194 | ; MIPS32-NEXT: jr $ra |
| 3195 | ; MIPS32-NEXT: nop |
| 3196 | ; |
| 3197 | ; MIPS64-LABEL: ret_2_i16: |
| 3198 | ; MIPS64: # %bb.0: |
| 3199 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i16))) |
| 3200 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 3201 | ; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i16))) |
| 3202 | ; MIPS64-NEXT: ld $1, %got_disp(gv2i16)($1) |
| 3203 | ; MIPS64-NEXT: lw $2, 0($1) |
| 3204 | ; MIPS64-NEXT: jr $ra |
| 3205 | ; MIPS64-NEXT: nop |
| 3206 | ; |
| 3207 | ; MIPS32R5-LABEL: ret_2_i16: |
| 3208 | ; MIPS32R5: # %bb.0: |
| 3209 | ; MIPS32R5-NEXT: lui $1, %hi(gv2i16) |
| 3210 | ; MIPS32R5-NEXT: lw $2, %lo(gv2i16)($1) |
| 3211 | ; MIPS32R5-NEXT: jr $ra |
| 3212 | ; MIPS32R5-NEXT: nop |
| 3213 | ; |
| 3214 | ; MIPS64R5-LABEL: ret_2_i16: |
| 3215 | ; MIPS64R5: # %bb.0: |
| 3216 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i16))) |
| 3217 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 3218 | ; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i16))) |
| 3219 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv2i16)($1) |
| 3220 | ; MIPS64R5-NEXT: lw $2, 0($1) |
| 3221 | ; MIPS64R5-NEXT: jr $ra |
| 3222 | ; MIPS64R5-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3223 | %1 = load <2 x i16>, <2 x i16> * @gv2i16 |
| 3224 | ret <2 x i16> %1 |
| 3225 | } |
| 3226 | |
| 3227 | define <4 x i16> @ret_4_i16() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 3228 | ; MIPS32-LABEL: ret_4_i16: |
| 3229 | ; MIPS32: # %bb.0: |
| 3230 | ; MIPS32-NEXT: lui $1, %hi(gv4i16) |
| 3231 | ; MIPS32-NEXT: lw $2, %lo(gv4i16)($1) |
| 3232 | ; MIPS32-NEXT: addiu $1, $1, %lo(gv4i16) |
| 3233 | ; MIPS32-NEXT: lw $3, 4($1) |
| 3234 | ; MIPS32-NEXT: jr $ra |
| 3235 | ; MIPS32-NEXT: nop |
| 3236 | ; |
| 3237 | ; MIPS64-LABEL: ret_4_i16: |
| 3238 | ; MIPS64: # %bb.0: |
| 3239 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_4_i16))) |
| 3240 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 3241 | ; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_4_i16))) |
| 3242 | ; MIPS64-NEXT: ld $1, %got_disp(gv4i16)($1) |
| 3243 | ; MIPS64-NEXT: ld $2, 0($1) |
| 3244 | ; MIPS64-NEXT: jr $ra |
| 3245 | ; MIPS64-NEXT: nop |
| 3246 | ; |
| 3247 | ; MIPS32R5EB-LABEL: ret_4_i16: |
| 3248 | ; MIPS32R5EB: # %bb.0: |
| 3249 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, -32 |
| 3250 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 32 |
| 3251 | ; MIPS32R5EB-NEXT: sw $fp, 28($sp) # 4-byte Folded Spill |
| 3252 | ; MIPS32R5EB-NEXT: .cfi_offset 30, -4 |
| 3253 | ; MIPS32R5EB-NEXT: move $fp, $sp |
| 3254 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 |
| 3255 | ; MIPS32R5EB-NEXT: addiu $1, $zero, -16 |
| 3256 | ; MIPS32R5EB-NEXT: and $sp, $sp, $1 |
| 3257 | ; MIPS32R5EB-NEXT: lui $1, %hi(gv4i16) |
| 3258 | ; MIPS32R5EB-NEXT: lw $2, %lo(gv4i16)($1) |
| 3259 | ; MIPS32R5EB-NEXT: sw $2, 4($sp) |
| 3260 | ; MIPS32R5EB-NEXT: addiu $1, $1, %lo(gv4i16) |
| 3261 | ; MIPS32R5EB-NEXT: lw $1, 4($1) |
| 3262 | ; MIPS32R5EB-NEXT: sw $1, 12($sp) |
| 3263 | ; MIPS32R5EB-NEXT: ld.w $w0, 0($sp) |
| 3264 | ; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] |
| 3265 | ; MIPS32R5EB-NEXT: copy_s.w $3, $w0[3] |
| 3266 | ; MIPS32R5EB-NEXT: move $sp, $fp |
| 3267 | ; MIPS32R5EB-NEXT: lw $fp, 28($sp) # 4-byte Folded Reload |
| 3268 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, 32 |
| 3269 | ; MIPS32R5EB-NEXT: jr $ra |
| 3270 | ; MIPS32R5EB-NEXT: nop |
| 3271 | ; |
| 3272 | ; MIPS64R5-LABEL: ret_4_i16: |
| 3273 | ; MIPS64R5: # %bb.0: |
| 3274 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_4_i16))) |
| 3275 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 3276 | ; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_4_i16))) |
| 3277 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv4i16)($1) |
| 3278 | ; MIPS64R5-NEXT: ld $2, 0($1) |
| 3279 | ; MIPS64R5-NEXT: jr $ra |
| 3280 | ; MIPS64R5-NEXT: nop |
| 3281 | ; |
| 3282 | ; MIPS32R5EL-LABEL: ret_4_i16: |
| 3283 | ; MIPS32R5EL: # %bb.0: |
| 3284 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, -32 |
| 3285 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 32 |
| 3286 | ; MIPS32R5EL-NEXT: sw $fp, 28($sp) # 4-byte Folded Spill |
| 3287 | ; MIPS32R5EL-NEXT: .cfi_offset 30, -4 |
| 3288 | ; MIPS32R5EL-NEXT: move $fp, $sp |
| 3289 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 |
| 3290 | ; MIPS32R5EL-NEXT: addiu $1, $zero, -16 |
| 3291 | ; MIPS32R5EL-NEXT: and $sp, $sp, $1 |
| 3292 | ; MIPS32R5EL-NEXT: lui $1, %hi(gv4i16) |
| 3293 | ; MIPS32R5EL-NEXT: lw $2, %lo(gv4i16)($1) |
| 3294 | ; MIPS32R5EL-NEXT: sw $2, 0($sp) |
| 3295 | ; MIPS32R5EL-NEXT: addiu $1, $1, %lo(gv4i16) |
| 3296 | ; MIPS32R5EL-NEXT: lw $1, 4($1) |
| 3297 | ; MIPS32R5EL-NEXT: sw $1, 8($sp) |
| 3298 | ; MIPS32R5EL-NEXT: ld.w $w0, 0($sp) |
| 3299 | ; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] |
| 3300 | ; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] |
| 3301 | ; MIPS32R5EL-NEXT: move $sp, $fp |
| 3302 | ; MIPS32R5EL-NEXT: lw $fp, 28($sp) # 4-byte Folded Reload |
| 3303 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, 32 |
| 3304 | ; MIPS32R5EL-NEXT: jr $ra |
| 3305 | ; MIPS32R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3306 | %1 = load <4 x i16>, <4 x i16> * @gv4i16 |
| 3307 | ret <4 x i16> %1 |
| 3308 | } |
| 3309 | |
| 3310 | define <8 x i16> @ret_8_i16() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 3311 | ; MIPS32-LABEL: ret_8_i16: |
| 3312 | ; MIPS32: # %bb.0: |
| 3313 | ; MIPS32-NEXT: lui $1, %hi(gv8i16) |
| 3314 | ; MIPS32-NEXT: lw $2, %lo(gv8i16)($1) |
| 3315 | ; MIPS32-NEXT: addiu $1, $1, %lo(gv8i16) |
| 3316 | ; MIPS32-NEXT: lw $3, 4($1) |
| 3317 | ; MIPS32-NEXT: lw $4, 8($1) |
| 3318 | ; MIPS32-NEXT: lw $5, 12($1) |
| 3319 | ; MIPS32-NEXT: jr $ra |
| 3320 | ; MIPS32-NEXT: nop |
| 3321 | ; |
| 3322 | ; MIPS64-LABEL: ret_8_i16: |
| 3323 | ; MIPS64: # %bb.0: |
| 3324 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_8_i16))) |
| 3325 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 3326 | ; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_8_i16))) |
| 3327 | ; MIPS64-NEXT: ld $1, %got_disp(gv8i16)($1) |
| 3328 | ; MIPS64-NEXT: ld $2, 0($1) |
| 3329 | ; MIPS64-NEXT: ld $3, 8($1) |
| 3330 | ; MIPS64-NEXT: jr $ra |
| 3331 | ; MIPS64-NEXT: nop |
| 3332 | ; |
| 3333 | ; MIPS32R5-LABEL: ret_8_i16: |
| 3334 | ; MIPS32R5: # %bb.0: |
| 3335 | ; MIPS32R5-NEXT: lui $1, %hi(gv8i16) |
| 3336 | ; MIPS32R5-NEXT: addiu $1, $1, %lo(gv8i16) |
| 3337 | ; MIPS32R5-NEXT: ld.w $w0, 0($1) |
| 3338 | ; MIPS32R5-NEXT: copy_s.w $2, $w0[0] |
| 3339 | ; MIPS32R5-NEXT: copy_s.w $3, $w0[1] |
| 3340 | ; MIPS32R5-NEXT: copy_s.w $4, $w0[2] |
| 3341 | ; MIPS32R5-NEXT: copy_s.w $5, $w0[3] |
| 3342 | ; MIPS32R5-NEXT: jr $ra |
| 3343 | ; MIPS32R5-NEXT: nop |
| 3344 | ; |
| 3345 | ; MIPS64R5-LABEL: ret_8_i16: |
| 3346 | ; MIPS64R5: # %bb.0: |
| 3347 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_8_i16))) |
| 3348 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 3349 | ; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_8_i16))) |
| 3350 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv8i16)($1) |
| 3351 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 3352 | ; MIPS64R5-NEXT: copy_s.d $2, $w0[0] |
| 3353 | ; MIPS64R5-NEXT: copy_s.d $3, $w0[1] |
| 3354 | ; MIPS64R5-NEXT: jr $ra |
| 3355 | ; MIPS64R5-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3356 | %1 = load <8 x i16>, <8 x i16> * @gv8i16 |
| 3357 | ret <8 x i16> %1 |
| 3358 | } |
| 3359 | |
| 3360 | define <2 x i32> @ret_2_i32() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 3361 | ; MIPS32-LABEL: ret_2_i32: |
| 3362 | ; MIPS32: # %bb.0: |
| 3363 | ; MIPS32-NEXT: lui $1, %hi(gv2i32) |
| 3364 | ; MIPS32-NEXT: lw $2, %lo(gv2i32)($1) |
| 3365 | ; MIPS32-NEXT: addiu $1, $1, %lo(gv2i32) |
| 3366 | ; MIPS32-NEXT: lw $3, 4($1) |
| 3367 | ; MIPS32-NEXT: jr $ra |
| 3368 | ; MIPS32-NEXT: nop |
| 3369 | ; |
| 3370 | ; MIPS64-LABEL: ret_2_i32: |
| 3371 | ; MIPS64: # %bb.0: |
| 3372 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i32))) |
| 3373 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 3374 | ; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i32))) |
| 3375 | ; MIPS64-NEXT: ld $1, %got_disp(gv2i32)($1) |
| 3376 | ; MIPS64-NEXT: ld $2, 0($1) |
| 3377 | ; MIPS64-NEXT: jr $ra |
| 3378 | ; MIPS64-NEXT: nop |
| 3379 | ; |
| 3380 | ; MIPS32R5EB-LABEL: ret_2_i32: |
| 3381 | ; MIPS32R5EB: # %bb.0: |
| 3382 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, -32 |
| 3383 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 32 |
| 3384 | ; MIPS32R5EB-NEXT: sw $fp, 28($sp) # 4-byte Folded Spill |
| 3385 | ; MIPS32R5EB-NEXT: .cfi_offset 30, -4 |
| 3386 | ; MIPS32R5EB-NEXT: move $fp, $sp |
| 3387 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 |
| 3388 | ; MIPS32R5EB-NEXT: addiu $1, $zero, -16 |
| 3389 | ; MIPS32R5EB-NEXT: and $sp, $sp, $1 |
| 3390 | ; MIPS32R5EB-NEXT: lui $1, %hi(gv2i32) |
| 3391 | ; MIPS32R5EB-NEXT: lw $2, %lo(gv2i32)($1) |
| 3392 | ; MIPS32R5EB-NEXT: sw $2, 4($sp) |
| 3393 | ; MIPS32R5EB-NEXT: addiu $1, $1, %lo(gv2i32) |
| 3394 | ; MIPS32R5EB-NEXT: lw $1, 4($1) |
| 3395 | ; MIPS32R5EB-NEXT: sw $1, 12($sp) |
| 3396 | ; MIPS32R5EB-NEXT: ld.w $w0, 0($sp) |
| 3397 | ; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] |
| 3398 | ; MIPS32R5EB-NEXT: copy_s.w $3, $w0[3] |
| 3399 | ; MIPS32R5EB-NEXT: move $sp, $fp |
| 3400 | ; MIPS32R5EB-NEXT: lw $fp, 28($sp) # 4-byte Folded Reload |
| 3401 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, 32 |
| 3402 | ; MIPS32R5EB-NEXT: jr $ra |
| 3403 | ; MIPS32R5EB-NEXT: nop |
| 3404 | ; |
| 3405 | ; MIPS64R5-LABEL: ret_2_i32: |
| 3406 | ; MIPS64R5: # %bb.0: |
| 3407 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i32))) |
| 3408 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 3409 | ; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i32))) |
| 3410 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv2i32)($1) |
| 3411 | ; MIPS64R5-NEXT: ld $2, 0($1) |
| 3412 | ; MIPS64R5-NEXT: jr $ra |
| 3413 | ; MIPS64R5-NEXT: nop |
| 3414 | ; |
| 3415 | ; MIPS32R5EL-LABEL: ret_2_i32: |
| 3416 | ; MIPS32R5EL: # %bb.0: |
| 3417 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, -32 |
| 3418 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 32 |
| 3419 | ; MIPS32R5EL-NEXT: sw $fp, 28($sp) # 4-byte Folded Spill |
| 3420 | ; MIPS32R5EL-NEXT: .cfi_offset 30, -4 |
| 3421 | ; MIPS32R5EL-NEXT: move $fp, $sp |
| 3422 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 |
| 3423 | ; MIPS32R5EL-NEXT: addiu $1, $zero, -16 |
| 3424 | ; MIPS32R5EL-NEXT: and $sp, $sp, $1 |
| 3425 | ; MIPS32R5EL-NEXT: lui $1, %hi(gv2i32) |
| 3426 | ; MIPS32R5EL-NEXT: lw $2, %lo(gv2i32)($1) |
| 3427 | ; MIPS32R5EL-NEXT: sw $2, 0($sp) |
| 3428 | ; MIPS32R5EL-NEXT: addiu $1, $1, %lo(gv2i32) |
| 3429 | ; MIPS32R5EL-NEXT: lw $1, 4($1) |
| 3430 | ; MIPS32R5EL-NEXT: sw $1, 8($sp) |
| 3431 | ; MIPS32R5EL-NEXT: ld.w $w0, 0($sp) |
| 3432 | ; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] |
| 3433 | ; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] |
| 3434 | ; MIPS32R5EL-NEXT: move $sp, $fp |
| 3435 | ; MIPS32R5EL-NEXT: lw $fp, 28($sp) # 4-byte Folded Reload |
| 3436 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, 32 |
| 3437 | ; MIPS32R5EL-NEXT: jr $ra |
| 3438 | ; MIPS32R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3439 | %1 = load <2 x i32>, <2 x i32> * @gv2i32 |
| 3440 | ret <2 x i32> %1 |
| 3441 | } |
| 3442 | |
| 3443 | define <4 x i32> @ret_4_i32() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 3444 | ; MIPS32-LABEL: ret_4_i32: |
| 3445 | ; MIPS32: # %bb.0: |
| 3446 | ; MIPS32-NEXT: lui $1, %hi(gv4i32) |
| 3447 | ; MIPS32-NEXT: lw $2, %lo(gv4i32)($1) |
| 3448 | ; MIPS32-NEXT: addiu $1, $1, %lo(gv4i32) |
| 3449 | ; MIPS32-NEXT: lw $3, 4($1) |
| 3450 | ; MIPS32-NEXT: lw $4, 8($1) |
| 3451 | ; MIPS32-NEXT: lw $5, 12($1) |
| 3452 | ; MIPS32-NEXT: jr $ra |
| 3453 | ; MIPS32-NEXT: nop |
| 3454 | ; |
| 3455 | ; MIPS64-LABEL: ret_4_i32: |
| 3456 | ; MIPS64: # %bb.0: |
| 3457 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_4_i32))) |
| 3458 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 3459 | ; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_4_i32))) |
| 3460 | ; MIPS64-NEXT: ld $1, %got_disp(gv4i32)($1) |
| 3461 | ; MIPS64-NEXT: ld $2, 0($1) |
| 3462 | ; MIPS64-NEXT: ld $3, 8($1) |
| 3463 | ; MIPS64-NEXT: jr $ra |
| 3464 | ; MIPS64-NEXT: nop |
| 3465 | ; |
| 3466 | ; MIPS32R5-LABEL: ret_4_i32: |
| 3467 | ; MIPS32R5: # %bb.0: |
| 3468 | ; MIPS32R5-NEXT: lui $1, %hi(gv4i32) |
| 3469 | ; MIPS32R5-NEXT: addiu $1, $1, %lo(gv4i32) |
| 3470 | ; MIPS32R5-NEXT: ld.w $w0, 0($1) |
| 3471 | ; MIPS32R5-NEXT: copy_s.w $2, $w0[0] |
| 3472 | ; MIPS32R5-NEXT: copy_s.w $3, $w0[1] |
| 3473 | ; MIPS32R5-NEXT: copy_s.w $4, $w0[2] |
| 3474 | ; MIPS32R5-NEXT: copy_s.w $5, $w0[3] |
| 3475 | ; MIPS32R5-NEXT: jr $ra |
| 3476 | ; MIPS32R5-NEXT: nop |
| 3477 | ; |
| 3478 | ; MIPS64R5-LABEL: ret_4_i32: |
| 3479 | ; MIPS64R5: # %bb.0: |
| 3480 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_4_i32))) |
| 3481 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 3482 | ; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_4_i32))) |
| 3483 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv4i32)($1) |
| 3484 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 3485 | ; MIPS64R5-NEXT: copy_s.d $2, $w0[0] |
| 3486 | ; MIPS64R5-NEXT: copy_s.d $3, $w0[1] |
| 3487 | ; MIPS64R5-NEXT: jr $ra |
| 3488 | ; MIPS64R5-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3489 | %1 = load <4 x i32>, <4 x i32> * @gv4i32 |
| 3490 | ret <4 x i32> %1 |
| 3491 | } |
| 3492 | |
| 3493 | define <2 x i64> @ret_2_i64() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 3494 | ; MIPS32-LABEL: ret_2_i64: |
| 3495 | ; MIPS32: # %bb.0: |
| 3496 | ; MIPS32-NEXT: lui $1, %hi(gv2i64) |
| 3497 | ; MIPS32-NEXT: lw $2, %lo(gv2i64)($1) |
| 3498 | ; MIPS32-NEXT: addiu $1, $1, %lo(gv2i64) |
| 3499 | ; MIPS32-NEXT: lw $3, 4($1) |
| 3500 | ; MIPS32-NEXT: lw $4, 8($1) |
| 3501 | ; MIPS32-NEXT: lw $5, 12($1) |
| 3502 | ; MIPS32-NEXT: jr $ra |
| 3503 | ; MIPS32-NEXT: nop |
| 3504 | ; |
| 3505 | ; MIPS64-LABEL: ret_2_i64: |
| 3506 | ; MIPS64: # %bb.0: |
| 3507 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i64))) |
| 3508 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 3509 | ; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i64))) |
| 3510 | ; MIPS64-NEXT: ld $1, %got_disp(gv2i64)($1) |
| 3511 | ; MIPS64-NEXT: ld $2, 0($1) |
| 3512 | ; MIPS64-NEXT: ld $3, 8($1) |
| 3513 | ; MIPS64-NEXT: jr $ra |
| 3514 | ; MIPS64-NEXT: nop |
| 3515 | ; |
| 3516 | ; MIPS32R5-LABEL: ret_2_i64: |
| 3517 | ; MIPS32R5: # %bb.0: |
| 3518 | ; MIPS32R5-NEXT: lui $1, %hi(gv2i64) |
| 3519 | ; MIPS32R5-NEXT: addiu $1, $1, %lo(gv2i64) |
| 3520 | ; MIPS32R5-NEXT: ld.w $w0, 0($1) |
| 3521 | ; MIPS32R5-NEXT: copy_s.w $2, $w0[0] |
| 3522 | ; MIPS32R5-NEXT: copy_s.w $3, $w0[1] |
| 3523 | ; MIPS32R5-NEXT: copy_s.w $4, $w0[2] |
| 3524 | ; MIPS32R5-NEXT: copy_s.w $5, $w0[3] |
| 3525 | ; MIPS32R5-NEXT: jr $ra |
| 3526 | ; MIPS32R5-NEXT: nop |
| 3527 | ; |
| 3528 | ; MIPS64R5-LABEL: ret_2_i64: |
| 3529 | ; MIPS64R5: # %bb.0: |
| 3530 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i64))) |
| 3531 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 3532 | ; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i64))) |
| 3533 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv2i64)($1) |
| 3534 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 3535 | ; MIPS64R5-NEXT: copy_s.d $2, $w0[0] |
| 3536 | ; MIPS64R5-NEXT: copy_s.d $3, $w0[1] |
| 3537 | ; MIPS64R5-NEXT: jr $ra |
| 3538 | ; MIPS64R5-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3539 | %1 = load <2 x i64>, <2 x i64> * @gv2i64 |
| 3540 | ret <2 x i64> %1 |
| 3541 | } |
| 3542 | |
| 3543 | @gv2f32 = global <2 x float> <float 0.0, float 0.0> |
| 3544 | @gv4f32 = global <4 x float> <float 0.0, float 0.0, float 0.0, float 0.0> |
| 3545 | |
| 3546 | define <2 x float> @ret_float_2() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 3547 | ; MIPS32-LABEL: ret_float_2: |
| 3548 | ; MIPS32: # %bb.0: # %entry |
| 3549 | ; MIPS32-NEXT: lui $1, %hi(gv2f32) |
| 3550 | ; MIPS32-NEXT: addiu $2, $1, %lo(gv2f32) |
| 3551 | ; MIPS32-NEXT: lwc1 $f0, 4($2) |
| 3552 | ; MIPS32-NEXT: swc1 $f0, 4($4) |
| 3553 | ; MIPS32-NEXT: lwc1 $f0, %lo(gv2f32)($1) |
| 3554 | ; MIPS32-NEXT: swc1 $f0, 0($4) |
| 3555 | ; MIPS32-NEXT: jr $ra |
| 3556 | ; MIPS32-NEXT: nop |
| 3557 | ; |
| 3558 | ; MIPS64-LABEL: ret_float_2: |
| 3559 | ; MIPS64: # %bb.0: # %entry |
| 3560 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_float_2))) |
| 3561 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 3562 | ; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_float_2))) |
| 3563 | ; MIPS64-NEXT: ld $1, %got_disp(gv2f32)($1) |
| 3564 | ; MIPS64-NEXT: ld $2, 0($1) |
| 3565 | ; MIPS64-NEXT: jr $ra |
| 3566 | ; MIPS64-NEXT: nop |
| 3567 | ; |
| 3568 | ; MIPS32R5-LABEL: ret_float_2: |
| 3569 | ; MIPS32R5: # %bb.0: # %entry |
| 3570 | ; MIPS32R5-NEXT: lui $1, %hi(gv2f32) |
| 3571 | ; MIPS32R5-NEXT: addiu $2, $1, %lo(gv2f32) |
| 3572 | ; MIPS32R5-NEXT: lwc1 $f0, 4($2) |
| 3573 | ; MIPS32R5-NEXT: swc1 $f0, 4($4) |
| 3574 | ; MIPS32R5-NEXT: lwc1 $f0, %lo(gv2f32)($1) |
| 3575 | ; MIPS32R5-NEXT: swc1 $f0, 0($4) |
| 3576 | ; MIPS32R5-NEXT: jr $ra |
| 3577 | ; MIPS32R5-NEXT: nop |
| 3578 | ; |
| 3579 | ; MIPS64R5-LABEL: ret_float_2: |
| 3580 | ; MIPS64R5: # %bb.0: # %entry |
| 3581 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_float_2))) |
| 3582 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 3583 | ; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_float_2))) |
| 3584 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv2f32)($1) |
| 3585 | ; MIPS64R5-NEXT: ld $2, 0($1) |
| 3586 | ; MIPS64R5-NEXT: jr $ra |
| 3587 | ; MIPS64R5-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3588 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3589 | %0 = load <2 x float>, <2 x float> * @gv2f32 |
| 3590 | ret <2 x float> %0 |
| 3591 | } |
| 3592 | |
| 3593 | define <4 x float> @ret_float_4() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 3594 | ; MIPS32-LABEL: ret_float_4: |
| 3595 | ; MIPS32: # %bb.0: # %entry |
| 3596 | ; MIPS32-NEXT: lui $1, %hi(gv4f32) |
| 3597 | ; MIPS32-NEXT: addiu $2, $1, %lo(gv4f32) |
| 3598 | ; MIPS32-NEXT: lwc1 $f0, 12($2) |
| 3599 | ; MIPS32-NEXT: swc1 $f0, 12($4) |
| 3600 | ; MIPS32-NEXT: lwc1 $f0, 8($2) |
| 3601 | ; MIPS32-NEXT: swc1 $f0, 8($4) |
| 3602 | ; MIPS32-NEXT: lwc1 $f0, 4($2) |
| 3603 | ; MIPS32-NEXT: swc1 $f0, 4($4) |
| 3604 | ; MIPS32-NEXT: lwc1 $f0, %lo(gv4f32)($1) |
| 3605 | ; MIPS32-NEXT: swc1 $f0, 0($4) |
| 3606 | ; MIPS32-NEXT: jr $ra |
| 3607 | ; MIPS32-NEXT: nop |
| 3608 | ; |
| 3609 | ; MIPS64-LABEL: ret_float_4: |
| 3610 | ; MIPS64: # %bb.0: # %entry |
| 3611 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_float_4))) |
| 3612 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 3613 | ; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_float_4))) |
| 3614 | ; MIPS64-NEXT: ld $1, %got_disp(gv4f32)($1) |
| 3615 | ; MIPS64-NEXT: ld $2, 0($1) |
| 3616 | ; MIPS64-NEXT: ld $3, 8($1) |
| 3617 | ; MIPS64-NEXT: jr $ra |
| 3618 | ; MIPS64-NEXT: nop |
| 3619 | ; |
| 3620 | ; MIPS32R5-LABEL: ret_float_4: |
| 3621 | ; MIPS32R5: # %bb.0: # %entry |
| 3622 | ; MIPS32R5-NEXT: lui $1, %hi(gv4f32) |
| 3623 | ; MIPS32R5-NEXT: addiu $1, $1, %lo(gv4f32) |
| 3624 | ; MIPS32R5-NEXT: ld.w $w0, 0($1) |
| 3625 | ; MIPS32R5-NEXT: st.w $w0, 0($4) |
| 3626 | ; MIPS32R5-NEXT: jr $ra |
| 3627 | ; MIPS32R5-NEXT: nop |
| 3628 | ; |
| 3629 | ; MIPS64R5-LABEL: ret_float_4: |
| 3630 | ; MIPS64R5: # %bb.0: # %entry |
| 3631 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_float_4))) |
| 3632 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 3633 | ; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_float_4))) |
| 3634 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv4f32)($1) |
| 3635 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 3636 | ; MIPS64R5-NEXT: copy_s.d $2, $w0[0] |
| 3637 | ; MIPS64R5-NEXT: copy_s.d $3, $w0[1] |
| 3638 | ; MIPS64R5-NEXT: jr $ra |
| 3639 | ; MIPS64R5-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3640 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3641 | %0 = load <4 x float>, <4 x float> * @gv4f32 |
| 3642 | ret <4 x float> %0 |
| 3643 | } |
| 3644 | |
| 3645 | @gv2f64 = global <2 x double> <double 0.0, double 0.0> |
| 3646 | |
| 3647 | define <2 x double> @ret_double_2() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 3648 | ; MIPS32-LABEL: ret_double_2: |
| 3649 | ; MIPS32: # %bb.0: # %entry |
| 3650 | ; MIPS32-NEXT: lui $1, %hi(gv2f64) |
| 3651 | ; MIPS32-NEXT: addiu $2, $1, %lo(gv2f64) |
| 3652 | ; MIPS32-NEXT: ldc1 $f0, 8($2) |
| 3653 | ; MIPS32-NEXT: sdc1 $f0, 8($4) |
| 3654 | ; MIPS32-NEXT: ldc1 $f0, %lo(gv2f64)($1) |
| 3655 | ; MIPS32-NEXT: sdc1 $f0, 0($4) |
| 3656 | ; MIPS32-NEXT: jr $ra |
| 3657 | ; MIPS32-NEXT: nop |
| 3658 | ; |
| 3659 | ; MIPS64-LABEL: ret_double_2: |
| 3660 | ; MIPS64: # %bb.0: # %entry |
| 3661 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_double_2))) |
| 3662 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 3663 | ; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_double_2))) |
| 3664 | ; MIPS64-NEXT: ld $1, %got_disp(gv2f64)($1) |
| 3665 | ; MIPS64-NEXT: ld $2, 0($1) |
| 3666 | ; MIPS64-NEXT: ld $3, 8($1) |
| 3667 | ; MIPS64-NEXT: jr $ra |
| 3668 | ; MIPS64-NEXT: nop |
| 3669 | ; |
| 3670 | ; MIPS32R5-LABEL: ret_double_2: |
| 3671 | ; MIPS32R5: # %bb.0: # %entry |
| 3672 | ; MIPS32R5-NEXT: lui $1, %hi(gv2f64) |
| 3673 | ; MIPS32R5-NEXT: addiu $1, $1, %lo(gv2f64) |
| 3674 | ; MIPS32R5-NEXT: ld.d $w0, 0($1) |
| 3675 | ; MIPS32R5-NEXT: st.d $w0, 0($4) |
| 3676 | ; MIPS32R5-NEXT: jr $ra |
| 3677 | ; MIPS32R5-NEXT: nop |
| 3678 | ; |
| 3679 | ; MIPS64R5-LABEL: ret_double_2: |
| 3680 | ; MIPS64R5: # %bb.0: # %entry |
| 3681 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_double_2))) |
| 3682 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 3683 | ; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_double_2))) |
| 3684 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv2f64)($1) |
| 3685 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 3686 | ; MIPS64R5-NEXT: copy_s.d $2, $w0[0] |
| 3687 | ; MIPS64R5-NEXT: copy_s.d $3, $w0[1] |
| 3688 | ; MIPS64R5-NEXT: jr $ra |
| 3689 | ; MIPS64R5-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3690 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3691 | %0 = load <2 x double>, <2 x double> * @gv2f64 |
| 3692 | ret <2 x double> %0 |
| 3693 | } |
| 3694 | |
| 3695 | ; Test argument lowering and call result lowering. |
| 3696 | |
| 3697 | define void @call_i8_2() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 3698 | ; MIPS32EB-LABEL: call_i8_2: |
| 3699 | ; MIPS32EB: # %bb.0: # %entry |
| 3700 | ; MIPS32EB-NEXT: addiu $sp, $sp, -24 |
| 3701 | ; MIPS32EB-NEXT: .cfi_def_cfa_offset 24 |
| 3702 | ; MIPS32EB-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 3703 | ; MIPS32EB-NEXT: .cfi_offset 31, -4 |
| 3704 | ; MIPS32EB-NEXT: addiu $4, $zero, 1543 |
| 3705 | ; MIPS32EB-NEXT: addiu $5, $zero, 3080 |
| 3706 | ; MIPS32EB-NEXT: jal i8_2 |
| 3707 | ; MIPS32EB-NEXT: nop |
| 3708 | ; MIPS32EB-NEXT: srl $1, $2, 16 |
| 3709 | ; MIPS32EB-NEXT: lui $3, %hi(gv2i8) |
| 3710 | ; MIPS32EB-NEXT: addiu $4, $3, %lo(gv2i8) |
| 3711 | ; MIPS32EB-NEXT: sb $1, 1($4) |
| 3712 | ; MIPS32EB-NEXT: srl $1, $2, 24 |
| 3713 | ; MIPS32EB-NEXT: sb $1, %lo(gv2i8)($3) |
| 3714 | ; MIPS32EB-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 3715 | ; MIPS32EB-NEXT: addiu $sp, $sp, 24 |
| 3716 | ; MIPS32EB-NEXT: jr $ra |
| 3717 | ; MIPS32EB-NEXT: nop |
| 3718 | ; |
| 3719 | ; MIPS64EB-LABEL: call_i8_2: |
| 3720 | ; MIPS64EB: # %bb.0: # %entry |
| 3721 | ; MIPS64EB-NEXT: daddiu $sp, $sp, -16 |
| 3722 | ; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 |
| 3723 | ; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 3724 | ; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 3725 | ; MIPS64EB-NEXT: .cfi_offset 31, -8 |
| 3726 | ; MIPS64EB-NEXT: .cfi_offset 28, -16 |
| 3727 | ; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_2))) |
| 3728 | ; MIPS64EB-NEXT: daddu $1, $1, $25 |
| 3729 | ; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_2))) |
| 3730 | ; MIPS64EB-NEXT: ld $25, %call16(i8_2)($gp) |
| 3731 | ; MIPS64EB-NEXT: daddiu $4, $zero, 1543 |
| 3732 | ; MIPS64EB-NEXT: daddiu $5, $zero, 3080 |
| 3733 | ; MIPS64EB-NEXT: jalr $25 |
| 3734 | ; MIPS64EB-NEXT: nop |
| 3735 | ; MIPS64EB-NEXT: dsrl $1, $2, 48 |
| 3736 | ; MIPS64EB-NEXT: ld $3, %got_disp(gv2i8)($gp) |
| 3737 | ; MIPS64EB-NEXT: sb $1, 1($3) |
| 3738 | ; MIPS64EB-NEXT: dsrl $1, $2, 56 |
| 3739 | ; MIPS64EB-NEXT: sb $1, 0($3) |
| 3740 | ; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 3741 | ; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 3742 | ; MIPS64EB-NEXT: daddiu $sp, $sp, 16 |
| 3743 | ; MIPS64EB-NEXT: jr $ra |
| 3744 | ; MIPS64EB-NEXT: nop |
| 3745 | ; |
| 3746 | ; MIPS32R5EB-LABEL: call_i8_2: |
| 3747 | ; MIPS32R5EB: # %bb.0: # %entry |
| 3748 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, -32 |
| 3749 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 32 |
| 3750 | ; MIPS32R5EB-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill |
| 3751 | ; MIPS32R5EB-NEXT: .cfi_offset 31, -4 |
| 3752 | ; MIPS32R5EB-NEXT: addiu $1, $zero, 1543 |
| 3753 | ; MIPS32R5EB-NEXT: sh $1, 20($sp) |
| 3754 | ; MIPS32R5EB-NEXT: addiu $1, $zero, 3080 |
| 3755 | ; MIPS32R5EB-NEXT: sh $1, 24($sp) |
| 3756 | ; MIPS32R5EB-NEXT: lhu $4, 20($sp) |
| 3757 | ; MIPS32R5EB-NEXT: lhu $5, 24($sp) |
| 3758 | ; MIPS32R5EB-NEXT: jal i8_2 |
| 3759 | ; MIPS32R5EB-NEXT: nop |
| 3760 | ; MIPS32R5EB-NEXT: sw $2, 16($sp) |
| 3761 | ; MIPS32R5EB-NEXT: lui $1, %hi(gv2i8) |
| 3762 | ; MIPS32R5EB-NEXT: lhu $2, 16($sp) |
| 3763 | ; MIPS32R5EB-NEXT: sh $2, %lo(gv2i8)($1) |
| 3764 | ; MIPS32R5EB-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload |
| 3765 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, 32 |
| 3766 | ; MIPS32R5EB-NEXT: jr $ra |
| 3767 | ; MIPS32R5EB-NEXT: nop |
| 3768 | ; |
| 3769 | ; MIPS64R5EB-LABEL: call_i8_2: |
| 3770 | ; MIPS64R5EB: # %bb.0: # %entry |
| 3771 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, -48 |
| 3772 | ; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 48 |
| 3773 | ; MIPS64R5EB-NEXT: sd $ra, 40($sp) # 8-byte Folded Spill |
| 3774 | ; MIPS64R5EB-NEXT: sd $gp, 32($sp) # 8-byte Folded Spill |
| 3775 | ; MIPS64R5EB-NEXT: .cfi_offset 31, -8 |
| 3776 | ; MIPS64R5EB-NEXT: .cfi_offset 28, -16 |
| 3777 | ; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_2))) |
| 3778 | ; MIPS64R5EB-NEXT: daddu $1, $1, $25 |
| 3779 | ; MIPS64R5EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_2))) |
| 3780 | ; MIPS64R5EB-NEXT: addiu $1, $zero, 1543 |
| 3781 | ; MIPS64R5EB-NEXT: sh $1, 24($sp) |
| 3782 | ; MIPS64R5EB-NEXT: addiu $1, $zero, 3080 |
| 3783 | ; MIPS64R5EB-NEXT: sh $1, 28($sp) |
| 3784 | ; MIPS64R5EB-NEXT: ld $25, %call16(i8_2)($gp) |
| 3785 | ; MIPS64R5EB-NEXT: lh $4, 24($sp) |
| 3786 | ; MIPS64R5EB-NEXT: lh $5, 28($sp) |
| 3787 | ; MIPS64R5EB-NEXT: jalr $25 |
| 3788 | ; MIPS64R5EB-NEXT: nop |
| 3789 | ; MIPS64R5EB-NEXT: sd $2, 16($sp) |
| 3790 | ; MIPS64R5EB-NEXT: ldi.b $w0, 0 |
| 3791 | ; MIPS64R5EB-NEXT: lbu $1, 16($sp) |
| 3792 | ; MIPS64R5EB-NEXT: insert.h $w0[0], $1 |
| 3793 | ; MIPS64R5EB-NEXT: lbu $1, 17($sp) |
| 3794 | ; MIPS64R5EB-NEXT: insert.h $w0[1], $1 |
| 3795 | ; MIPS64R5EB-NEXT: lbu $1, 18($sp) |
| 3796 | ; MIPS64R5EB-NEXT: insert.h $w0[2], $1 |
| 3797 | ; MIPS64R5EB-NEXT: lbu $1, 19($sp) |
| 3798 | ; MIPS64R5EB-NEXT: insert.h $w0[3], $1 |
| 3799 | ; MIPS64R5EB-NEXT: lbu $1, 20($sp) |
| 3800 | ; MIPS64R5EB-NEXT: insert.h $w0[4], $1 |
| 3801 | ; MIPS64R5EB-NEXT: lbu $1, 21($sp) |
| 3802 | ; MIPS64R5EB-NEXT: insert.h $w0[5], $1 |
| 3803 | ; MIPS64R5EB-NEXT: lbu $1, 23($sp) |
| 3804 | ; MIPS64R5EB-NEXT: lbu $2, 22($sp) |
| 3805 | ; MIPS64R5EB-NEXT: insert.h $w0[6], $2 |
| 3806 | ; MIPS64R5EB-NEXT: insert.h $w0[7], $1 |
| 3807 | ; MIPS64R5EB-NEXT: copy_s.h $1, $w0[0] |
| 3808 | ; MIPS64R5EB-NEXT: copy_s.h $2, $w0[1] |
| 3809 | ; MIPS64R5EB-NEXT: sw $2, 12($sp) |
| 3810 | ; MIPS64R5EB-NEXT: sw $1, 4($sp) |
| 3811 | ; MIPS64R5EB-NEXT: ld.d $w0, 0($sp) |
| 3812 | ; MIPS64R5EB-NEXT: copy_s.d $1, $w0[0] |
| 3813 | ; MIPS64R5EB-NEXT: copy_s.d $2, $w0[1] |
| 3814 | ; MIPS64R5EB-NEXT: ld $3, %got_disp(gv2i8)($gp) |
| 3815 | ; MIPS64R5EB-NEXT: sb $2, 1($3) |
| 3816 | ; MIPS64R5EB-NEXT: sb $1, 0($3) |
| 3817 | ; MIPS64R5EB-NEXT: ld $gp, 32($sp) # 8-byte Folded Reload |
| 3818 | ; MIPS64R5EB-NEXT: ld $ra, 40($sp) # 8-byte Folded Reload |
| 3819 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, 48 |
| 3820 | ; MIPS64R5EB-NEXT: jr $ra |
| 3821 | ; MIPS64R5EB-NEXT: nop |
| 3822 | ; |
| 3823 | ; MIPS32EL-LABEL: call_i8_2: |
| 3824 | ; MIPS32EL: # %bb.0: # %entry |
| 3825 | ; MIPS32EL-NEXT: addiu $sp, $sp, -24 |
| 3826 | ; MIPS32EL-NEXT: .cfi_def_cfa_offset 24 |
| 3827 | ; MIPS32EL-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 3828 | ; MIPS32EL-NEXT: .cfi_offset 31, -4 |
| 3829 | ; MIPS32EL-NEXT: addiu $4, $zero, 1798 |
| 3830 | ; MIPS32EL-NEXT: addiu $5, $zero, 2060 |
| 3831 | ; MIPS32EL-NEXT: jal i8_2 |
| 3832 | ; MIPS32EL-NEXT: nop |
| 3833 | ; MIPS32EL-NEXT: lui $1, %hi(gv2i8) |
| 3834 | ; MIPS32EL-NEXT: sb $2, %lo(gv2i8)($1) |
| 3835 | ; MIPS32EL-NEXT: srl $2, $2, 8 |
| 3836 | ; MIPS32EL-NEXT: addiu $1, $1, %lo(gv2i8) |
| 3837 | ; MIPS32EL-NEXT: sb $2, 1($1) |
| 3838 | ; MIPS32EL-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 3839 | ; MIPS32EL-NEXT: addiu $sp, $sp, 24 |
| 3840 | ; MIPS32EL-NEXT: jr $ra |
| 3841 | ; MIPS32EL-NEXT: nop |
| 3842 | ; |
| 3843 | ; MIPS64EL-LABEL: call_i8_2: |
| 3844 | ; MIPS64EL: # %bb.0: # %entry |
| 3845 | ; MIPS64EL-NEXT: daddiu $sp, $sp, -16 |
| 3846 | ; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 |
| 3847 | ; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 3848 | ; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 3849 | ; MIPS64EL-NEXT: .cfi_offset 31, -8 |
| 3850 | ; MIPS64EL-NEXT: .cfi_offset 28, -16 |
| 3851 | ; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_2))) |
| 3852 | ; MIPS64EL-NEXT: daddu $1, $1, $25 |
| 3853 | ; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_2))) |
| 3854 | ; MIPS64EL-NEXT: ld $25, %call16(i8_2)($gp) |
| 3855 | ; MIPS64EL-NEXT: daddiu $4, $zero, 1798 |
| 3856 | ; MIPS64EL-NEXT: daddiu $5, $zero, 2060 |
| 3857 | ; MIPS64EL-NEXT: jalr $25 |
| 3858 | ; MIPS64EL-NEXT: nop |
| 3859 | ; MIPS64EL-NEXT: sll $1, $2, 0 |
| 3860 | ; MIPS64EL-NEXT: ld $2, %got_disp(gv2i8)($gp) |
| 3861 | ; MIPS64EL-NEXT: sb $1, 0($2) |
| 3862 | ; MIPS64EL-NEXT: srl $1, $1, 8 |
| 3863 | ; MIPS64EL-NEXT: sb $1, 1($2) |
| 3864 | ; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 3865 | ; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 3866 | ; MIPS64EL-NEXT: daddiu $sp, $sp, 16 |
| 3867 | ; MIPS64EL-NEXT: jr $ra |
| 3868 | ; MIPS64EL-NEXT: nop |
| 3869 | ; |
| 3870 | ; MIPS32R5EL-LABEL: call_i8_2: |
| 3871 | ; MIPS32R5EL: # %bb.0: # %entry |
| 3872 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, -32 |
| 3873 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 32 |
| 3874 | ; MIPS32R5EL-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill |
| 3875 | ; MIPS32R5EL-NEXT: .cfi_offset 31, -4 |
| 3876 | ; MIPS32R5EL-NEXT: addiu $1, $zero, 1798 |
| 3877 | ; MIPS32R5EL-NEXT: sh $1, 20($sp) |
| 3878 | ; MIPS32R5EL-NEXT: addiu $1, $zero, 2060 |
| 3879 | ; MIPS32R5EL-NEXT: sh $1, 24($sp) |
| 3880 | ; MIPS32R5EL-NEXT: lhu $4, 20($sp) |
| 3881 | ; MIPS32R5EL-NEXT: lhu $5, 24($sp) |
| 3882 | ; MIPS32R5EL-NEXT: jal i8_2 |
| 3883 | ; MIPS32R5EL-NEXT: nop |
| 3884 | ; MIPS32R5EL-NEXT: sw $2, 16($sp) |
| 3885 | ; MIPS32R5EL-NEXT: lui $1, %hi(gv2i8) |
| 3886 | ; MIPS32R5EL-NEXT: lhu $2, 16($sp) |
| 3887 | ; MIPS32R5EL-NEXT: sh $2, %lo(gv2i8)($1) |
| 3888 | ; MIPS32R5EL-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload |
| 3889 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, 32 |
| 3890 | ; MIPS32R5EL-NEXT: jr $ra |
| 3891 | ; MIPS32R5EL-NEXT: nop |
| 3892 | ; |
| 3893 | ; MIPS64R5EL-LABEL: call_i8_2: |
| 3894 | ; MIPS64R5EL: # %bb.0: # %entry |
| 3895 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, -48 |
| 3896 | ; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 48 |
| 3897 | ; MIPS64R5EL-NEXT: sd $ra, 40($sp) # 8-byte Folded Spill |
| 3898 | ; MIPS64R5EL-NEXT: sd $gp, 32($sp) # 8-byte Folded Spill |
| 3899 | ; MIPS64R5EL-NEXT: .cfi_offset 31, -8 |
| 3900 | ; MIPS64R5EL-NEXT: .cfi_offset 28, -16 |
| 3901 | ; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_2))) |
| 3902 | ; MIPS64R5EL-NEXT: daddu $1, $1, $25 |
| 3903 | ; MIPS64R5EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_2))) |
| 3904 | ; MIPS64R5EL-NEXT: addiu $1, $zero, 1798 |
| 3905 | ; MIPS64R5EL-NEXT: sh $1, 24($sp) |
| 3906 | ; MIPS64R5EL-NEXT: addiu $1, $zero, 2060 |
| 3907 | ; MIPS64R5EL-NEXT: sh $1, 28($sp) |
| 3908 | ; MIPS64R5EL-NEXT: ld $25, %call16(i8_2)($gp) |
| 3909 | ; MIPS64R5EL-NEXT: lh $4, 24($sp) |
| 3910 | ; MIPS64R5EL-NEXT: lh $5, 28($sp) |
| 3911 | ; MIPS64R5EL-NEXT: jalr $25 |
| 3912 | ; MIPS64R5EL-NEXT: nop |
| 3913 | ; MIPS64R5EL-NEXT: sd $2, 16($sp) |
| 3914 | ; MIPS64R5EL-NEXT: ldi.b $w0, 0 |
| 3915 | ; MIPS64R5EL-NEXT: lbu $1, 16($sp) |
| 3916 | ; MIPS64R5EL-NEXT: insert.h $w0[0], $1 |
| 3917 | ; MIPS64R5EL-NEXT: lbu $1, 17($sp) |
| 3918 | ; MIPS64R5EL-NEXT: insert.h $w0[1], $1 |
| 3919 | ; MIPS64R5EL-NEXT: lbu $1, 18($sp) |
| 3920 | ; MIPS64R5EL-NEXT: insert.h $w0[2], $1 |
| 3921 | ; MIPS64R5EL-NEXT: lbu $1, 19($sp) |
| 3922 | ; MIPS64R5EL-NEXT: insert.h $w0[3], $1 |
| 3923 | ; MIPS64R5EL-NEXT: lbu $1, 20($sp) |
| 3924 | ; MIPS64R5EL-NEXT: insert.h $w0[4], $1 |
| 3925 | ; MIPS64R5EL-NEXT: lbu $1, 21($sp) |
| 3926 | ; MIPS64R5EL-NEXT: insert.h $w0[5], $1 |
| 3927 | ; MIPS64R5EL-NEXT: lbu $1, 23($sp) |
| 3928 | ; MIPS64R5EL-NEXT: lbu $2, 22($sp) |
| 3929 | ; MIPS64R5EL-NEXT: insert.h $w0[6], $2 |
| 3930 | ; MIPS64R5EL-NEXT: insert.h $w0[7], $1 |
| 3931 | ; MIPS64R5EL-NEXT: copy_s.h $1, $w0[0] |
| 3932 | ; MIPS64R5EL-NEXT: copy_s.h $2, $w0[1] |
| 3933 | ; MIPS64R5EL-NEXT: sw $2, 8($sp) |
| 3934 | ; MIPS64R5EL-NEXT: sw $1, 0($sp) |
| 3935 | ; MIPS64R5EL-NEXT: ld.d $w0, 0($sp) |
| 3936 | ; MIPS64R5EL-NEXT: copy_s.d $1, $w0[0] |
| 3937 | ; MIPS64R5EL-NEXT: copy_s.d $2, $w0[1] |
| 3938 | ; MIPS64R5EL-NEXT: ld $3, %got_disp(gv2i8)($gp) |
| 3939 | ; MIPS64R5EL-NEXT: sb $2, 1($3) |
| 3940 | ; MIPS64R5EL-NEXT: sb $1, 0($3) |
| 3941 | ; MIPS64R5EL-NEXT: ld $gp, 32($sp) # 8-byte Folded Reload |
| 3942 | ; MIPS64R5EL-NEXT: ld $ra, 40($sp) # 8-byte Folded Reload |
| 3943 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, 48 |
| 3944 | ; MIPS64R5EL-NEXT: jr $ra |
| 3945 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3946 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 3947 | %0 = call <2 x i8> @i8_2(<2 x i8> <i8 6, i8 7>, <2 x i8> <i8 12, i8 8>) |
| 3948 | store <2 x i8> %0, <2 x i8> * @gv2i8 |
| 3949 | ret void |
| 3950 | } |
| 3951 | |
| 3952 | define void @call_i8_4() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 3953 | ; MIPS32EB-LABEL: call_i8_4: |
| 3954 | ; MIPS32EB: # %bb.0: # %entry |
| 3955 | ; MIPS32EB-NEXT: addiu $sp, $sp, -24 |
| 3956 | ; MIPS32EB-NEXT: .cfi_def_cfa_offset 24 |
| 3957 | ; MIPS32EB-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 3958 | ; MIPS32EB-NEXT: .cfi_offset 31, -4 |
| 3959 | ; MIPS32EB-NEXT: lui $1, 1543 |
| 3960 | ; MIPS32EB-NEXT: ori $4, $1, 2314 |
| 3961 | ; MIPS32EB-NEXT: lui $1, 3080 |
| 3962 | ; MIPS32EB-NEXT: ori $5, $1, 2314 |
| 3963 | ; MIPS32EB-NEXT: jal i8_4 |
| 3964 | ; MIPS32EB-NEXT: nop |
| 3965 | ; MIPS32EB-NEXT: lui $1, %hi(gv4i8) |
| 3966 | ; MIPS32EB-NEXT: sw $2, %lo(gv4i8)($1) |
| 3967 | ; MIPS32EB-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 3968 | ; MIPS32EB-NEXT: addiu $sp, $sp, 24 |
| 3969 | ; MIPS32EB-NEXT: jr $ra |
| 3970 | ; MIPS32EB-NEXT: nop |
| 3971 | ; |
| 3972 | ; MIPS64EB-LABEL: call_i8_4: |
| 3973 | ; MIPS64EB: # %bb.0: # %entry |
| 3974 | ; MIPS64EB-NEXT: daddiu $sp, $sp, -16 |
| 3975 | ; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 |
| 3976 | ; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 3977 | ; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 3978 | ; MIPS64EB-NEXT: .cfi_offset 31, -8 |
| 3979 | ; MIPS64EB-NEXT: .cfi_offset 28, -16 |
| 3980 | ; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_4))) |
| 3981 | ; MIPS64EB-NEXT: daddu $1, $1, $25 |
| 3982 | ; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_4))) |
| 3983 | ; MIPS64EB-NEXT: lui $1, 1543 |
| 3984 | ; MIPS64EB-NEXT: ori $4, $1, 2314 |
| 3985 | ; MIPS64EB-NEXT: lui $1, 3080 |
| 3986 | ; MIPS64EB-NEXT: ori $5, $1, 2314 |
| 3987 | ; MIPS64EB-NEXT: ld $25, %call16(i8_4)($gp) |
| 3988 | ; MIPS64EB-NEXT: jalr $25 |
| 3989 | ; MIPS64EB-NEXT: nop |
| 3990 | ; MIPS64EB-NEXT: ld $1, %got_disp(gv4i8)($gp) |
| 3991 | ; MIPS64EB-NEXT: sw $2, 0($1) |
| 3992 | ; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 3993 | ; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 3994 | ; MIPS64EB-NEXT: daddiu $sp, $sp, 16 |
| 3995 | ; MIPS64EB-NEXT: jr $ra |
| 3996 | ; MIPS64EB-NEXT: nop |
| 3997 | ; |
| 3998 | ; MIPS32R5EB-LABEL: call_i8_4: |
| 3999 | ; MIPS32R5EB: # %bb.0: # %entry |
| 4000 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, -32 |
| 4001 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 32 |
| 4002 | ; MIPS32R5EB-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill |
| 4003 | ; MIPS32R5EB-NEXT: .cfi_offset 31, -4 |
| 4004 | ; MIPS32R5EB-NEXT: lui $1, 1543 |
| 4005 | ; MIPS32R5EB-NEXT: ori $4, $1, 2314 |
| 4006 | ; MIPS32R5EB-NEXT: lui $1, 3080 |
| 4007 | ; MIPS32R5EB-NEXT: ori $5, $1, 2314 |
| 4008 | ; MIPS32R5EB-NEXT: jal i8_4 |
| 4009 | ; MIPS32R5EB-NEXT: nop |
| 4010 | ; MIPS32R5EB-NEXT: lui $1, %hi(gv4i8) |
| 4011 | ; MIPS32R5EB-NEXT: sw $2, %lo(gv4i8)($1) |
| 4012 | ; MIPS32R5EB-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload |
| 4013 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, 32 |
| 4014 | ; MIPS32R5EB-NEXT: jr $ra |
| 4015 | ; MIPS32R5EB-NEXT: nop |
| 4016 | ; |
| 4017 | ; MIPS64R5EB-LABEL: call_i8_4: |
| 4018 | ; MIPS64R5EB: # %bb.0: # %entry |
| 4019 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, -32 |
| 4020 | ; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 32 |
| 4021 | ; MIPS64R5EB-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill |
| 4022 | ; MIPS64R5EB-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill |
| 4023 | ; MIPS64R5EB-NEXT: .cfi_offset 31, -8 |
| 4024 | ; MIPS64R5EB-NEXT: .cfi_offset 28, -16 |
| 4025 | ; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_4))) |
| 4026 | ; MIPS64R5EB-NEXT: daddu $1, $1, $25 |
| 4027 | ; MIPS64R5EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_4))) |
| 4028 | ; MIPS64R5EB-NEXT: lui $1, 1543 |
| 4029 | ; MIPS64R5EB-NEXT: ori $4, $1, 2314 |
| 4030 | ; MIPS64R5EB-NEXT: lui $1, 3080 |
| 4031 | ; MIPS64R5EB-NEXT: ori $5, $1, 2314 |
| 4032 | ; MIPS64R5EB-NEXT: ld $25, %call16(i8_4)($gp) |
| 4033 | ; MIPS64R5EB-NEXT: jalr $25 |
| 4034 | ; MIPS64R5EB-NEXT: nop |
| 4035 | ; MIPS64R5EB-NEXT: ld $1, %got_disp(gv4i8)($gp) |
| 4036 | ; MIPS64R5EB-NEXT: sw $2, 0($1) |
| 4037 | ; MIPS64R5EB-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload |
| 4038 | ; MIPS64R5EB-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload |
| 4039 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, 32 |
| 4040 | ; MIPS64R5EB-NEXT: jr $ra |
| 4041 | ; MIPS64R5EB-NEXT: nop |
| 4042 | ; |
| 4043 | ; MIPS32EL-LABEL: call_i8_4: |
| 4044 | ; MIPS32EL: # %bb.0: # %entry |
| 4045 | ; MIPS32EL-NEXT: addiu $sp, $sp, -24 |
| 4046 | ; MIPS32EL-NEXT: .cfi_def_cfa_offset 24 |
| 4047 | ; MIPS32EL-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 4048 | ; MIPS32EL-NEXT: .cfi_offset 31, -4 |
| 4049 | ; MIPS32EL-NEXT: lui $1, 2569 |
| 4050 | ; MIPS32EL-NEXT: ori $4, $1, 1798 |
| 4051 | ; MIPS32EL-NEXT: ori $5, $1, 2060 |
| 4052 | ; MIPS32EL-NEXT: jal i8_4 |
| 4053 | ; MIPS32EL-NEXT: nop |
| 4054 | ; MIPS32EL-NEXT: lui $1, %hi(gv4i8) |
| 4055 | ; MIPS32EL-NEXT: sw $2, %lo(gv4i8)($1) |
| 4056 | ; MIPS32EL-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 4057 | ; MIPS32EL-NEXT: addiu $sp, $sp, 24 |
| 4058 | ; MIPS32EL-NEXT: jr $ra |
| 4059 | ; MIPS32EL-NEXT: nop |
| 4060 | ; |
| 4061 | ; MIPS64EL-LABEL: call_i8_4: |
| 4062 | ; MIPS64EL: # %bb.0: # %entry |
| 4063 | ; MIPS64EL-NEXT: daddiu $sp, $sp, -16 |
| 4064 | ; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 |
| 4065 | ; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 4066 | ; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 4067 | ; MIPS64EL-NEXT: .cfi_offset 31, -8 |
| 4068 | ; MIPS64EL-NEXT: .cfi_offset 28, -16 |
| 4069 | ; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_4))) |
| 4070 | ; MIPS64EL-NEXT: daddu $1, $1, $25 |
| 4071 | ; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_4))) |
| 4072 | ; MIPS64EL-NEXT: lui $1, 2569 |
| 4073 | ; MIPS64EL-NEXT: ori $4, $1, 1798 |
| 4074 | ; MIPS64EL-NEXT: ori $5, $1, 2060 |
| 4075 | ; MIPS64EL-NEXT: ld $25, %call16(i8_4)($gp) |
| 4076 | ; MIPS64EL-NEXT: jalr $25 |
| 4077 | ; MIPS64EL-NEXT: nop |
| 4078 | ; MIPS64EL-NEXT: ld $1, %got_disp(gv4i8)($gp) |
| 4079 | ; MIPS64EL-NEXT: sw $2, 0($1) |
| 4080 | ; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 4081 | ; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 4082 | ; MIPS64EL-NEXT: daddiu $sp, $sp, 16 |
| 4083 | ; MIPS64EL-NEXT: jr $ra |
| 4084 | ; MIPS64EL-NEXT: nop |
| 4085 | ; |
| 4086 | ; MIPS32R5EL-LABEL: call_i8_4: |
| 4087 | ; MIPS32R5EL: # %bb.0: # %entry |
| 4088 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, -32 |
| 4089 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 32 |
| 4090 | ; MIPS32R5EL-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill |
| 4091 | ; MIPS32R5EL-NEXT: .cfi_offset 31, -4 |
| 4092 | ; MIPS32R5EL-NEXT: lui $1, 2569 |
| 4093 | ; MIPS32R5EL-NEXT: ori $4, $1, 1798 |
| 4094 | ; MIPS32R5EL-NEXT: ori $5, $1, 2060 |
| 4095 | ; MIPS32R5EL-NEXT: jal i8_4 |
| 4096 | ; MIPS32R5EL-NEXT: nop |
| 4097 | ; MIPS32R5EL-NEXT: lui $1, %hi(gv4i8) |
| 4098 | ; MIPS32R5EL-NEXT: sw $2, %lo(gv4i8)($1) |
| 4099 | ; MIPS32R5EL-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload |
| 4100 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, 32 |
| 4101 | ; MIPS32R5EL-NEXT: jr $ra |
| 4102 | ; MIPS32R5EL-NEXT: nop |
| 4103 | ; |
| 4104 | ; MIPS64R5EL-LABEL: call_i8_4: |
| 4105 | ; MIPS64R5EL: # %bb.0: # %entry |
| 4106 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, -32 |
| 4107 | ; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 32 |
| 4108 | ; MIPS64R5EL-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill |
| 4109 | ; MIPS64R5EL-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill |
| 4110 | ; MIPS64R5EL-NEXT: .cfi_offset 31, -8 |
| 4111 | ; MIPS64R5EL-NEXT: .cfi_offset 28, -16 |
| 4112 | ; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_4))) |
| 4113 | ; MIPS64R5EL-NEXT: daddu $1, $1, $25 |
| 4114 | ; MIPS64R5EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_4))) |
| 4115 | ; MIPS64R5EL-NEXT: lui $1, 2569 |
| 4116 | ; MIPS64R5EL-NEXT: ori $4, $1, 1798 |
| 4117 | ; MIPS64R5EL-NEXT: ori $5, $1, 2060 |
| 4118 | ; MIPS64R5EL-NEXT: ld $25, %call16(i8_4)($gp) |
| 4119 | ; MIPS64R5EL-NEXT: jalr $25 |
| 4120 | ; MIPS64R5EL-NEXT: nop |
| 4121 | ; MIPS64R5EL-NEXT: ld $1, %got_disp(gv4i8)($gp) |
| 4122 | ; MIPS64R5EL-NEXT: sw $2, 0($1) |
| 4123 | ; MIPS64R5EL-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload |
| 4124 | ; MIPS64R5EL-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload |
| 4125 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, 32 |
| 4126 | ; MIPS64R5EL-NEXT: jr $ra |
| 4127 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 4128 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 4129 | %0 = call <4 x i8> @i8_4(<4 x i8> <i8 6, i8 7, i8 9, i8 10>, <4 x i8> <i8 12, i8 8, i8 9, i8 10>) |
| 4130 | store <4 x i8> %0, <4 x i8> * @gv4i8 |
| 4131 | ret void |
| 4132 | } |
| 4133 | |
| 4134 | define void @call_i8_8() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 4135 | ; MIPS32EB-LABEL: call_i8_8: |
| 4136 | ; MIPS32EB: # %bb.0: # %entry |
| 4137 | ; MIPS32EB-NEXT: addiu $sp, $sp, -24 |
| 4138 | ; MIPS32EB-NEXT: .cfi_def_cfa_offset 24 |
| 4139 | ; MIPS32EB-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 4140 | ; MIPS32EB-NEXT: .cfi_offset 31, -4 |
| 4141 | ; MIPS32EB-NEXT: lui $1, 3080 |
| 4142 | ; MIPS32EB-NEXT: ori $6, $1, 2314 |
| 4143 | ; MIPS32EB-NEXT: lui $1, 1543 |
| 4144 | ; MIPS32EB-NEXT: ori $4, $1, 2314 |
| 4145 | ; MIPS32EB-NEXT: move $5, $4 |
| 4146 | ; MIPS32EB-NEXT: move $7, $4 |
| 4147 | ; MIPS32EB-NEXT: jal i8_8 |
| 4148 | ; MIPS32EB-NEXT: nop |
| 4149 | ; MIPS32EB-NEXT: lui $1, %hi(gv8i8) |
| 4150 | ; MIPS32EB-NEXT: addiu $4, $1, %lo(gv8i8) |
| 4151 | ; MIPS32EB-NEXT: sw $3, 4($4) |
| 4152 | ; MIPS32EB-NEXT: sw $2, %lo(gv8i8)($1) |
| 4153 | ; MIPS32EB-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 4154 | ; MIPS32EB-NEXT: addiu $sp, $sp, 24 |
| 4155 | ; MIPS32EB-NEXT: jr $ra |
| 4156 | ; MIPS32EB-NEXT: nop |
| 4157 | ; |
| 4158 | ; MIPS64EB-LABEL: call_i8_8: |
| 4159 | ; MIPS64EB: # %bb.0: # %entry |
| 4160 | ; MIPS64EB-NEXT: daddiu $sp, $sp, -16 |
| 4161 | ; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 |
| 4162 | ; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 4163 | ; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 4164 | ; MIPS64EB-NEXT: .cfi_offset 31, -8 |
| 4165 | ; MIPS64EB-NEXT: .cfi_offset 28, -16 |
| 4166 | ; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_8))) |
| 4167 | ; MIPS64EB-NEXT: daddu $1, $1, $25 |
| 4168 | ; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_8))) |
| 4169 | ; MIPS64EB-NEXT: lui $1, 772 |
| 4170 | ; MIPS64EB-NEXT: daddiu $1, $1, -31611 |
| 4171 | ; MIPS64EB-NEXT: dsll $1, $1, 17 |
| 4172 | ; MIPS64EB-NEXT: daddiu $1, $1, 1543 |
| 4173 | ; MIPS64EB-NEXT: dsll $1, $1, 16 |
| 4174 | ; MIPS64EB-NEXT: daddiu $4, $1, 2314 |
| 4175 | ; MIPS64EB-NEXT: lui $1, 1540 |
| 4176 | ; MIPS64EB-NEXT: daddiu $1, $1, 1157 |
| 4177 | ; MIPS64EB-NEXT: dsll $1, $1, 17 |
| 4178 | ; MIPS64EB-NEXT: daddiu $1, $1, 1543 |
| 4179 | ; MIPS64EB-NEXT: dsll $1, $1, 16 |
| 4180 | ; MIPS64EB-NEXT: daddiu $5, $1, 2314 |
| 4181 | ; MIPS64EB-NEXT: ld $25, %call16(i8_8)($gp) |
| 4182 | ; MIPS64EB-NEXT: jalr $25 |
| 4183 | ; MIPS64EB-NEXT: nop |
| 4184 | ; MIPS64EB-NEXT: ld $1, %got_disp(gv8i8)($gp) |
| 4185 | ; MIPS64EB-NEXT: sd $2, 0($1) |
| 4186 | ; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 4187 | ; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 4188 | ; MIPS64EB-NEXT: daddiu $sp, $sp, 16 |
| 4189 | ; MIPS64EB-NEXT: jr $ra |
| 4190 | ; MIPS64EB-NEXT: nop |
| 4191 | ; |
| 4192 | ; MIPS32R5EB-LABEL: call_i8_8: |
| 4193 | ; MIPS32R5EB: # %bb.0: # %entry |
| 4194 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, -24 |
| 4195 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 24 |
| 4196 | ; MIPS32R5EB-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 4197 | ; MIPS32R5EB-NEXT: .cfi_offset 31, -4 |
| 4198 | ; MIPS32R5EB-NEXT: lui $1, 3080 |
| 4199 | ; MIPS32R5EB-NEXT: ori $6, $1, 2314 |
| 4200 | ; MIPS32R5EB-NEXT: lui $1, 1543 |
| 4201 | ; MIPS32R5EB-NEXT: ori $4, $1, 2314 |
| 4202 | ; MIPS32R5EB-NEXT: move $5, $4 |
| 4203 | ; MIPS32R5EB-NEXT: move $7, $4 |
| 4204 | ; MIPS32R5EB-NEXT: jal i8_8 |
| 4205 | ; MIPS32R5EB-NEXT: nop |
| 4206 | ; MIPS32R5EB-NEXT: lui $1, %hi(gv8i8) |
| 4207 | ; MIPS32R5EB-NEXT: addiu $4, $1, %lo(gv8i8) |
| 4208 | ; MIPS32R5EB-NEXT: sw $3, 4($4) |
| 4209 | ; MIPS32R5EB-NEXT: sw $2, %lo(gv8i8)($1) |
| 4210 | ; MIPS32R5EB-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 4211 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, 24 |
| 4212 | ; MIPS32R5EB-NEXT: jr $ra |
| 4213 | ; MIPS32R5EB-NEXT: nop |
| 4214 | ; |
| 4215 | ; MIPS64R5EB-LABEL: call_i8_8: |
| 4216 | ; MIPS64R5EB: # %bb.0: # %entry |
| 4217 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, -32 |
| 4218 | ; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 32 |
| 4219 | ; MIPS64R5EB-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill |
| 4220 | ; MIPS64R5EB-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill |
| 4221 | ; MIPS64R5EB-NEXT: .cfi_offset 31, -8 |
| 4222 | ; MIPS64R5EB-NEXT: .cfi_offset 28, -16 |
| 4223 | ; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_8))) |
| 4224 | ; MIPS64R5EB-NEXT: daddu $1, $1, $25 |
| 4225 | ; MIPS64R5EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_8))) |
| 4226 | ; MIPS64R5EB-NEXT: lui $1, 772 |
| 4227 | ; MIPS64R5EB-NEXT: daddiu $1, $1, -31611 |
| 4228 | ; MIPS64R5EB-NEXT: dsll $1, $1, 17 |
| 4229 | ; MIPS64R5EB-NEXT: daddiu $1, $1, 1543 |
| 4230 | ; MIPS64R5EB-NEXT: dsll $1, $1, 16 |
| 4231 | ; MIPS64R5EB-NEXT: daddiu $4, $1, 2314 |
| 4232 | ; MIPS64R5EB-NEXT: lui $1, 1540 |
| 4233 | ; MIPS64R5EB-NEXT: daddiu $1, $1, 1157 |
| 4234 | ; MIPS64R5EB-NEXT: dsll $1, $1, 17 |
| 4235 | ; MIPS64R5EB-NEXT: daddiu $1, $1, 1543 |
| 4236 | ; MIPS64R5EB-NEXT: dsll $1, $1, 16 |
| 4237 | ; MIPS64R5EB-NEXT: daddiu $5, $1, 2314 |
| 4238 | ; MIPS64R5EB-NEXT: ld $25, %call16(i8_8)($gp) |
| 4239 | ; MIPS64R5EB-NEXT: jalr $25 |
| 4240 | ; MIPS64R5EB-NEXT: nop |
| 4241 | ; MIPS64R5EB-NEXT: ld $1, %got_disp(gv8i8)($gp) |
| 4242 | ; MIPS64R5EB-NEXT: sd $2, 0($1) |
| 4243 | ; MIPS64R5EB-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload |
| 4244 | ; MIPS64R5EB-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload |
| 4245 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, 32 |
| 4246 | ; MIPS64R5EB-NEXT: jr $ra |
| 4247 | ; MIPS64R5EB-NEXT: nop |
| 4248 | ; |
| 4249 | ; MIPS32EL-LABEL: call_i8_8: |
| 4250 | ; MIPS32EL: # %bb.0: # %entry |
| 4251 | ; MIPS32EL-NEXT: addiu $sp, $sp, -24 |
| 4252 | ; MIPS32EL-NEXT: .cfi_def_cfa_offset 24 |
| 4253 | ; MIPS32EL-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 4254 | ; MIPS32EL-NEXT: .cfi_offset 31, -4 |
| 4255 | ; MIPS32EL-NEXT: lui $1, 2569 |
| 4256 | ; MIPS32EL-NEXT: ori $6, $1, 2060 |
| 4257 | ; MIPS32EL-NEXT: ori $4, $1, 1798 |
| 4258 | ; MIPS32EL-NEXT: move $5, $4 |
| 4259 | ; MIPS32EL-NEXT: move $7, $4 |
| 4260 | ; MIPS32EL-NEXT: jal i8_8 |
| 4261 | ; MIPS32EL-NEXT: nop |
| 4262 | ; MIPS32EL-NEXT: lui $1, %hi(gv8i8) |
| 4263 | ; MIPS32EL-NEXT: addiu $4, $1, %lo(gv8i8) |
| 4264 | ; MIPS32EL-NEXT: sw $3, 4($4) |
| 4265 | ; MIPS32EL-NEXT: sw $2, %lo(gv8i8)($1) |
| 4266 | ; MIPS32EL-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 4267 | ; MIPS32EL-NEXT: addiu $sp, $sp, 24 |
| 4268 | ; MIPS32EL-NEXT: jr $ra |
| 4269 | ; MIPS32EL-NEXT: nop |
| 4270 | ; |
| 4271 | ; MIPS64EL-LABEL: call_i8_8: |
| 4272 | ; MIPS64EL: # %bb.0: # %entry |
| 4273 | ; MIPS64EL-NEXT: daddiu $sp, $sp, -16 |
| 4274 | ; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 |
| 4275 | ; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 4276 | ; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 4277 | ; MIPS64EL-NEXT: .cfi_offset 31, -8 |
| 4278 | ; MIPS64EL-NEXT: .cfi_offset 28, -16 |
| 4279 | ; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_8))) |
| 4280 | ; MIPS64EL-NEXT: daddu $1, $1, $25 |
| 4281 | ; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_8))) |
| 4282 | ; MIPS64EL-NEXT: lui $1, 1285 |
| 4283 | ; MIPS64EL-NEXT: daddiu $1, $1, -31869 |
| 4284 | ; MIPS64EL-NEXT: dsll $1, $1, 17 |
| 4285 | ; MIPS64EL-NEXT: daddiu $1, $1, 2569 |
| 4286 | ; MIPS64EL-NEXT: dsll $1, $1, 16 |
| 4287 | ; MIPS64EL-NEXT: daddiu $4, $1, 1798 |
| 4288 | ; MIPS64EL-NEXT: daddiu $5, $1, 2060 |
| 4289 | ; MIPS64EL-NEXT: ld $25, %call16(i8_8)($gp) |
| 4290 | ; MIPS64EL-NEXT: jalr $25 |
| 4291 | ; MIPS64EL-NEXT: nop |
| 4292 | ; MIPS64EL-NEXT: ld $1, %got_disp(gv8i8)($gp) |
| 4293 | ; MIPS64EL-NEXT: sd $2, 0($1) |
| 4294 | ; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 4295 | ; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 4296 | ; MIPS64EL-NEXT: daddiu $sp, $sp, 16 |
| 4297 | ; MIPS64EL-NEXT: jr $ra |
| 4298 | ; MIPS64EL-NEXT: nop |
| 4299 | ; |
| 4300 | ; MIPS32R5EL-LABEL: call_i8_8: |
| 4301 | ; MIPS32R5EL: # %bb.0: # %entry |
| 4302 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, -24 |
| 4303 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 24 |
| 4304 | ; MIPS32R5EL-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 4305 | ; MIPS32R5EL-NEXT: .cfi_offset 31, -4 |
| 4306 | ; MIPS32R5EL-NEXT: lui $1, 2569 |
| 4307 | ; MIPS32R5EL-NEXT: ori $6, $1, 2060 |
| 4308 | ; MIPS32R5EL-NEXT: ori $4, $1, 1798 |
| 4309 | ; MIPS32R5EL-NEXT: move $5, $4 |
| 4310 | ; MIPS32R5EL-NEXT: move $7, $4 |
| 4311 | ; MIPS32R5EL-NEXT: jal i8_8 |
| 4312 | ; MIPS32R5EL-NEXT: nop |
| 4313 | ; MIPS32R5EL-NEXT: lui $1, %hi(gv8i8) |
| 4314 | ; MIPS32R5EL-NEXT: addiu $4, $1, %lo(gv8i8) |
| 4315 | ; MIPS32R5EL-NEXT: sw $3, 4($4) |
| 4316 | ; MIPS32R5EL-NEXT: sw $2, %lo(gv8i8)($1) |
| 4317 | ; MIPS32R5EL-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 4318 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, 24 |
| 4319 | ; MIPS32R5EL-NEXT: jr $ra |
| 4320 | ; MIPS32R5EL-NEXT: nop |
| 4321 | ; |
| 4322 | ; MIPS64R5EL-LABEL: call_i8_8: |
| 4323 | ; MIPS64R5EL: # %bb.0: # %entry |
| 4324 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, -32 |
| 4325 | ; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 32 |
| 4326 | ; MIPS64R5EL-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill |
| 4327 | ; MIPS64R5EL-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill |
| 4328 | ; MIPS64R5EL-NEXT: .cfi_offset 31, -8 |
| 4329 | ; MIPS64R5EL-NEXT: .cfi_offset 28, -16 |
| 4330 | ; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_8))) |
| 4331 | ; MIPS64R5EL-NEXT: daddu $1, $1, $25 |
| 4332 | ; MIPS64R5EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_8))) |
| 4333 | ; MIPS64R5EL-NEXT: lui $1, 1285 |
| 4334 | ; MIPS64R5EL-NEXT: daddiu $1, $1, -31869 |
| 4335 | ; MIPS64R5EL-NEXT: dsll $1, $1, 17 |
| 4336 | ; MIPS64R5EL-NEXT: daddiu $1, $1, 2569 |
| 4337 | ; MIPS64R5EL-NEXT: dsll $1, $1, 16 |
| 4338 | ; MIPS64R5EL-NEXT: daddiu $4, $1, 1798 |
| 4339 | ; MIPS64R5EL-NEXT: daddiu $5, $1, 2060 |
| 4340 | ; MIPS64R5EL-NEXT: ld $25, %call16(i8_8)($gp) |
| 4341 | ; MIPS64R5EL-NEXT: jalr $25 |
| 4342 | ; MIPS64R5EL-NEXT: nop |
| 4343 | ; MIPS64R5EL-NEXT: ld $1, %got_disp(gv8i8)($gp) |
| 4344 | ; MIPS64R5EL-NEXT: sd $2, 0($1) |
| 4345 | ; MIPS64R5EL-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload |
| 4346 | ; MIPS64R5EL-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload |
| 4347 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, 32 |
| 4348 | ; MIPS64R5EL-NEXT: jr $ra |
| 4349 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 4350 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 4351 | %0 = call <8 x i8> @i8_8(<8 x i8> <i8 6, i8 7, i8 9, i8 10, i8 6, i8 7, i8 9, i8 10>, <8 x i8> <i8 12, i8 8, i8 9, i8 10, i8 6, i8 7, i8 9, i8 10>) |
| 4352 | store <8 x i8> %0, <8 x i8> * @gv8i8 |
| 4353 | ret void |
| 4354 | } |
| 4355 | |
| 4356 | define void @calli8_16() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 4357 | ; MIPS32EB-LABEL: calli8_16: |
| 4358 | ; MIPS32EB: # %bb.0: # %entry |
| 4359 | ; MIPS32EB-NEXT: addiu $sp, $sp, -40 |
| 4360 | ; MIPS32EB-NEXT: .cfi_def_cfa_offset 40 |
| 4361 | ; MIPS32EB-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill |
| 4362 | ; MIPS32EB-NEXT: .cfi_offset 31, -4 |
| 4363 | ; MIPS32EB-NEXT: lui $1, 3080 |
| 4364 | ; MIPS32EB-NEXT: ori $1, $1, 2314 |
| 4365 | ; MIPS32EB-NEXT: lui $2, 1801 |
| 4366 | ; MIPS32EB-NEXT: sw $1, 28($sp) |
| 4367 | ; MIPS32EB-NEXT: ori $1, $2, 1801 |
| 4368 | ; MIPS32EB-NEXT: sw $1, 24($sp) |
| 4369 | ; MIPS32EB-NEXT: sw $1, 20($sp) |
| 4370 | ; MIPS32EB-NEXT: sw $1, 16($sp) |
| 4371 | ; MIPS32EB-NEXT: lui $1, 1543 |
| 4372 | ; MIPS32EB-NEXT: ori $4, $1, 1543 |
| 4373 | ; MIPS32EB-NEXT: ori $7, $1, 2314 |
| 4374 | ; MIPS32EB-NEXT: move $5, $4 |
| 4375 | ; MIPS32EB-NEXT: move $6, $4 |
| 4376 | ; MIPS32EB-NEXT: jal i8_16 |
| 4377 | ; MIPS32EB-NEXT: nop |
| 4378 | ; MIPS32EB-NEXT: lui $1, %hi(gv16i8) |
| 4379 | ; MIPS32EB-NEXT: addiu $6, $1, %lo(gv16i8) |
| 4380 | ; MIPS32EB-NEXT: sw $5, 12($6) |
| 4381 | ; MIPS32EB-NEXT: sw $4, 8($6) |
| 4382 | ; MIPS32EB-NEXT: sw $3, 4($6) |
| 4383 | ; MIPS32EB-NEXT: sw $2, %lo(gv16i8)($1) |
| 4384 | ; MIPS32EB-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload |
| 4385 | ; MIPS32EB-NEXT: addiu $sp, $sp, 40 |
| 4386 | ; MIPS32EB-NEXT: jr $ra |
| 4387 | ; MIPS32EB-NEXT: nop |
| 4388 | ; |
| 4389 | ; MIPS64EB-LABEL: calli8_16: |
| 4390 | ; MIPS64EB: # %bb.0: # %entry |
| 4391 | ; MIPS64EB-NEXT: daddiu $sp, $sp, -16 |
| 4392 | ; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 |
| 4393 | ; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 4394 | ; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 4395 | ; MIPS64EB-NEXT: .cfi_offset 31, -8 |
| 4396 | ; MIPS64EB-NEXT: .cfi_offset 28, -16 |
| 4397 | ; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli8_16))) |
| 4398 | ; MIPS64EB-NEXT: daddu $1, $1, $25 |
| 4399 | ; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli8_16))) |
| 4400 | ; MIPS64EB-NEXT: lui $1, 1801 |
| 4401 | ; MIPS64EB-NEXT: daddiu $1, $1, 1801 |
| 4402 | ; MIPS64EB-NEXT: dsll $1, $1, 16 |
| 4403 | ; MIPS64EB-NEXT: daddiu $1, $1, 1801 |
| 4404 | ; MIPS64EB-NEXT: lui $2, 1543 |
| 4405 | ; MIPS64EB-NEXT: dsll $1, $1, 16 |
| 4406 | ; MIPS64EB-NEXT: daddiu $2, $2, 1543 |
| 4407 | ; MIPS64EB-NEXT: dsll $2, $2, 16 |
| 4408 | ; MIPS64EB-NEXT: daddiu $2, $2, 1543 |
| 4409 | ; MIPS64EB-NEXT: dsll $2, $2, 16 |
| 4410 | ; MIPS64EB-NEXT: daddiu $4, $2, 1543 |
| 4411 | ; MIPS64EB-NEXT: daddiu $5, $2, 2314 |
| 4412 | ; MIPS64EB-NEXT: daddiu $6, $1, 1801 |
| 4413 | ; MIPS64EB-NEXT: lui $1, 225 |
| 4414 | ; MIPS64EB-NEXT: daddiu $1, $1, 8417 |
| 4415 | ; MIPS64EB-NEXT: dsll $1, $1, 16 |
| 4416 | ; MIPS64EB-NEXT: daddiu $1, $1, 8577 |
| 4417 | ; MIPS64EB-NEXT: dsll $1, $1, 19 |
| 4418 | ; MIPS64EB-NEXT: daddiu $7, $1, 2314 |
| 4419 | ; MIPS64EB-NEXT: ld $25, %call16(i8_16)($gp) |
| 4420 | ; MIPS64EB-NEXT: jalr $25 |
| 4421 | ; MIPS64EB-NEXT: nop |
| 4422 | ; MIPS64EB-NEXT: ld $1, %got_disp(gv16i8)($gp) |
| 4423 | ; MIPS64EB-NEXT: sd $3, 8($1) |
| 4424 | ; MIPS64EB-NEXT: sd $2, 0($1) |
| 4425 | ; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 4426 | ; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 4427 | ; MIPS64EB-NEXT: daddiu $sp, $sp, 16 |
| 4428 | ; MIPS64EB-NEXT: jr $ra |
| 4429 | ; MIPS64EB-NEXT: nop |
| 4430 | ; |
| 4431 | ; MIPS32R5-LABEL: calli8_16: |
| 4432 | ; MIPS32R5: # %bb.0: # %entry |
| 4433 | ; MIPS32R5-NEXT: addiu $sp, $sp, -40 |
| 4434 | ; MIPS32R5-NEXT: .cfi_def_cfa_offset 40 |
| 4435 | ; MIPS32R5-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill |
| 4436 | ; MIPS32R5-NEXT: .cfi_offset 31, -4 |
| 4437 | ; MIPS32R5-NEXT: lui $1, %hi($CPI30_0) |
| 4438 | ; MIPS32R5-NEXT: addiu $1, $1, %lo($CPI30_0) |
| 4439 | ; MIPS32R5-NEXT: ld.w $w0, 0($1) |
| 4440 | ; MIPS32R5-NEXT: copy_s.w $4, $w0[0] |
| 4441 | ; MIPS32R5-NEXT: copy_s.w $5, $w0[1] |
| 4442 | ; MIPS32R5-NEXT: copy_s.w $6, $w0[2] |
| 4443 | ; MIPS32R5-NEXT: copy_s.w $7, $w0[3] |
| 4444 | ; MIPS32R5-NEXT: lui $1, %hi($CPI30_1) |
| 4445 | ; MIPS32R5-NEXT: addiu $1, $1, %lo($CPI30_1) |
| 4446 | ; MIPS32R5-NEXT: ld.w $w0, 0($1) |
| 4447 | ; MIPS32R5-NEXT: copy_s.w $1, $w0[0] |
| 4448 | ; MIPS32R5-NEXT: copy_s.w $2, $w0[1] |
| 4449 | ; MIPS32R5-NEXT: copy_s.w $3, $w0[2] |
| 4450 | ; MIPS32R5-NEXT: copy_s.w $8, $w0[3] |
| 4451 | ; MIPS32R5-NEXT: sw $8, 28($sp) |
| 4452 | ; MIPS32R5-NEXT: sw $3, 24($sp) |
| 4453 | ; MIPS32R5-NEXT: sw $2, 20($sp) |
| 4454 | ; MIPS32R5-NEXT: sw $1, 16($sp) |
| 4455 | ; MIPS32R5-NEXT: jal i8_16 |
| 4456 | ; MIPS32R5-NEXT: nop |
| 4457 | ; MIPS32R5-NEXT: ldi.b $w0, 0 |
| 4458 | ; MIPS32R5-NEXT: insert.w $w0[0], $2 |
| 4459 | ; MIPS32R5-NEXT: lui $1, %hi(gv16i8) |
| 4460 | ; MIPS32R5-NEXT: insert.w $w0[1], $3 |
| 4461 | ; MIPS32R5-NEXT: addiu $1, $1, %lo(gv16i8) |
| 4462 | ; MIPS32R5-NEXT: insert.w $w0[2], $4 |
| 4463 | ; MIPS32R5-NEXT: insert.w $w0[3], $5 |
| 4464 | ; MIPS32R5-NEXT: st.w $w0, 0($1) |
| 4465 | ; MIPS32R5-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload |
| 4466 | ; MIPS32R5-NEXT: addiu $sp, $sp, 40 |
| 4467 | ; MIPS32R5-NEXT: jr $ra |
| 4468 | ; MIPS32R5-NEXT: nop |
| 4469 | ; |
| 4470 | ; MIPS64R5-LABEL: calli8_16: |
| 4471 | ; MIPS64R5: # %bb.0: # %entry |
| 4472 | ; MIPS64R5-NEXT: daddiu $sp, $sp, -16 |
| 4473 | ; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 |
| 4474 | ; MIPS64R5-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 4475 | ; MIPS64R5-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 4476 | ; MIPS64R5-NEXT: .cfi_offset 31, -8 |
| 4477 | ; MIPS64R5-NEXT: .cfi_offset 28, -16 |
| 4478 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(calli8_16))) |
| 4479 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 4480 | ; MIPS64R5-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli8_16))) |
| 4481 | ; MIPS64R5-NEXT: ld $1, %got_page(.LCPI30_0)($gp) |
| 4482 | ; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI30_0) |
| 4483 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 4484 | ; MIPS64R5-NEXT: copy_s.d $4, $w0[0] |
| 4485 | ; MIPS64R5-NEXT: copy_s.d $5, $w0[1] |
| 4486 | ; MIPS64R5-NEXT: ld $1, %got_page(.LCPI30_1)($gp) |
| 4487 | ; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI30_1) |
| 4488 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 4489 | ; MIPS64R5-NEXT: copy_s.d $6, $w0[0] |
| 4490 | ; MIPS64R5-NEXT: copy_s.d $7, $w0[1] |
| 4491 | ; MIPS64R5-NEXT: ld $25, %call16(i8_16)($gp) |
| 4492 | ; MIPS64R5-NEXT: jalr $25 |
| 4493 | ; MIPS64R5-NEXT: nop |
| 4494 | ; MIPS64R5-NEXT: ldi.b $w0, 0 |
| 4495 | ; MIPS64R5-NEXT: insert.d $w0[0], $2 |
| 4496 | ; MIPS64R5-NEXT: insert.d $w0[1], $3 |
| 4497 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv16i8)($gp) |
| 4498 | ; MIPS64R5-NEXT: st.d $w0, 0($1) |
| 4499 | ; MIPS64R5-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 4500 | ; MIPS64R5-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 4501 | ; MIPS64R5-NEXT: daddiu $sp, $sp, 16 |
| 4502 | ; MIPS64R5-NEXT: jr $ra |
| 4503 | ; MIPS64R5-NEXT: nop |
| 4504 | ; |
| 4505 | ; MIPS32EL-LABEL: calli8_16: |
| 4506 | ; MIPS32EL: # %bb.0: # %entry |
| 4507 | ; MIPS32EL-NEXT: addiu $sp, $sp, -40 |
| 4508 | ; MIPS32EL-NEXT: .cfi_def_cfa_offset 40 |
| 4509 | ; MIPS32EL-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill |
| 4510 | ; MIPS32EL-NEXT: .cfi_offset 31, -4 |
| 4511 | ; MIPS32EL-NEXT: lui $1, 2569 |
| 4512 | ; MIPS32EL-NEXT: ori $2, $1, 2060 |
| 4513 | ; MIPS32EL-NEXT: lui $3, 2311 |
| 4514 | ; MIPS32EL-NEXT: sw $2, 28($sp) |
| 4515 | ; MIPS32EL-NEXT: ori $2, $3, 2311 |
| 4516 | ; MIPS32EL-NEXT: sw $2, 24($sp) |
| 4517 | ; MIPS32EL-NEXT: sw $2, 20($sp) |
| 4518 | ; MIPS32EL-NEXT: sw $2, 16($sp) |
| 4519 | ; MIPS32EL-NEXT: lui $2, 1798 |
| 4520 | ; MIPS32EL-NEXT: ori $4, $2, 1798 |
| 4521 | ; MIPS32EL-NEXT: ori $7, $1, 1798 |
| 4522 | ; MIPS32EL-NEXT: move $5, $4 |
| 4523 | ; MIPS32EL-NEXT: move $6, $4 |
| 4524 | ; MIPS32EL-NEXT: jal i8_16 |
| 4525 | ; MIPS32EL-NEXT: nop |
| 4526 | ; MIPS32EL-NEXT: lui $1, %hi(gv16i8) |
| 4527 | ; MIPS32EL-NEXT: addiu $6, $1, %lo(gv16i8) |
| 4528 | ; MIPS32EL-NEXT: sw $5, 12($6) |
| 4529 | ; MIPS32EL-NEXT: sw $4, 8($6) |
| 4530 | ; MIPS32EL-NEXT: sw $3, 4($6) |
| 4531 | ; MIPS32EL-NEXT: sw $2, %lo(gv16i8)($1) |
| 4532 | ; MIPS32EL-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload |
| 4533 | ; MIPS32EL-NEXT: addiu $sp, $sp, 40 |
| 4534 | ; MIPS32EL-NEXT: jr $ra |
| 4535 | ; MIPS32EL-NEXT: nop |
| 4536 | ; |
| 4537 | ; MIPS64EL-LABEL: calli8_16: |
| 4538 | ; MIPS64EL: # %bb.0: # %entry |
| 4539 | ; MIPS64EL-NEXT: daddiu $sp, $sp, -16 |
| 4540 | ; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 |
| 4541 | ; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 4542 | ; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 4543 | ; MIPS64EL-NEXT: .cfi_offset 31, -8 |
| 4544 | ; MIPS64EL-NEXT: .cfi_offset 28, -16 |
| 4545 | ; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli8_16))) |
| 4546 | ; MIPS64EL-NEXT: daddu $1, $1, $25 |
| 4547 | ; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli8_16))) |
| 4548 | ; MIPS64EL-NEXT: lui $1, 1285 |
| 4549 | ; MIPS64EL-NEXT: daddiu $1, $1, -31869 |
| 4550 | ; MIPS64EL-NEXT: dsll $1, $1, 16 |
| 4551 | ; MIPS64EL-NEXT: daddiu $1, $1, 899 |
| 4552 | ; MIPS64EL-NEXT: lui $2, 2311 |
| 4553 | ; MIPS64EL-NEXT: daddiu $2, $2, 2311 |
| 4554 | ; MIPS64EL-NEXT: dsll $2, $2, 16 |
| 4555 | ; MIPS64EL-NEXT: daddiu $2, $2, 2311 |
| 4556 | ; MIPS64EL-NEXT: dsll $2, $2, 16 |
| 4557 | ; MIPS64EL-NEXT: dsll $1, $1, 17 |
| 4558 | ; MIPS64EL-NEXT: lui $3, 899 |
| 4559 | ; MIPS64EL-NEXT: daddiu $3, $3, 899 |
| 4560 | ; MIPS64EL-NEXT: dsll $3, $3, 16 |
| 4561 | ; MIPS64EL-NEXT: daddiu $3, $3, 899 |
| 4562 | ; MIPS64EL-NEXT: dsll $3, $3, 17 |
| 4563 | ; MIPS64EL-NEXT: daddiu $4, $3, 1798 |
| 4564 | ; MIPS64EL-NEXT: daddiu $5, $1, 1798 |
| 4565 | ; MIPS64EL-NEXT: daddiu $6, $2, 2311 |
| 4566 | ; MIPS64EL-NEXT: lui $1, 642 |
| 4567 | ; MIPS64EL-NEXT: daddiu $1, $1, 16899 |
| 4568 | ; MIPS64EL-NEXT: dsll $1, $1, 18 |
| 4569 | ; MIPS64EL-NEXT: daddiu $1, $1, 2311 |
| 4570 | ; MIPS64EL-NEXT: dsll $1, $1, 16 |
| 4571 | ; MIPS64EL-NEXT: daddiu $7, $1, 2311 |
| 4572 | ; MIPS64EL-NEXT: ld $25, %call16(i8_16)($gp) |
| 4573 | ; MIPS64EL-NEXT: jalr $25 |
| 4574 | ; MIPS64EL-NEXT: nop |
| 4575 | ; MIPS64EL-NEXT: ld $1, %got_disp(gv16i8)($gp) |
| 4576 | ; MIPS64EL-NEXT: sd $3, 8($1) |
| 4577 | ; MIPS64EL-NEXT: sd $2, 0($1) |
| 4578 | ; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 4579 | ; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 4580 | ; MIPS64EL-NEXT: daddiu $sp, $sp, 16 |
| 4581 | ; MIPS64EL-NEXT: jr $ra |
| 4582 | ; MIPS64EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 4583 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 4584 | %0 = call <16 x i8> @i8_16(<16 x i8> <i8 6, i8 7,i8 6, i8 7,i8 6, i8 7,i8 6, i8 7,i8 6, i8 7,i8 6, i8 7, i8 6, i8 7, i8 9, i8 10>, <16 x i8> <i8 7, i8 9,i8 7, i8 9,i8 7, i8 9,i8 7, i8 9,i8 7, i8 9,i8 7, i8 9,i8 12, i8 8, i8 9, i8 10>) |
| 4585 | store <16 x i8> %0, <16 x i8> * @gv16i8 |
| 4586 | ret void |
| 4587 | } |
| 4588 | |
| 4589 | define void @calli16_2() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 4590 | ; MIPS32EB-LABEL: calli16_2: |
| 4591 | ; MIPS32EB: # %bb.0: # %entry |
| 4592 | ; MIPS32EB-NEXT: addiu $sp, $sp, -24 |
| 4593 | ; MIPS32EB-NEXT: .cfi_def_cfa_offset 24 |
| 4594 | ; MIPS32EB-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 4595 | ; MIPS32EB-NEXT: .cfi_offset 31, -4 |
| 4596 | ; MIPS32EB-NEXT: lui $1, 6 |
| 4597 | ; MIPS32EB-NEXT: ori $4, $1, 7 |
| 4598 | ; MIPS32EB-NEXT: lui $1, 12 |
| 4599 | ; MIPS32EB-NEXT: ori $5, $1, 8 |
| 4600 | ; MIPS32EB-NEXT: jal i16_2 |
| 4601 | ; MIPS32EB-NEXT: nop |
| 4602 | ; MIPS32EB-NEXT: lui $1, %hi(gv2i16) |
| 4603 | ; MIPS32EB-NEXT: sw $2, %lo(gv2i16)($1) |
| 4604 | ; MIPS32EB-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 4605 | ; MIPS32EB-NEXT: addiu $sp, $sp, 24 |
| 4606 | ; MIPS32EB-NEXT: jr $ra |
| 4607 | ; MIPS32EB-NEXT: nop |
| 4608 | ; |
| 4609 | ; MIPS64EB-LABEL: calli16_2: |
| 4610 | ; MIPS64EB: # %bb.0: # %entry |
| 4611 | ; MIPS64EB-NEXT: daddiu $sp, $sp, -16 |
| 4612 | ; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 |
| 4613 | ; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 4614 | ; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 4615 | ; MIPS64EB-NEXT: .cfi_offset 31, -8 |
| 4616 | ; MIPS64EB-NEXT: .cfi_offset 28, -16 |
| 4617 | ; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_2))) |
| 4618 | ; MIPS64EB-NEXT: daddu $1, $1, $25 |
| 4619 | ; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_2))) |
| 4620 | ; MIPS64EB-NEXT: lui $1, 6 |
| 4621 | ; MIPS64EB-NEXT: ori $4, $1, 7 |
| 4622 | ; MIPS64EB-NEXT: lui $1, 12 |
| 4623 | ; MIPS64EB-NEXT: ori $5, $1, 8 |
| 4624 | ; MIPS64EB-NEXT: ld $25, %call16(i16_2)($gp) |
| 4625 | ; MIPS64EB-NEXT: jalr $25 |
| 4626 | ; MIPS64EB-NEXT: nop |
| 4627 | ; MIPS64EB-NEXT: ld $1, %got_disp(gv2i16)($gp) |
| 4628 | ; MIPS64EB-NEXT: sw $2, 0($1) |
| 4629 | ; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 4630 | ; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 4631 | ; MIPS64EB-NEXT: daddiu $sp, $sp, 16 |
| 4632 | ; MIPS64EB-NEXT: jr $ra |
| 4633 | ; MIPS64EB-NEXT: nop |
| 4634 | ; |
| 4635 | ; MIPS32R5EB-LABEL: calli16_2: |
| 4636 | ; MIPS32R5EB: # %bb.0: # %entry |
| 4637 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, -32 |
| 4638 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 32 |
| 4639 | ; MIPS32R5EB-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill |
| 4640 | ; MIPS32R5EB-NEXT: .cfi_offset 31, -4 |
| 4641 | ; MIPS32R5EB-NEXT: lui $1, 6 |
| 4642 | ; MIPS32R5EB-NEXT: ori $4, $1, 7 |
| 4643 | ; MIPS32R5EB-NEXT: lui $1, 12 |
| 4644 | ; MIPS32R5EB-NEXT: ori $5, $1, 8 |
| 4645 | ; MIPS32R5EB-NEXT: jal i16_2 |
| 4646 | ; MIPS32R5EB-NEXT: nop |
| 4647 | ; MIPS32R5EB-NEXT: lui $1, %hi(gv2i16) |
| 4648 | ; MIPS32R5EB-NEXT: sw $2, %lo(gv2i16)($1) |
| 4649 | ; MIPS32R5EB-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload |
| 4650 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, 32 |
| 4651 | ; MIPS32R5EB-NEXT: jr $ra |
| 4652 | ; MIPS32R5EB-NEXT: nop |
| 4653 | ; |
| 4654 | ; MIPS64R5EB-LABEL: calli16_2: |
| 4655 | ; MIPS64R5EB: # %bb.0: # %entry |
| 4656 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, -32 |
| 4657 | ; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 32 |
| 4658 | ; MIPS64R5EB-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill |
| 4659 | ; MIPS64R5EB-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill |
| 4660 | ; MIPS64R5EB-NEXT: .cfi_offset 31, -8 |
| 4661 | ; MIPS64R5EB-NEXT: .cfi_offset 28, -16 |
| 4662 | ; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_2))) |
| 4663 | ; MIPS64R5EB-NEXT: daddu $1, $1, $25 |
| 4664 | ; MIPS64R5EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_2))) |
| 4665 | ; MIPS64R5EB-NEXT: lui $1, 6 |
| 4666 | ; MIPS64R5EB-NEXT: ori $4, $1, 7 |
| 4667 | ; MIPS64R5EB-NEXT: lui $1, 12 |
| 4668 | ; MIPS64R5EB-NEXT: ori $5, $1, 8 |
| 4669 | ; MIPS64R5EB-NEXT: ld $25, %call16(i16_2)($gp) |
| 4670 | ; MIPS64R5EB-NEXT: jalr $25 |
| 4671 | ; MIPS64R5EB-NEXT: nop |
| 4672 | ; MIPS64R5EB-NEXT: ld $1, %got_disp(gv2i16)($gp) |
| 4673 | ; MIPS64R5EB-NEXT: sw $2, 0($1) |
| 4674 | ; MIPS64R5EB-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload |
| 4675 | ; MIPS64R5EB-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload |
| 4676 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, 32 |
| 4677 | ; MIPS64R5EB-NEXT: jr $ra |
| 4678 | ; MIPS64R5EB-NEXT: nop |
| 4679 | ; |
| 4680 | ; MIPS32EL-LABEL: calli16_2: |
| 4681 | ; MIPS32EL: # %bb.0: # %entry |
| 4682 | ; MIPS32EL-NEXT: addiu $sp, $sp, -24 |
| 4683 | ; MIPS32EL-NEXT: .cfi_def_cfa_offset 24 |
| 4684 | ; MIPS32EL-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 4685 | ; MIPS32EL-NEXT: .cfi_offset 31, -4 |
| 4686 | ; MIPS32EL-NEXT: lui $1, 7 |
| 4687 | ; MIPS32EL-NEXT: ori $4, $1, 6 |
| 4688 | ; MIPS32EL-NEXT: lui $1, 8 |
| 4689 | ; MIPS32EL-NEXT: ori $5, $1, 12 |
| 4690 | ; MIPS32EL-NEXT: jal i16_2 |
| 4691 | ; MIPS32EL-NEXT: nop |
| 4692 | ; MIPS32EL-NEXT: lui $1, %hi(gv2i16) |
| 4693 | ; MIPS32EL-NEXT: sw $2, %lo(gv2i16)($1) |
| 4694 | ; MIPS32EL-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 4695 | ; MIPS32EL-NEXT: addiu $sp, $sp, 24 |
| 4696 | ; MIPS32EL-NEXT: jr $ra |
| 4697 | ; MIPS32EL-NEXT: nop |
| 4698 | ; |
| 4699 | ; MIPS64EL-LABEL: calli16_2: |
| 4700 | ; MIPS64EL: # %bb.0: # %entry |
| 4701 | ; MIPS64EL-NEXT: daddiu $sp, $sp, -16 |
| 4702 | ; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 |
| 4703 | ; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 4704 | ; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 4705 | ; MIPS64EL-NEXT: .cfi_offset 31, -8 |
| 4706 | ; MIPS64EL-NEXT: .cfi_offset 28, -16 |
| 4707 | ; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_2))) |
| 4708 | ; MIPS64EL-NEXT: daddu $1, $1, $25 |
| 4709 | ; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_2))) |
| 4710 | ; MIPS64EL-NEXT: lui $1, 7 |
| 4711 | ; MIPS64EL-NEXT: ori $4, $1, 6 |
| 4712 | ; MIPS64EL-NEXT: lui $1, 8 |
| 4713 | ; MIPS64EL-NEXT: ori $5, $1, 12 |
| 4714 | ; MIPS64EL-NEXT: ld $25, %call16(i16_2)($gp) |
| 4715 | ; MIPS64EL-NEXT: jalr $25 |
| 4716 | ; MIPS64EL-NEXT: nop |
| 4717 | ; MIPS64EL-NEXT: ld $1, %got_disp(gv2i16)($gp) |
| 4718 | ; MIPS64EL-NEXT: sw $2, 0($1) |
| 4719 | ; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 4720 | ; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 4721 | ; MIPS64EL-NEXT: daddiu $sp, $sp, 16 |
| 4722 | ; MIPS64EL-NEXT: jr $ra |
| 4723 | ; MIPS64EL-NEXT: nop |
| 4724 | ; |
| 4725 | ; MIPS32R5EL-LABEL: calli16_2: |
| 4726 | ; MIPS32R5EL: # %bb.0: # %entry |
| 4727 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, -32 |
| 4728 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 32 |
| 4729 | ; MIPS32R5EL-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill |
| 4730 | ; MIPS32R5EL-NEXT: .cfi_offset 31, -4 |
| 4731 | ; MIPS32R5EL-NEXT: lui $1, 7 |
| 4732 | ; MIPS32R5EL-NEXT: ori $4, $1, 6 |
| 4733 | ; MIPS32R5EL-NEXT: lui $1, 8 |
| 4734 | ; MIPS32R5EL-NEXT: ori $5, $1, 12 |
| 4735 | ; MIPS32R5EL-NEXT: jal i16_2 |
| 4736 | ; MIPS32R5EL-NEXT: nop |
| 4737 | ; MIPS32R5EL-NEXT: lui $1, %hi(gv2i16) |
| 4738 | ; MIPS32R5EL-NEXT: sw $2, %lo(gv2i16)($1) |
| 4739 | ; MIPS32R5EL-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload |
| 4740 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, 32 |
| 4741 | ; MIPS32R5EL-NEXT: jr $ra |
| 4742 | ; MIPS32R5EL-NEXT: nop |
| 4743 | ; |
| 4744 | ; MIPS64R5EL-LABEL: calli16_2: |
| 4745 | ; MIPS64R5EL: # %bb.0: # %entry |
| 4746 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, -32 |
| 4747 | ; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 32 |
| 4748 | ; MIPS64R5EL-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill |
| 4749 | ; MIPS64R5EL-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill |
| 4750 | ; MIPS64R5EL-NEXT: .cfi_offset 31, -8 |
| 4751 | ; MIPS64R5EL-NEXT: .cfi_offset 28, -16 |
| 4752 | ; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_2))) |
| 4753 | ; MIPS64R5EL-NEXT: daddu $1, $1, $25 |
| 4754 | ; MIPS64R5EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_2))) |
| 4755 | ; MIPS64R5EL-NEXT: lui $1, 7 |
| 4756 | ; MIPS64R5EL-NEXT: ori $4, $1, 6 |
| 4757 | ; MIPS64R5EL-NEXT: lui $1, 8 |
| 4758 | ; MIPS64R5EL-NEXT: ori $5, $1, 12 |
| 4759 | ; MIPS64R5EL-NEXT: ld $25, %call16(i16_2)($gp) |
| 4760 | ; MIPS64R5EL-NEXT: jalr $25 |
| 4761 | ; MIPS64R5EL-NEXT: nop |
| 4762 | ; MIPS64R5EL-NEXT: ld $1, %got_disp(gv2i16)($gp) |
| 4763 | ; MIPS64R5EL-NEXT: sw $2, 0($1) |
| 4764 | ; MIPS64R5EL-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload |
| 4765 | ; MIPS64R5EL-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload |
| 4766 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, 32 |
| 4767 | ; MIPS64R5EL-NEXT: jr $ra |
| 4768 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 4769 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 4770 | %0 = call <2 x i16> @i16_2(<2 x i16> <i16 6, i16 7>, <2 x i16> <i16 12, i16 8>) |
| 4771 | store <2 x i16> %0, <2 x i16> * @gv2i16 |
| 4772 | ret void |
| 4773 | } |
| 4774 | |
| 4775 | define void @calli16_4() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 4776 | ; MIPS32EB-LABEL: calli16_4: |
| 4777 | ; MIPS32EB: # %bb.0: # %entry |
| 4778 | ; MIPS32EB-NEXT: addiu $sp, $sp, -24 |
| 4779 | ; MIPS32EB-NEXT: .cfi_def_cfa_offset 24 |
| 4780 | ; MIPS32EB-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 4781 | ; MIPS32EB-NEXT: .cfi_offset 31, -4 |
| 4782 | ; MIPS32EB-NEXT: lui $1, 6 |
| 4783 | ; MIPS32EB-NEXT: ori $4, $1, 7 |
| 4784 | ; MIPS32EB-NEXT: lui $1, 12 |
| 4785 | ; MIPS32EB-NEXT: ori $6, $1, 8 |
| 4786 | ; MIPS32EB-NEXT: lui $1, 9 |
| 4787 | ; MIPS32EB-NEXT: ori $5, $1, 10 |
| 4788 | ; MIPS32EB-NEXT: move $7, $5 |
| 4789 | ; MIPS32EB-NEXT: jal i16_4 |
| 4790 | ; MIPS32EB-NEXT: nop |
| 4791 | ; MIPS32EB-NEXT: lui $1, %hi(gv4i16) |
| 4792 | ; MIPS32EB-NEXT: addiu $4, $1, %lo(gv4i16) |
| 4793 | ; MIPS32EB-NEXT: sw $3, 4($4) |
| 4794 | ; MIPS32EB-NEXT: sw $2, %lo(gv4i16)($1) |
| 4795 | ; MIPS32EB-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 4796 | ; MIPS32EB-NEXT: addiu $sp, $sp, 24 |
| 4797 | ; MIPS32EB-NEXT: jr $ra |
| 4798 | ; MIPS32EB-NEXT: nop |
| 4799 | ; |
| 4800 | ; MIPS64EB-LABEL: calli16_4: |
| 4801 | ; MIPS64EB: # %bb.0: # %entry |
| 4802 | ; MIPS64EB-NEXT: daddiu $sp, $sp, -16 |
| 4803 | ; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 |
| 4804 | ; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 4805 | ; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 4806 | ; MIPS64EB-NEXT: .cfi_offset 31, -8 |
| 4807 | ; MIPS64EB-NEXT: .cfi_offset 28, -16 |
| 4808 | ; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_4))) |
| 4809 | ; MIPS64EB-NEXT: daddu $1, $1, $25 |
| 4810 | ; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_4))) |
| 4811 | ; MIPS64EB-NEXT: lui $1, 6 |
| 4812 | ; MIPS64EB-NEXT: daddiu $1, $1, 7 |
| 4813 | ; MIPS64EB-NEXT: dsll $1, $1, 16 |
| 4814 | ; MIPS64EB-NEXT: daddiu $1, $1, 9 |
| 4815 | ; MIPS64EB-NEXT: dsll $1, $1, 16 |
| 4816 | ; MIPS64EB-NEXT: daddiu $4, $1, 10 |
| 4817 | ; MIPS64EB-NEXT: lui $1, 2 |
| 4818 | ; MIPS64EB-NEXT: daddiu $1, $1, -32767 |
| 4819 | ; MIPS64EB-NEXT: dsll $1, $1, 19 |
| 4820 | ; MIPS64EB-NEXT: daddiu $1, $1, 9 |
| 4821 | ; MIPS64EB-NEXT: dsll $1, $1, 16 |
| 4822 | ; MIPS64EB-NEXT: daddiu $5, $1, 10 |
| 4823 | ; MIPS64EB-NEXT: ld $25, %call16(i16_4)($gp) |
| 4824 | ; MIPS64EB-NEXT: jalr $25 |
| 4825 | ; MIPS64EB-NEXT: nop |
| 4826 | ; MIPS64EB-NEXT: ld $1, %got_disp(gv4i16)($gp) |
| 4827 | ; MIPS64EB-NEXT: sd $2, 0($1) |
| 4828 | ; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 4829 | ; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 4830 | ; MIPS64EB-NEXT: daddiu $sp, $sp, 16 |
| 4831 | ; MIPS64EB-NEXT: jr $ra |
| 4832 | ; MIPS64EB-NEXT: nop |
| 4833 | ; |
| 4834 | ; MIPS32R5EB-LABEL: calli16_4: |
| 4835 | ; MIPS32R5EB: # %bb.0: # %entry |
| 4836 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, -24 |
| 4837 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 24 |
| 4838 | ; MIPS32R5EB-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 4839 | ; MIPS32R5EB-NEXT: .cfi_offset 31, -4 |
| 4840 | ; MIPS32R5EB-NEXT: lui $1, 6 |
| 4841 | ; MIPS32R5EB-NEXT: ori $4, $1, 7 |
| 4842 | ; MIPS32R5EB-NEXT: lui $1, 12 |
| 4843 | ; MIPS32R5EB-NEXT: ori $6, $1, 8 |
| 4844 | ; MIPS32R5EB-NEXT: lui $1, 9 |
| 4845 | ; MIPS32R5EB-NEXT: ori $5, $1, 10 |
| 4846 | ; MIPS32R5EB-NEXT: move $7, $5 |
| 4847 | ; MIPS32R5EB-NEXT: jal i16_4 |
| 4848 | ; MIPS32R5EB-NEXT: nop |
| 4849 | ; MIPS32R5EB-NEXT: lui $1, %hi(gv4i16) |
| 4850 | ; MIPS32R5EB-NEXT: addiu $4, $1, %lo(gv4i16) |
| 4851 | ; MIPS32R5EB-NEXT: sw $3, 4($4) |
| 4852 | ; MIPS32R5EB-NEXT: sw $2, %lo(gv4i16)($1) |
| 4853 | ; MIPS32R5EB-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 4854 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, 24 |
| 4855 | ; MIPS32R5EB-NEXT: jr $ra |
| 4856 | ; MIPS32R5EB-NEXT: nop |
| 4857 | ; |
| 4858 | ; MIPS64R5EB-LABEL: calli16_4: |
| 4859 | ; MIPS64R5EB: # %bb.0: # %entry |
| 4860 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, -32 |
| 4861 | ; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 32 |
| 4862 | ; MIPS64R5EB-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill |
| 4863 | ; MIPS64R5EB-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill |
| 4864 | ; MIPS64R5EB-NEXT: .cfi_offset 31, -8 |
| 4865 | ; MIPS64R5EB-NEXT: .cfi_offset 28, -16 |
| 4866 | ; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_4))) |
| 4867 | ; MIPS64R5EB-NEXT: daddu $1, $1, $25 |
| 4868 | ; MIPS64R5EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_4))) |
| 4869 | ; MIPS64R5EB-NEXT: lui $1, 6 |
| 4870 | ; MIPS64R5EB-NEXT: daddiu $1, $1, 7 |
| 4871 | ; MIPS64R5EB-NEXT: dsll $1, $1, 16 |
| 4872 | ; MIPS64R5EB-NEXT: daddiu $1, $1, 9 |
| 4873 | ; MIPS64R5EB-NEXT: dsll $1, $1, 16 |
| 4874 | ; MIPS64R5EB-NEXT: daddiu $4, $1, 10 |
| 4875 | ; MIPS64R5EB-NEXT: lui $1, 2 |
| 4876 | ; MIPS64R5EB-NEXT: daddiu $1, $1, -32767 |
| 4877 | ; MIPS64R5EB-NEXT: dsll $1, $1, 19 |
| 4878 | ; MIPS64R5EB-NEXT: daddiu $1, $1, 9 |
| 4879 | ; MIPS64R5EB-NEXT: dsll $1, $1, 16 |
| 4880 | ; MIPS64R5EB-NEXT: daddiu $5, $1, 10 |
| 4881 | ; MIPS64R5EB-NEXT: ld $25, %call16(i16_4)($gp) |
| 4882 | ; MIPS64R5EB-NEXT: jalr $25 |
| 4883 | ; MIPS64R5EB-NEXT: nop |
| 4884 | ; MIPS64R5EB-NEXT: ld $1, %got_disp(gv4i16)($gp) |
| 4885 | ; MIPS64R5EB-NEXT: sd $2, 0($1) |
| 4886 | ; MIPS64R5EB-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload |
| 4887 | ; MIPS64R5EB-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload |
| 4888 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, 32 |
| 4889 | ; MIPS64R5EB-NEXT: jr $ra |
| 4890 | ; MIPS64R5EB-NEXT: nop |
| 4891 | ; |
| 4892 | ; MIPS32EL-LABEL: calli16_4: |
| 4893 | ; MIPS32EL: # %bb.0: # %entry |
| 4894 | ; MIPS32EL-NEXT: addiu $sp, $sp, -24 |
| 4895 | ; MIPS32EL-NEXT: .cfi_def_cfa_offset 24 |
| 4896 | ; MIPS32EL-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 4897 | ; MIPS32EL-NEXT: .cfi_offset 31, -4 |
| 4898 | ; MIPS32EL-NEXT: lui $1, 7 |
| 4899 | ; MIPS32EL-NEXT: ori $4, $1, 6 |
| 4900 | ; MIPS32EL-NEXT: lui $1, 8 |
| 4901 | ; MIPS32EL-NEXT: ori $6, $1, 12 |
| 4902 | ; MIPS32EL-NEXT: lui $1, 10 |
| 4903 | ; MIPS32EL-NEXT: ori $5, $1, 9 |
| 4904 | ; MIPS32EL-NEXT: move $7, $5 |
| 4905 | ; MIPS32EL-NEXT: jal i16_4 |
| 4906 | ; MIPS32EL-NEXT: nop |
| 4907 | ; MIPS32EL-NEXT: lui $1, %hi(gv4i16) |
| 4908 | ; MIPS32EL-NEXT: addiu $4, $1, %lo(gv4i16) |
| 4909 | ; MIPS32EL-NEXT: sw $3, 4($4) |
| 4910 | ; MIPS32EL-NEXT: sw $2, %lo(gv4i16)($1) |
| 4911 | ; MIPS32EL-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 4912 | ; MIPS32EL-NEXT: addiu $sp, $sp, 24 |
| 4913 | ; MIPS32EL-NEXT: jr $ra |
| 4914 | ; MIPS32EL-NEXT: nop |
| 4915 | ; |
| 4916 | ; MIPS64EL-LABEL: calli16_4: |
| 4917 | ; MIPS64EL: # %bb.0: # %entry |
| 4918 | ; MIPS64EL-NEXT: daddiu $sp, $sp, -16 |
| 4919 | ; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 |
| 4920 | ; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 4921 | ; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 4922 | ; MIPS64EL-NEXT: .cfi_offset 31, -8 |
| 4923 | ; MIPS64EL-NEXT: .cfi_offset 28, -16 |
| 4924 | ; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_4))) |
| 4925 | ; MIPS64EL-NEXT: daddu $1, $1, $25 |
| 4926 | ; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_4))) |
| 4927 | ; MIPS64EL-NEXT: lui $1, 10 |
| 4928 | ; MIPS64EL-NEXT: daddiu $1, $1, 9 |
| 4929 | ; MIPS64EL-NEXT: dsll $1, $1, 16 |
| 4930 | ; MIPS64EL-NEXT: daddiu $1, $1, 7 |
| 4931 | ; MIPS64EL-NEXT: dsll $1, $1, 16 |
| 4932 | ; MIPS64EL-NEXT: daddiu $4, $1, 6 |
| 4933 | ; MIPS64EL-NEXT: lui $1, 1 |
| 4934 | ; MIPS64EL-NEXT: daddiu $1, $1, 16385 |
| 4935 | ; MIPS64EL-NEXT: dsll $1, $1, 16 |
| 4936 | ; MIPS64EL-NEXT: daddiu $1, $1, 8193 |
| 4937 | ; MIPS64EL-NEXT: dsll $1, $1, 19 |
| 4938 | ; MIPS64EL-NEXT: daddiu $5, $1, 12 |
| 4939 | ; MIPS64EL-NEXT: ld $25, %call16(i16_4)($gp) |
| 4940 | ; MIPS64EL-NEXT: jalr $25 |
| 4941 | ; MIPS64EL-NEXT: nop |
| 4942 | ; MIPS64EL-NEXT: ld $1, %got_disp(gv4i16)($gp) |
| 4943 | ; MIPS64EL-NEXT: sd $2, 0($1) |
| 4944 | ; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 4945 | ; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 4946 | ; MIPS64EL-NEXT: daddiu $sp, $sp, 16 |
| 4947 | ; MIPS64EL-NEXT: jr $ra |
| 4948 | ; MIPS64EL-NEXT: nop |
| 4949 | ; |
| 4950 | ; MIPS32R5EL-LABEL: calli16_4: |
| 4951 | ; MIPS32R5EL: # %bb.0: # %entry |
| 4952 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, -24 |
| 4953 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 24 |
| 4954 | ; MIPS32R5EL-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 4955 | ; MIPS32R5EL-NEXT: .cfi_offset 31, -4 |
| 4956 | ; MIPS32R5EL-NEXT: lui $1, 7 |
| 4957 | ; MIPS32R5EL-NEXT: ori $4, $1, 6 |
| 4958 | ; MIPS32R5EL-NEXT: lui $1, 8 |
| 4959 | ; MIPS32R5EL-NEXT: ori $6, $1, 12 |
| 4960 | ; MIPS32R5EL-NEXT: lui $1, 10 |
| 4961 | ; MIPS32R5EL-NEXT: ori $5, $1, 9 |
| 4962 | ; MIPS32R5EL-NEXT: move $7, $5 |
| 4963 | ; MIPS32R5EL-NEXT: jal i16_4 |
| 4964 | ; MIPS32R5EL-NEXT: nop |
| 4965 | ; MIPS32R5EL-NEXT: lui $1, %hi(gv4i16) |
| 4966 | ; MIPS32R5EL-NEXT: addiu $4, $1, %lo(gv4i16) |
| 4967 | ; MIPS32R5EL-NEXT: sw $3, 4($4) |
| 4968 | ; MIPS32R5EL-NEXT: sw $2, %lo(gv4i16)($1) |
| 4969 | ; MIPS32R5EL-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 4970 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, 24 |
| 4971 | ; MIPS32R5EL-NEXT: jr $ra |
| 4972 | ; MIPS32R5EL-NEXT: nop |
| 4973 | ; |
| 4974 | ; MIPS64R5EL-LABEL: calli16_4: |
| 4975 | ; MIPS64R5EL: # %bb.0: # %entry |
| 4976 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, -32 |
| 4977 | ; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 32 |
| 4978 | ; MIPS64R5EL-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill |
| 4979 | ; MIPS64R5EL-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill |
| 4980 | ; MIPS64R5EL-NEXT: .cfi_offset 31, -8 |
| 4981 | ; MIPS64R5EL-NEXT: .cfi_offset 28, -16 |
| 4982 | ; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_4))) |
| 4983 | ; MIPS64R5EL-NEXT: daddu $1, $1, $25 |
| 4984 | ; MIPS64R5EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_4))) |
| 4985 | ; MIPS64R5EL-NEXT: lui $1, 10 |
| 4986 | ; MIPS64R5EL-NEXT: daddiu $1, $1, 9 |
| 4987 | ; MIPS64R5EL-NEXT: dsll $1, $1, 16 |
| 4988 | ; MIPS64R5EL-NEXT: daddiu $1, $1, 7 |
| 4989 | ; MIPS64R5EL-NEXT: dsll $1, $1, 16 |
| 4990 | ; MIPS64R5EL-NEXT: daddiu $4, $1, 6 |
| 4991 | ; MIPS64R5EL-NEXT: lui $1, 1 |
| 4992 | ; MIPS64R5EL-NEXT: daddiu $1, $1, 16385 |
| 4993 | ; MIPS64R5EL-NEXT: dsll $1, $1, 16 |
| 4994 | ; MIPS64R5EL-NEXT: daddiu $1, $1, 8193 |
| 4995 | ; MIPS64R5EL-NEXT: dsll $1, $1, 19 |
| 4996 | ; MIPS64R5EL-NEXT: daddiu $5, $1, 12 |
| 4997 | ; MIPS64R5EL-NEXT: ld $25, %call16(i16_4)($gp) |
| 4998 | ; MIPS64R5EL-NEXT: jalr $25 |
| 4999 | ; MIPS64R5EL-NEXT: nop |
| 5000 | ; MIPS64R5EL-NEXT: ld $1, %got_disp(gv4i16)($gp) |
| 5001 | ; MIPS64R5EL-NEXT: sd $2, 0($1) |
| 5002 | ; MIPS64R5EL-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload |
| 5003 | ; MIPS64R5EL-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload |
| 5004 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, 32 |
| 5005 | ; MIPS64R5EL-NEXT: jr $ra |
| 5006 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 5007 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 5008 | %0 = call <4 x i16> @i16_4(<4 x i16> <i16 6, i16 7, i16 9, i16 10>, <4 x i16> <i16 12, i16 8, i16 9, i16 10>) |
| 5009 | store <4 x i16> %0, <4 x i16> * @gv4i16 |
| 5010 | ret void |
| 5011 | } |
| 5012 | |
| 5013 | define void @calli16_8() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 5014 | ; MIPS32EB-LABEL: calli16_8: |
| 5015 | ; MIPS32EB: # %bb.0: # %entry |
| 5016 | ; MIPS32EB-NEXT: addiu $sp, $sp, -40 |
| 5017 | ; MIPS32EB-NEXT: .cfi_def_cfa_offset 40 |
| 5018 | ; MIPS32EB-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill |
| 5019 | ; MIPS32EB-NEXT: .cfi_offset 31, -4 |
| 5020 | ; MIPS32EB-NEXT: lui $1, 9 |
| 5021 | ; MIPS32EB-NEXT: ori $5, $1, 10 |
| 5022 | ; MIPS32EB-NEXT: sw $5, 28($sp) |
| 5023 | ; MIPS32EB-NEXT: lui $1, 12 |
| 5024 | ; MIPS32EB-NEXT: ori $1, $1, 8 |
| 5025 | ; MIPS32EB-NEXT: sw $1, 24($sp) |
| 5026 | ; MIPS32EB-NEXT: sw $5, 20($sp) |
| 5027 | ; MIPS32EB-NEXT: lui $1, 6 |
| 5028 | ; MIPS32EB-NEXT: ori $4, $1, 7 |
| 5029 | ; MIPS32EB-NEXT: sw $4, 16($sp) |
| 5030 | ; MIPS32EB-NEXT: move $6, $4 |
| 5031 | ; MIPS32EB-NEXT: move $7, $5 |
| 5032 | ; MIPS32EB-NEXT: jal i16_8 |
| 5033 | ; MIPS32EB-NEXT: nop |
| 5034 | ; MIPS32EB-NEXT: lui $1, %hi(gv8i16) |
| 5035 | ; MIPS32EB-NEXT: addiu $6, $1, %lo(gv8i16) |
| 5036 | ; MIPS32EB-NEXT: sw $5, 12($6) |
| 5037 | ; MIPS32EB-NEXT: sw $4, 8($6) |
| 5038 | ; MIPS32EB-NEXT: sw $3, 4($6) |
| 5039 | ; MIPS32EB-NEXT: sw $2, %lo(gv8i16)($1) |
| 5040 | ; MIPS32EB-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload |
| 5041 | ; MIPS32EB-NEXT: addiu $sp, $sp, 40 |
| 5042 | ; MIPS32EB-NEXT: jr $ra |
| 5043 | ; MIPS32EB-NEXT: nop |
| 5044 | ; |
| 5045 | ; MIPS64EB-LABEL: calli16_8: |
| 5046 | ; MIPS64EB: # %bb.0: # %entry |
| 5047 | ; MIPS64EB-NEXT: daddiu $sp, $sp, -16 |
| 5048 | ; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 |
| 5049 | ; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 5050 | ; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 5051 | ; MIPS64EB-NEXT: .cfi_offset 31, -8 |
| 5052 | ; MIPS64EB-NEXT: .cfi_offset 28, -16 |
| 5053 | ; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_8))) |
| 5054 | ; MIPS64EB-NEXT: daddu $1, $1, $25 |
| 5055 | ; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_8))) |
| 5056 | ; MIPS64EB-NEXT: lui $1, 6 |
| 5057 | ; MIPS64EB-NEXT: daddiu $1, $1, 7 |
| 5058 | ; MIPS64EB-NEXT: dsll $1, $1, 16 |
| 5059 | ; MIPS64EB-NEXT: daddiu $1, $1, 9 |
| 5060 | ; MIPS64EB-NEXT: dsll $1, $1, 16 |
| 5061 | ; MIPS64EB-NEXT: daddiu $4, $1, 10 |
| 5062 | ; MIPS64EB-NEXT: lui $1, 2 |
| 5063 | ; MIPS64EB-NEXT: daddiu $1, $1, -32767 |
| 5064 | ; MIPS64EB-NEXT: dsll $1, $1, 19 |
| 5065 | ; MIPS64EB-NEXT: daddiu $1, $1, 9 |
| 5066 | ; MIPS64EB-NEXT: dsll $1, $1, 16 |
| 5067 | ; MIPS64EB-NEXT: daddiu $7, $1, 10 |
| 5068 | ; MIPS64EB-NEXT: ld $25, %call16(i16_8)($gp) |
| 5069 | ; MIPS64EB-NEXT: move $5, $4 |
| 5070 | ; MIPS64EB-NEXT: move $6, $4 |
| 5071 | ; MIPS64EB-NEXT: jalr $25 |
| 5072 | ; MIPS64EB-NEXT: nop |
| 5073 | ; MIPS64EB-NEXT: ld $1, %got_disp(gv8i16)($gp) |
| 5074 | ; MIPS64EB-NEXT: sd $3, 8($1) |
| 5075 | ; MIPS64EB-NEXT: sd $2, 0($1) |
| 5076 | ; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 5077 | ; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 5078 | ; MIPS64EB-NEXT: daddiu $sp, $sp, 16 |
| 5079 | ; MIPS64EB-NEXT: jr $ra |
| 5080 | ; MIPS64EB-NEXT: nop |
| 5081 | ; |
| 5082 | ; MIPS32R5EB-LABEL: calli16_8: |
| 5083 | ; MIPS32R5EB: # %bb.0: # %entry |
| 5084 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, -40 |
| 5085 | ; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 40 |
| 5086 | ; MIPS32R5EB-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill |
| 5087 | ; MIPS32R5EB-NEXT: .cfi_offset 31, -4 |
| 5088 | ; MIPS32R5EB-NEXT: lui $1, 6 |
| 5089 | ; MIPS32R5EB-NEXT: ori $1, $1, 7 |
| 5090 | ; MIPS32R5EB-NEXT: lui $2, 9 |
| 5091 | ; MIPS32R5EB-NEXT: ori $2, $2, 10 |
| 5092 | ; MIPS32R5EB-NEXT: fill.w $w0, $2 |
| 5093 | ; MIPS32R5EB-NEXT: insert.w $w0[1], $1 |
| 5094 | ; MIPS32R5EB-NEXT: splati.d $w0, $w0[0] |
| 5095 | ; MIPS32R5EB-NEXT: copy_s.w $4, $w0[0] |
| 5096 | ; MIPS32R5EB-NEXT: copy_s.w $5, $w0[1] |
| 5097 | ; MIPS32R5EB-NEXT: copy_s.w $6, $w0[2] |
| 5098 | ; MIPS32R5EB-NEXT: copy_s.w $7, $w0[3] |
| 5099 | ; MIPS32R5EB-NEXT: lui $1, %hi($CPI33_0) |
| 5100 | ; MIPS32R5EB-NEXT: addiu $1, $1, %lo($CPI33_0) |
| 5101 | ; MIPS32R5EB-NEXT: ld.w $w0, 0($1) |
| 5102 | ; MIPS32R5EB-NEXT: copy_s.w $1, $w0[0] |
| 5103 | ; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] |
| 5104 | ; MIPS32R5EB-NEXT: copy_s.w $3, $w0[2] |
| 5105 | ; MIPS32R5EB-NEXT: copy_s.w $8, $w0[3] |
| 5106 | ; MIPS32R5EB-NEXT: sw $8, 28($sp) |
| 5107 | ; MIPS32R5EB-NEXT: sw $3, 24($sp) |
| 5108 | ; MIPS32R5EB-NEXT: sw $2, 20($sp) |
| 5109 | ; MIPS32R5EB-NEXT: sw $1, 16($sp) |
| 5110 | ; MIPS32R5EB-NEXT: jal i16_8 |
| 5111 | ; MIPS32R5EB-NEXT: nop |
| 5112 | ; MIPS32R5EB-NEXT: lui $1, %hi(gv8i16) |
| 5113 | ; MIPS32R5EB-NEXT: addiu $1, $1, %lo(gv8i16) |
| 5114 | ; MIPS32R5EB-NEXT: ldi.b $w0, 0 |
| 5115 | ; MIPS32R5EB-NEXT: insert.w $w0[0], $2 |
| 5116 | ; MIPS32R5EB-NEXT: insert.w $w0[1], $3 |
| 5117 | ; MIPS32R5EB-NEXT: insert.w $w0[2], $4 |
| 5118 | ; MIPS32R5EB-NEXT: insert.w $w0[3], $5 |
| 5119 | ; MIPS32R5EB-NEXT: st.w $w0, 0($1) |
| 5120 | ; MIPS32R5EB-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload |
| 5121 | ; MIPS32R5EB-NEXT: addiu $sp, $sp, 40 |
| 5122 | ; MIPS32R5EB-NEXT: jr $ra |
| 5123 | ; MIPS32R5EB-NEXT: nop |
| 5124 | ; |
| 5125 | ; MIPS64R5EB-LABEL: calli16_8: |
| 5126 | ; MIPS64R5EB: # %bb.0: # %entry |
| 5127 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, -16 |
| 5128 | ; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 16 |
| 5129 | ; MIPS64R5EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 5130 | ; MIPS64R5EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 5131 | ; MIPS64R5EB-NEXT: .cfi_offset 31, -8 |
| 5132 | ; MIPS64R5EB-NEXT: .cfi_offset 28, -16 |
| 5133 | ; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_8))) |
| 5134 | ; MIPS64R5EB-NEXT: daddu $1, $1, $25 |
| 5135 | ; MIPS64R5EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_8))) |
| 5136 | ; MIPS64R5EB-NEXT: lui $1, 9 |
| 5137 | ; MIPS64R5EB-NEXT: ori $1, $1, 10 |
| 5138 | ; MIPS64R5EB-NEXT: lui $2, 6 |
| 5139 | ; MIPS64R5EB-NEXT: ori $2, $2, 7 |
| 5140 | ; MIPS64R5EB-NEXT: dinsu $1, $2, 32, 32 |
| 5141 | ; MIPS64R5EB-NEXT: fill.d $w0, $1 |
| 5142 | ; MIPS64R5EB-NEXT: copy_s.d $4, $w0[0] |
| 5143 | ; MIPS64R5EB-NEXT: copy_s.d $5, $w0[1] |
| 5144 | ; MIPS64R5EB-NEXT: ld $1, %got_page(.LCPI33_0)($gp) |
| 5145 | ; MIPS64R5EB-NEXT: daddiu $1, $1, %got_ofst(.LCPI33_0) |
| 5146 | ; MIPS64R5EB-NEXT: ld.d $w0, 0($1) |
| 5147 | ; MIPS64R5EB-NEXT: copy_s.d $6, $w0[0] |
| 5148 | ; MIPS64R5EB-NEXT: copy_s.d $7, $w0[1] |
| 5149 | ; MIPS64R5EB-NEXT: ld $25, %call16(i16_8)($gp) |
| 5150 | ; MIPS64R5EB-NEXT: jalr $25 |
| 5151 | ; MIPS64R5EB-NEXT: nop |
| 5152 | ; MIPS64R5EB-NEXT: ldi.b $w0, 0 |
| 5153 | ; MIPS64R5EB-NEXT: ld $1, %got_disp(gv8i16)($gp) |
| 5154 | ; MIPS64R5EB-NEXT: insert.d $w0[0], $2 |
| 5155 | ; MIPS64R5EB-NEXT: insert.d $w0[1], $3 |
| 5156 | ; MIPS64R5EB-NEXT: st.d $w0, 0($1) |
| 5157 | ; MIPS64R5EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 5158 | ; MIPS64R5EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 5159 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, 16 |
| 5160 | ; MIPS64R5EB-NEXT: jr $ra |
| 5161 | ; MIPS64R5EB-NEXT: nop |
| 5162 | ; |
| 5163 | ; MIPS32EL-LABEL: calli16_8: |
| 5164 | ; MIPS32EL: # %bb.0: # %entry |
| 5165 | ; MIPS32EL-NEXT: addiu $sp, $sp, -40 |
| 5166 | ; MIPS32EL-NEXT: .cfi_def_cfa_offset 40 |
| 5167 | ; MIPS32EL-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill |
| 5168 | ; MIPS32EL-NEXT: .cfi_offset 31, -4 |
| 5169 | ; MIPS32EL-NEXT: lui $1, 10 |
| 5170 | ; MIPS32EL-NEXT: ori $5, $1, 9 |
| 5171 | ; MIPS32EL-NEXT: sw $5, 28($sp) |
| 5172 | ; MIPS32EL-NEXT: lui $1, 8 |
| 5173 | ; MIPS32EL-NEXT: ori $1, $1, 12 |
| 5174 | ; MIPS32EL-NEXT: sw $1, 24($sp) |
| 5175 | ; MIPS32EL-NEXT: sw $5, 20($sp) |
| 5176 | ; MIPS32EL-NEXT: lui $1, 7 |
| 5177 | ; MIPS32EL-NEXT: ori $4, $1, 6 |
| 5178 | ; MIPS32EL-NEXT: sw $4, 16($sp) |
| 5179 | ; MIPS32EL-NEXT: move $6, $4 |
| 5180 | ; MIPS32EL-NEXT: move $7, $5 |
| 5181 | ; MIPS32EL-NEXT: jal i16_8 |
| 5182 | ; MIPS32EL-NEXT: nop |
| 5183 | ; MIPS32EL-NEXT: lui $1, %hi(gv8i16) |
| 5184 | ; MIPS32EL-NEXT: addiu $6, $1, %lo(gv8i16) |
| 5185 | ; MIPS32EL-NEXT: sw $5, 12($6) |
| 5186 | ; MIPS32EL-NEXT: sw $4, 8($6) |
| 5187 | ; MIPS32EL-NEXT: sw $3, 4($6) |
| 5188 | ; MIPS32EL-NEXT: sw $2, %lo(gv8i16)($1) |
| 5189 | ; MIPS32EL-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload |
| 5190 | ; MIPS32EL-NEXT: addiu $sp, $sp, 40 |
| 5191 | ; MIPS32EL-NEXT: jr $ra |
| 5192 | ; MIPS32EL-NEXT: nop |
| 5193 | ; |
| 5194 | ; MIPS64EL-LABEL: calli16_8: |
| 5195 | ; MIPS64EL: # %bb.0: # %entry |
| 5196 | ; MIPS64EL-NEXT: daddiu $sp, $sp, -16 |
| 5197 | ; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 |
| 5198 | ; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 5199 | ; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 5200 | ; MIPS64EL-NEXT: .cfi_offset 31, -8 |
| 5201 | ; MIPS64EL-NEXT: .cfi_offset 28, -16 |
| 5202 | ; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_8))) |
| 5203 | ; MIPS64EL-NEXT: daddu $1, $1, $25 |
| 5204 | ; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_8))) |
| 5205 | ; MIPS64EL-NEXT: lui $1, 10 |
| 5206 | ; MIPS64EL-NEXT: daddiu $1, $1, 9 |
| 5207 | ; MIPS64EL-NEXT: dsll $1, $1, 16 |
| 5208 | ; MIPS64EL-NEXT: daddiu $1, $1, 7 |
| 5209 | ; MIPS64EL-NEXT: dsll $1, $1, 16 |
| 5210 | ; MIPS64EL-NEXT: daddiu $4, $1, 6 |
| 5211 | ; MIPS64EL-NEXT: lui $1, 1 |
| 5212 | ; MIPS64EL-NEXT: daddiu $1, $1, 16385 |
| 5213 | ; MIPS64EL-NEXT: dsll $1, $1, 16 |
| 5214 | ; MIPS64EL-NEXT: daddiu $1, $1, 8193 |
| 5215 | ; MIPS64EL-NEXT: dsll $1, $1, 19 |
| 5216 | ; MIPS64EL-NEXT: daddiu $7, $1, 12 |
| 5217 | ; MIPS64EL-NEXT: ld $25, %call16(i16_8)($gp) |
| 5218 | ; MIPS64EL-NEXT: move $5, $4 |
| 5219 | ; MIPS64EL-NEXT: move $6, $4 |
| 5220 | ; MIPS64EL-NEXT: jalr $25 |
| 5221 | ; MIPS64EL-NEXT: nop |
| 5222 | ; MIPS64EL-NEXT: ld $1, %got_disp(gv8i16)($gp) |
| 5223 | ; MIPS64EL-NEXT: sd $3, 8($1) |
| 5224 | ; MIPS64EL-NEXT: sd $2, 0($1) |
| 5225 | ; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 5226 | ; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 5227 | ; MIPS64EL-NEXT: daddiu $sp, $sp, 16 |
| 5228 | ; MIPS64EL-NEXT: jr $ra |
| 5229 | ; MIPS64EL-NEXT: nop |
| 5230 | ; |
| 5231 | ; MIPS32R5EL-LABEL: calli16_8: |
| 5232 | ; MIPS32R5EL: # %bb.0: # %entry |
| 5233 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, -40 |
| 5234 | ; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 40 |
| 5235 | ; MIPS32R5EL-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill |
| 5236 | ; MIPS32R5EL-NEXT: .cfi_offset 31, -4 |
| 5237 | ; MIPS32R5EL-NEXT: lui $1, 10 |
| 5238 | ; MIPS32R5EL-NEXT: ori $1, $1, 9 |
| 5239 | ; MIPS32R5EL-NEXT: lui $2, 7 |
| 5240 | ; MIPS32R5EL-NEXT: ori $2, $2, 6 |
| 5241 | ; MIPS32R5EL-NEXT: fill.w $w0, $2 |
| 5242 | ; MIPS32R5EL-NEXT: insert.w $w0[1], $1 |
| 5243 | ; MIPS32R5EL-NEXT: splati.d $w0, $w0[0] |
| 5244 | ; MIPS32R5EL-NEXT: copy_s.w $4, $w0[0] |
| 5245 | ; MIPS32R5EL-NEXT: copy_s.w $5, $w0[1] |
| 5246 | ; MIPS32R5EL-NEXT: copy_s.w $6, $w0[2] |
| 5247 | ; MIPS32R5EL-NEXT: copy_s.w $7, $w0[3] |
| 5248 | ; MIPS32R5EL-NEXT: lui $1, %hi($CPI33_0) |
| 5249 | ; MIPS32R5EL-NEXT: addiu $1, $1, %lo($CPI33_0) |
| 5250 | ; MIPS32R5EL-NEXT: ld.w $w0, 0($1) |
| 5251 | ; MIPS32R5EL-NEXT: copy_s.w $1, $w0[0] |
| 5252 | ; MIPS32R5EL-NEXT: copy_s.w $2, $w0[1] |
| 5253 | ; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] |
| 5254 | ; MIPS32R5EL-NEXT: copy_s.w $8, $w0[3] |
| 5255 | ; MIPS32R5EL-NEXT: sw $8, 28($sp) |
| 5256 | ; MIPS32R5EL-NEXT: sw $3, 24($sp) |
| 5257 | ; MIPS32R5EL-NEXT: sw $2, 20($sp) |
| 5258 | ; MIPS32R5EL-NEXT: sw $1, 16($sp) |
| 5259 | ; MIPS32R5EL-NEXT: jal i16_8 |
| 5260 | ; MIPS32R5EL-NEXT: nop |
| 5261 | ; MIPS32R5EL-NEXT: lui $1, %hi(gv8i16) |
| 5262 | ; MIPS32R5EL-NEXT: addiu $1, $1, %lo(gv8i16) |
| 5263 | ; MIPS32R5EL-NEXT: ldi.b $w0, 0 |
| 5264 | ; MIPS32R5EL-NEXT: insert.w $w0[0], $2 |
| 5265 | ; MIPS32R5EL-NEXT: insert.w $w0[1], $3 |
| 5266 | ; MIPS32R5EL-NEXT: insert.w $w0[2], $4 |
| 5267 | ; MIPS32R5EL-NEXT: insert.w $w0[3], $5 |
| 5268 | ; MIPS32R5EL-NEXT: st.w $w0, 0($1) |
| 5269 | ; MIPS32R5EL-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload |
| 5270 | ; MIPS32R5EL-NEXT: addiu $sp, $sp, 40 |
| 5271 | ; MIPS32R5EL-NEXT: jr $ra |
| 5272 | ; MIPS32R5EL-NEXT: nop |
| 5273 | ; |
| 5274 | ; MIPS64R5EL-LABEL: calli16_8: |
| 5275 | ; MIPS64R5EL: # %bb.0: # %entry |
| 5276 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, -16 |
| 5277 | ; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 16 |
| 5278 | ; MIPS64R5EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 5279 | ; MIPS64R5EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 5280 | ; MIPS64R5EL-NEXT: .cfi_offset 31, -8 |
| 5281 | ; MIPS64R5EL-NEXT: .cfi_offset 28, -16 |
| 5282 | ; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_8))) |
| 5283 | ; MIPS64R5EL-NEXT: daddu $1, $1, $25 |
| 5284 | ; MIPS64R5EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_8))) |
| 5285 | ; MIPS64R5EL-NEXT: lui $1, 7 |
| 5286 | ; MIPS64R5EL-NEXT: ori $1, $1, 6 |
| 5287 | ; MIPS64R5EL-NEXT: lui $2, 10 |
| 5288 | ; MIPS64R5EL-NEXT: ori $2, $2, 9 |
| 5289 | ; MIPS64R5EL-NEXT: dinsu $1, $2, 32, 32 |
| 5290 | ; MIPS64R5EL-NEXT: fill.d $w0, $1 |
| 5291 | ; MIPS64R5EL-NEXT: copy_s.d $4, $w0[0] |
| 5292 | ; MIPS64R5EL-NEXT: copy_s.d $5, $w0[1] |
| 5293 | ; MIPS64R5EL-NEXT: ld $1, %got_page(.LCPI33_0)($gp) |
| 5294 | ; MIPS64R5EL-NEXT: daddiu $1, $1, %got_ofst(.LCPI33_0) |
| 5295 | ; MIPS64R5EL-NEXT: ld.d $w0, 0($1) |
| 5296 | ; MIPS64R5EL-NEXT: copy_s.d $6, $w0[0] |
| 5297 | ; MIPS64R5EL-NEXT: copy_s.d $7, $w0[1] |
| 5298 | ; MIPS64R5EL-NEXT: ld $25, %call16(i16_8)($gp) |
| 5299 | ; MIPS64R5EL-NEXT: jalr $25 |
| 5300 | ; MIPS64R5EL-NEXT: nop |
| 5301 | ; MIPS64R5EL-NEXT: ldi.b $w0, 0 |
| 5302 | ; MIPS64R5EL-NEXT: ld $1, %got_disp(gv8i16)($gp) |
| 5303 | ; MIPS64R5EL-NEXT: insert.d $w0[0], $2 |
| 5304 | ; MIPS64R5EL-NEXT: insert.d $w0[1], $3 |
| 5305 | ; MIPS64R5EL-NEXT: st.d $w0, 0($1) |
| 5306 | ; MIPS64R5EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 5307 | ; MIPS64R5EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 5308 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, 16 |
| 5309 | ; MIPS64R5EL-NEXT: jr $ra |
| 5310 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 5311 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 5312 | %0 = call <8 x i16> @i16_8(<8 x i16> <i16 6, i16 7, i16 9, i16 10, i16 6, i16 7, i16 9, i16 10>, <8 x i16> <i16 6, i16 7, i16 9, i16 10, i16 12, i16 8, i16 9, i16 10>) |
| 5313 | store <8 x i16> %0, <8 x i16> * @gv8i16 |
| 5314 | ret void |
| 5315 | } |
| 5316 | |
| 5317 | define void @calli32_2() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 5318 | ; MIPS32-LABEL: calli32_2: |
| 5319 | ; MIPS32: # %bb.0: # %entry |
| 5320 | ; MIPS32-NEXT: addiu $sp, $sp, -24 |
| 5321 | ; MIPS32-NEXT: .cfi_def_cfa_offset 24 |
| 5322 | ; MIPS32-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 5323 | ; MIPS32-NEXT: .cfi_offset 31, -4 |
| 5324 | ; MIPS32-NEXT: addiu $4, $zero, 6 |
| 5325 | ; MIPS32-NEXT: addiu $5, $zero, 7 |
| 5326 | ; MIPS32-NEXT: addiu $6, $zero, 12 |
| 5327 | ; MIPS32-NEXT: addiu $7, $zero, 8 |
| 5328 | ; MIPS32-NEXT: jal i32_2 |
| 5329 | ; MIPS32-NEXT: nop |
| 5330 | ; MIPS32-NEXT: lui $1, %hi(gv2i32) |
| 5331 | ; MIPS32-NEXT: addiu $4, $1, %lo(gv2i32) |
| 5332 | ; MIPS32-NEXT: sw $3, 4($4) |
| 5333 | ; MIPS32-NEXT: sw $2, %lo(gv2i32)($1) |
| 5334 | ; MIPS32-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 5335 | ; MIPS32-NEXT: addiu $sp, $sp, 24 |
| 5336 | ; MIPS32-NEXT: jr $ra |
| 5337 | ; MIPS32-NEXT: nop |
| 5338 | ; |
| 5339 | ; MIPS64EB-LABEL: calli32_2: |
| 5340 | ; MIPS64EB: # %bb.0: # %entry |
| 5341 | ; MIPS64EB-NEXT: daddiu $sp, $sp, -16 |
| 5342 | ; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 |
| 5343 | ; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 5344 | ; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 5345 | ; MIPS64EB-NEXT: .cfi_offset 31, -8 |
| 5346 | ; MIPS64EB-NEXT: .cfi_offset 28, -16 |
| 5347 | ; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli32_2))) |
| 5348 | ; MIPS64EB-NEXT: daddu $1, $1, $25 |
| 5349 | ; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli32_2))) |
| 5350 | ; MIPS64EB-NEXT: daddiu $1, $zero, 3 |
| 5351 | ; MIPS64EB-NEXT: dsll $2, $1, 33 |
| 5352 | ; MIPS64EB-NEXT: daddiu $4, $2, 7 |
| 5353 | ; MIPS64EB-NEXT: dsll $1, $1, 34 |
| 5354 | ; MIPS64EB-NEXT: daddiu $5, $1, 8 |
| 5355 | ; MIPS64EB-NEXT: ld $25, %call16(i32_2)($gp) |
| 5356 | ; MIPS64EB-NEXT: jalr $25 |
| 5357 | ; MIPS64EB-NEXT: nop |
| 5358 | ; MIPS64EB-NEXT: ld $1, %got_disp(gv2i32)($gp) |
| 5359 | ; MIPS64EB-NEXT: sd $2, 0($1) |
| 5360 | ; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 5361 | ; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 5362 | ; MIPS64EB-NEXT: daddiu $sp, $sp, 16 |
| 5363 | ; MIPS64EB-NEXT: jr $ra |
| 5364 | ; MIPS64EB-NEXT: nop |
| 5365 | ; |
| 5366 | ; MIPS32R5-LABEL: calli32_2: |
| 5367 | ; MIPS32R5: # %bb.0: # %entry |
| 5368 | ; MIPS32R5-NEXT: addiu $sp, $sp, -24 |
| 5369 | ; MIPS32R5-NEXT: .cfi_def_cfa_offset 24 |
| 5370 | ; MIPS32R5-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill |
| 5371 | ; MIPS32R5-NEXT: .cfi_offset 31, -4 |
| 5372 | ; MIPS32R5-NEXT: addiu $4, $zero, 6 |
| 5373 | ; MIPS32R5-NEXT: addiu $5, $zero, 7 |
| 5374 | ; MIPS32R5-NEXT: addiu $6, $zero, 12 |
| 5375 | ; MIPS32R5-NEXT: addiu $7, $zero, 8 |
| 5376 | ; MIPS32R5-NEXT: jal i32_2 |
| 5377 | ; MIPS32R5-NEXT: nop |
| 5378 | ; MIPS32R5-NEXT: lui $1, %hi(gv2i32) |
| 5379 | ; MIPS32R5-NEXT: addiu $4, $1, %lo(gv2i32) |
| 5380 | ; MIPS32R5-NEXT: sw $3, 4($4) |
| 5381 | ; MIPS32R5-NEXT: sw $2, %lo(gv2i32)($1) |
| 5382 | ; MIPS32R5-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload |
| 5383 | ; MIPS32R5-NEXT: addiu $sp, $sp, 24 |
| 5384 | ; MIPS32R5-NEXT: jr $ra |
| 5385 | ; MIPS32R5-NEXT: nop |
| 5386 | ; |
| 5387 | ; MIPS64R5EB-LABEL: calli32_2: |
| 5388 | ; MIPS64R5EB: # %bb.0: # %entry |
| 5389 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, -32 |
| 5390 | ; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 32 |
| 5391 | ; MIPS64R5EB-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill |
| 5392 | ; MIPS64R5EB-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill |
| 5393 | ; MIPS64R5EB-NEXT: .cfi_offset 31, -8 |
| 5394 | ; MIPS64R5EB-NEXT: .cfi_offset 28, -16 |
| 5395 | ; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli32_2))) |
| 5396 | ; MIPS64R5EB-NEXT: daddu $1, $1, $25 |
| 5397 | ; MIPS64R5EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli32_2))) |
| 5398 | ; MIPS64R5EB-NEXT: daddiu $1, $zero, 3 |
| 5399 | ; MIPS64R5EB-NEXT: dsll $2, $1, 33 |
| 5400 | ; MIPS64R5EB-NEXT: daddiu $4, $2, 7 |
| 5401 | ; MIPS64R5EB-NEXT: dsll $1, $1, 34 |
| 5402 | ; MIPS64R5EB-NEXT: daddiu $5, $1, 8 |
| 5403 | ; MIPS64R5EB-NEXT: ld $25, %call16(i32_2)($gp) |
| 5404 | ; MIPS64R5EB-NEXT: jalr $25 |
| 5405 | ; MIPS64R5EB-NEXT: nop |
| 5406 | ; MIPS64R5EB-NEXT: ld $1, %got_disp(gv2i32)($gp) |
| 5407 | ; MIPS64R5EB-NEXT: sd $2, 0($1) |
| 5408 | ; MIPS64R5EB-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload |
| 5409 | ; MIPS64R5EB-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload |
| 5410 | ; MIPS64R5EB-NEXT: daddiu $sp, $sp, 32 |
| 5411 | ; MIPS64R5EB-NEXT: jr $ra |
| 5412 | ; MIPS64R5EB-NEXT: nop |
| 5413 | ; |
| 5414 | ; MIPS64EL-LABEL: calli32_2: |
| 5415 | ; MIPS64EL: # %bb.0: # %entry |
| 5416 | ; MIPS64EL-NEXT: daddiu $sp, $sp, -16 |
| 5417 | ; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 |
| 5418 | ; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 5419 | ; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 5420 | ; MIPS64EL-NEXT: .cfi_offset 31, -8 |
| 5421 | ; MIPS64EL-NEXT: .cfi_offset 28, -16 |
| 5422 | ; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli32_2))) |
| 5423 | ; MIPS64EL-NEXT: daddu $1, $1, $25 |
| 5424 | ; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli32_2))) |
| 5425 | ; MIPS64EL-NEXT: daddiu $1, $zero, 7 |
| 5426 | ; MIPS64EL-NEXT: dsll $1, $1, 32 |
| 5427 | ; MIPS64EL-NEXT: daddiu $4, $1, 6 |
| 5428 | ; MIPS64EL-NEXT: daddiu $1, $zero, 1 |
| 5429 | ; MIPS64EL-NEXT: dsll $1, $1, 35 |
| 5430 | ; MIPS64EL-NEXT: daddiu $5, $1, 12 |
| 5431 | ; MIPS64EL-NEXT: ld $25, %call16(i32_2)($gp) |
| 5432 | ; MIPS64EL-NEXT: jalr $25 |
| 5433 | ; MIPS64EL-NEXT: nop |
| 5434 | ; MIPS64EL-NEXT: ld $1, %got_disp(gv2i32)($gp) |
| 5435 | ; MIPS64EL-NEXT: sd $2, 0($1) |
| 5436 | ; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 5437 | ; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 5438 | ; MIPS64EL-NEXT: daddiu $sp, $sp, 16 |
| 5439 | ; MIPS64EL-NEXT: jr $ra |
| 5440 | ; MIPS64EL-NEXT: nop |
| 5441 | ; |
| 5442 | ; MIPS64R5EL-LABEL: calli32_2: |
| 5443 | ; MIPS64R5EL: # %bb.0: # %entry |
| 5444 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, -32 |
| 5445 | ; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 32 |
| 5446 | ; MIPS64R5EL-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill |
| 5447 | ; MIPS64R5EL-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill |
| 5448 | ; MIPS64R5EL-NEXT: .cfi_offset 31, -8 |
| 5449 | ; MIPS64R5EL-NEXT: .cfi_offset 28, -16 |
| 5450 | ; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli32_2))) |
| 5451 | ; MIPS64R5EL-NEXT: daddu $1, $1, $25 |
| 5452 | ; MIPS64R5EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli32_2))) |
| 5453 | ; MIPS64R5EL-NEXT: daddiu $1, $zero, 7 |
| 5454 | ; MIPS64R5EL-NEXT: dsll $1, $1, 32 |
| 5455 | ; MIPS64R5EL-NEXT: daddiu $4, $1, 6 |
| 5456 | ; MIPS64R5EL-NEXT: daddiu $1, $zero, 1 |
| 5457 | ; MIPS64R5EL-NEXT: dsll $1, $1, 35 |
| 5458 | ; MIPS64R5EL-NEXT: daddiu $5, $1, 12 |
| 5459 | ; MIPS64R5EL-NEXT: ld $25, %call16(i32_2)($gp) |
| 5460 | ; MIPS64R5EL-NEXT: jalr $25 |
| 5461 | ; MIPS64R5EL-NEXT: nop |
| 5462 | ; MIPS64R5EL-NEXT: ld $1, %got_disp(gv2i32)($gp) |
| 5463 | ; MIPS64R5EL-NEXT: sd $2, 0($1) |
| 5464 | ; MIPS64R5EL-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload |
| 5465 | ; MIPS64R5EL-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload |
| 5466 | ; MIPS64R5EL-NEXT: daddiu $sp, $sp, 32 |
| 5467 | ; MIPS64R5EL-NEXT: jr $ra |
| 5468 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 5469 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 5470 | %0 = call <2 x i32> @i32_2(<2 x i32> <i32 6, i32 7>, <2 x i32> <i32 12, i32 8>) |
| 5471 | store <2 x i32> %0, <2 x i32> * @gv2i32 |
| 5472 | ret void |
| 5473 | } |
| 5474 | |
| 5475 | define void @calli32_4() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 5476 | ; MIPS32-LABEL: calli32_4: |
| 5477 | ; MIPS32: # %bb.0: # %entry |
| 5478 | ; MIPS32-NEXT: addiu $sp, $sp, -40 |
| 5479 | ; MIPS32-NEXT: .cfi_def_cfa_offset 40 |
| 5480 | ; MIPS32-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill |
| 5481 | ; MIPS32-NEXT: .cfi_offset 31, -4 |
| 5482 | ; MIPS32-NEXT: addiu $1, $zero, 9 |
| 5483 | ; MIPS32-NEXT: addiu $2, $zero, 10 |
| 5484 | ; MIPS32-NEXT: sw $2, 28($sp) |
| 5485 | ; MIPS32-NEXT: sw $1, 24($sp) |
| 5486 | ; MIPS32-NEXT: addiu $1, $zero, 8 |
| 5487 | ; MIPS32-NEXT: sw $1, 20($sp) |
| 5488 | ; MIPS32-NEXT: addiu $1, $zero, 12 |
| 5489 | ; MIPS32-NEXT: sw $1, 16($sp) |
| 5490 | ; MIPS32-NEXT: addiu $4, $zero, 6 |
| 5491 | ; MIPS32-NEXT: addiu $5, $zero, 7 |
| 5492 | ; MIPS32-NEXT: addiu $6, $zero, 9 |
| 5493 | ; MIPS32-NEXT: addiu $7, $zero, 10 |
| 5494 | ; MIPS32-NEXT: jal i32_4 |
| 5495 | ; MIPS32-NEXT: nop |
| 5496 | ; MIPS32-NEXT: lui $1, %hi(gv4i32) |
| 5497 | ; MIPS32-NEXT: addiu $6, $1, %lo(gv4i32) |
| 5498 | ; MIPS32-NEXT: sw $5, 12($6) |
| 5499 | ; MIPS32-NEXT: sw $4, 8($6) |
| 5500 | ; MIPS32-NEXT: sw $3, 4($6) |
| 5501 | ; MIPS32-NEXT: sw $2, %lo(gv4i32)($1) |
| 5502 | ; MIPS32-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload |
| 5503 | ; MIPS32-NEXT: addiu $sp, $sp, 40 |
| 5504 | ; MIPS32-NEXT: jr $ra |
| 5505 | ; MIPS32-NEXT: nop |
| 5506 | ; |
| 5507 | ; MIPS64EB-LABEL: calli32_4: |
| 5508 | ; MIPS64EB: # %bb.0: # %entry |
| 5509 | ; MIPS64EB-NEXT: daddiu $sp, $sp, -16 |
| 5510 | ; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 |
| 5511 | ; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 5512 | ; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 5513 | ; MIPS64EB-NEXT: .cfi_offset 31, -8 |
| 5514 | ; MIPS64EB-NEXT: .cfi_offset 28, -16 |
| 5515 | ; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli32_4))) |
| 5516 | ; MIPS64EB-NEXT: daddu $1, $1, $25 |
| 5517 | ; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli32_4))) |
| 5518 | ; MIPS64EB-NEXT: daddiu $1, $zero, 3 |
| 5519 | ; MIPS64EB-NEXT: dsll $2, $1, 33 |
| 5520 | ; MIPS64EB-NEXT: daddiu $4, $2, 7 |
| 5521 | ; MIPS64EB-NEXT: dsll $1, $1, 34 |
| 5522 | ; MIPS64EB-NEXT: daddiu $6, $1, 8 |
| 5523 | ; MIPS64EB-NEXT: daddiu $1, $zero, 9 |
| 5524 | ; MIPS64EB-NEXT: dsll $1, $1, 32 |
| 5525 | ; MIPS64EB-NEXT: daddiu $5, $1, 10 |
| 5526 | ; MIPS64EB-NEXT: ld $25, %call16(i32_4)($gp) |
| 5527 | ; MIPS64EB-NEXT: move $7, $5 |
| 5528 | ; MIPS64EB-NEXT: jalr $25 |
| 5529 | ; MIPS64EB-NEXT: nop |
| 5530 | ; MIPS64EB-NEXT: ld $1, %got_disp(gv4i32)($gp) |
| 5531 | ; MIPS64EB-NEXT: sd $3, 8($1) |
| 5532 | ; MIPS64EB-NEXT: sd $2, 0($1) |
| 5533 | ; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 5534 | ; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 5535 | ; MIPS64EB-NEXT: daddiu $sp, $sp, 16 |
| 5536 | ; MIPS64EB-NEXT: jr $ra |
| 5537 | ; MIPS64EB-NEXT: nop |
| 5538 | ; |
| 5539 | ; MIPS32R5-LABEL: calli32_4: |
| 5540 | ; MIPS32R5: # %bb.0: # %entry |
| 5541 | ; MIPS32R5-NEXT: addiu $sp, $sp, -40 |
| 5542 | ; MIPS32R5-NEXT: .cfi_def_cfa_offset 40 |
| 5543 | ; MIPS32R5-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill |
| 5544 | ; MIPS32R5-NEXT: .cfi_offset 31, -4 |
| 5545 | ; MIPS32R5-NEXT: addiu $1, $zero, 9 |
| 5546 | ; MIPS32R5-NEXT: addiu $2, $zero, 10 |
| 5547 | ; MIPS32R5-NEXT: sw $2, 28($sp) |
| 5548 | ; MIPS32R5-NEXT: sw $1, 24($sp) |
| 5549 | ; MIPS32R5-NEXT: addiu $1, $zero, 8 |
| 5550 | ; MIPS32R5-NEXT: sw $1, 20($sp) |
| 5551 | ; MIPS32R5-NEXT: addiu $1, $zero, 12 |
| 5552 | ; MIPS32R5-NEXT: sw $1, 16($sp) |
| 5553 | ; MIPS32R5-NEXT: addiu $4, $zero, 6 |
| 5554 | ; MIPS32R5-NEXT: addiu $5, $zero, 7 |
| 5555 | ; MIPS32R5-NEXT: addiu $6, $zero, 9 |
| 5556 | ; MIPS32R5-NEXT: addiu $7, $zero, 10 |
| 5557 | ; MIPS32R5-NEXT: jal i32_4 |
| 5558 | ; MIPS32R5-NEXT: nop |
| 5559 | ; MIPS32R5-NEXT: ldi.b $w0, 0 |
| 5560 | ; MIPS32R5-NEXT: insert.w $w0[0], $2 |
| 5561 | ; MIPS32R5-NEXT: insert.w $w0[1], $3 |
| 5562 | ; MIPS32R5-NEXT: insert.w $w0[2], $4 |
| 5563 | ; MIPS32R5-NEXT: lui $1, %hi(gv4i32) |
| 5564 | ; MIPS32R5-NEXT: insert.w $w0[3], $5 |
| 5565 | ; MIPS32R5-NEXT: addiu $1, $1, %lo(gv4i32) |
| 5566 | ; MIPS32R5-NEXT: st.w $w0, 0($1) |
| 5567 | ; MIPS32R5-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload |
| 5568 | ; MIPS32R5-NEXT: addiu $sp, $sp, 40 |
| 5569 | ; MIPS32R5-NEXT: jr $ra |
| 5570 | ; MIPS32R5-NEXT: nop |
| 5571 | ; |
| 5572 | ; MIPS64R5-LABEL: calli32_4: |
| 5573 | ; MIPS64R5: # %bb.0: # %entry |
| 5574 | ; MIPS64R5-NEXT: daddiu $sp, $sp, -16 |
| 5575 | ; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 |
| 5576 | ; MIPS64R5-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 5577 | ; MIPS64R5-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 5578 | ; MIPS64R5-NEXT: .cfi_offset 31, -8 |
| 5579 | ; MIPS64R5-NEXT: .cfi_offset 28, -16 |
| 5580 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(calli32_4))) |
| 5581 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 5582 | ; MIPS64R5-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli32_4))) |
| 5583 | ; MIPS64R5-NEXT: ld $1, %got_page(.LCPI35_0)($gp) |
| 5584 | ; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI35_0) |
| 5585 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 5586 | ; MIPS64R5-NEXT: copy_s.d $4, $w0[0] |
| 5587 | ; MIPS64R5-NEXT: copy_s.d $5, $w0[1] |
| 5588 | ; MIPS64R5-NEXT: ld $1, %got_page(.LCPI35_1)($gp) |
| 5589 | ; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI35_1) |
| 5590 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 5591 | ; MIPS64R5-NEXT: copy_s.d $6, $w0[0] |
| 5592 | ; MIPS64R5-NEXT: copy_s.d $7, $w0[1] |
| 5593 | ; MIPS64R5-NEXT: ld $25, %call16(i32_4)($gp) |
| 5594 | ; MIPS64R5-NEXT: jalr $25 |
| 5595 | ; MIPS64R5-NEXT: nop |
| 5596 | ; MIPS64R5-NEXT: ldi.b $w0, 0 |
| 5597 | ; MIPS64R5-NEXT: insert.d $w0[0], $2 |
| 5598 | ; MIPS64R5-NEXT: insert.d $w0[1], $3 |
| 5599 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv4i32)($gp) |
| 5600 | ; MIPS64R5-NEXT: st.d $w0, 0($1) |
| 5601 | ; MIPS64R5-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 5602 | ; MIPS64R5-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 5603 | ; MIPS64R5-NEXT: daddiu $sp, $sp, 16 |
| 5604 | ; MIPS64R5-NEXT: jr $ra |
| 5605 | ; MIPS64R5-NEXT: nop |
| 5606 | ; |
| 5607 | ; MIPS64EL-LABEL: calli32_4: |
| 5608 | ; MIPS64EL: # %bb.0: # %entry |
| 5609 | ; MIPS64EL-NEXT: daddiu $sp, $sp, -16 |
| 5610 | ; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 |
| 5611 | ; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 5612 | ; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 5613 | ; MIPS64EL-NEXT: .cfi_offset 31, -8 |
| 5614 | ; MIPS64EL-NEXT: .cfi_offset 28, -16 |
| 5615 | ; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli32_4))) |
| 5616 | ; MIPS64EL-NEXT: daddu $1, $1, $25 |
| 5617 | ; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli32_4))) |
| 5618 | ; MIPS64EL-NEXT: daddiu $1, $zero, 7 |
| 5619 | ; MIPS64EL-NEXT: dsll $1, $1, 32 |
| 5620 | ; MIPS64EL-NEXT: daddiu $4, $1, 6 |
| 5621 | ; MIPS64EL-NEXT: daddiu $1, $zero, 1 |
| 5622 | ; MIPS64EL-NEXT: dsll $1, $1, 35 |
| 5623 | ; MIPS64EL-NEXT: daddiu $6, $1, 12 |
| 5624 | ; MIPS64EL-NEXT: daddiu $1, $zero, 5 |
| 5625 | ; MIPS64EL-NEXT: dsll $1, $1, 33 |
| 5626 | ; MIPS64EL-NEXT: daddiu $5, $1, 9 |
| 5627 | ; MIPS64EL-NEXT: ld $25, %call16(i32_4)($gp) |
| 5628 | ; MIPS64EL-NEXT: move $7, $5 |
| 5629 | ; MIPS64EL-NEXT: jalr $25 |
| 5630 | ; MIPS64EL-NEXT: nop |
| 5631 | ; MIPS64EL-NEXT: ld $1, %got_disp(gv4i32)($gp) |
| 5632 | ; MIPS64EL-NEXT: sd $3, 8($1) |
| 5633 | ; MIPS64EL-NEXT: sd $2, 0($1) |
| 5634 | ; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 5635 | ; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 5636 | ; MIPS64EL-NEXT: daddiu $sp, $sp, 16 |
| 5637 | ; MIPS64EL-NEXT: jr $ra |
| 5638 | ; MIPS64EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 5639 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 5640 | %0 = call <4 x i32> @i32_4(<4 x i32> <i32 6, i32 7, i32 9, i32 10>, <4 x i32> <i32 12, i32 8, i32 9, i32 10>) |
| 5641 | store <4 x i32> %0, <4 x i32> * @gv4i32 |
| 5642 | ret void |
| 5643 | } |
| 5644 | |
| 5645 | define void @calli64_2() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 5646 | ; MIPS32EB-LABEL: calli64_2: |
| 5647 | ; MIPS32EB: # %bb.0: # %entry |
| 5648 | ; MIPS32EB-NEXT: addiu $sp, $sp, -40 |
| 5649 | ; MIPS32EB-NEXT: .cfi_def_cfa_offset 40 |
| 5650 | ; MIPS32EB-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill |
| 5651 | ; MIPS32EB-NEXT: .cfi_offset 31, -4 |
| 5652 | ; MIPS32EB-NEXT: addiu $1, $zero, 8 |
| 5653 | ; MIPS32EB-NEXT: sw $1, 28($sp) |
| 5654 | ; MIPS32EB-NEXT: addiu $1, $zero, 12 |
| 5655 | ; MIPS32EB-NEXT: sw $1, 20($sp) |
| 5656 | ; MIPS32EB-NEXT: sw $zero, 24($sp) |
| 5657 | ; MIPS32EB-NEXT: sw $zero, 16($sp) |
| 5658 | ; MIPS32EB-NEXT: addiu $4, $zero, 0 |
| 5659 | ; MIPS32EB-NEXT: addiu $5, $zero, 6 |
| 5660 | ; MIPS32EB-NEXT: addiu $6, $zero, 0 |
| 5661 | ; MIPS32EB-NEXT: addiu $7, $zero, 7 |
| 5662 | ; MIPS32EB-NEXT: jal i64_2 |
| 5663 | ; MIPS32EB-NEXT: nop |
| 5664 | ; MIPS32EB-NEXT: lui $1, %hi(gv2i64) |
| 5665 | ; MIPS32EB-NEXT: addiu $6, $1, %lo(gv2i64) |
| 5666 | ; MIPS32EB-NEXT: sw $5, 12($6) |
| 5667 | ; MIPS32EB-NEXT: sw $4, 8($6) |
| 5668 | ; MIPS32EB-NEXT: sw $3, 4($6) |
| 5669 | ; MIPS32EB-NEXT: sw $2, %lo(gv2i64)($1) |
| 5670 | ; MIPS32EB-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload |
| 5671 | ; MIPS32EB-NEXT: addiu $sp, $sp, 40 |
| 5672 | ; MIPS32EB-NEXT: jr $ra |
| 5673 | ; MIPS32EB-NEXT: nop |
| 5674 | ; |
| 5675 | ; MIPS64-LABEL: calli64_2: |
| 5676 | ; MIPS64: # %bb.0: # %entry |
| 5677 | ; MIPS64-NEXT: daddiu $sp, $sp, -16 |
| 5678 | ; MIPS64-NEXT: .cfi_def_cfa_offset 16 |
| 5679 | ; MIPS64-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 5680 | ; MIPS64-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 5681 | ; MIPS64-NEXT: .cfi_offset 31, -8 |
| 5682 | ; MIPS64-NEXT: .cfi_offset 28, -16 |
| 5683 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(calli64_2))) |
| 5684 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 5685 | ; MIPS64-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli64_2))) |
| 5686 | ; MIPS64-NEXT: ld $25, %call16(i64_2)($gp) |
| 5687 | ; MIPS64-NEXT: daddiu $4, $zero, 6 |
| 5688 | ; MIPS64-NEXT: daddiu $5, $zero, 7 |
| 5689 | ; MIPS64-NEXT: daddiu $6, $zero, 12 |
| 5690 | ; MIPS64-NEXT: daddiu $7, $zero, 8 |
| 5691 | ; MIPS64-NEXT: jalr $25 |
| 5692 | ; MIPS64-NEXT: nop |
| 5693 | ; MIPS64-NEXT: ld $1, %got_disp(gv2i64)($gp) |
| 5694 | ; MIPS64-NEXT: sd $3, 8($1) |
| 5695 | ; MIPS64-NEXT: sd $2, 0($1) |
| 5696 | ; MIPS64-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 5697 | ; MIPS64-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 5698 | ; MIPS64-NEXT: daddiu $sp, $sp, 16 |
| 5699 | ; MIPS64-NEXT: jr $ra |
| 5700 | ; MIPS64-NEXT: nop |
| 5701 | ; |
| 5702 | ; MIPS32R5-LABEL: calli64_2: |
| 5703 | ; MIPS32R5: # %bb.0: # %entry |
| 5704 | ; MIPS32R5-NEXT: addiu $sp, $sp, -40 |
| 5705 | ; MIPS32R5-NEXT: .cfi_def_cfa_offset 40 |
| 5706 | ; MIPS32R5-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill |
| 5707 | ; MIPS32R5-NEXT: .cfi_offset 31, -4 |
| 5708 | ; MIPS32R5-NEXT: lui $1, %hi($CPI36_0) |
| 5709 | ; MIPS32R5-NEXT: addiu $1, $1, %lo($CPI36_0) |
| 5710 | ; MIPS32R5-NEXT: ld.w $w0, 0($1) |
| 5711 | ; MIPS32R5-NEXT: copy_s.w $4, $w0[0] |
| 5712 | ; MIPS32R5-NEXT: copy_s.w $5, $w0[1] |
| 5713 | ; MIPS32R5-NEXT: copy_s.w $6, $w0[2] |
| 5714 | ; MIPS32R5-NEXT: copy_s.w $7, $w0[3] |
| 5715 | ; MIPS32R5-NEXT: lui $1, %hi($CPI36_1) |
| 5716 | ; MIPS32R5-NEXT: addiu $1, $1, %lo($CPI36_1) |
| 5717 | ; MIPS32R5-NEXT: ld.w $w0, 0($1) |
| 5718 | ; MIPS32R5-NEXT: copy_s.w $1, $w0[0] |
| 5719 | ; MIPS32R5-NEXT: copy_s.w $2, $w0[1] |
| 5720 | ; MIPS32R5-NEXT: copy_s.w $3, $w0[2] |
| 5721 | ; MIPS32R5-NEXT: copy_s.w $8, $w0[3] |
| 5722 | ; MIPS32R5-NEXT: sw $8, 28($sp) |
| 5723 | ; MIPS32R5-NEXT: sw $3, 24($sp) |
| 5724 | ; MIPS32R5-NEXT: sw $2, 20($sp) |
| 5725 | ; MIPS32R5-NEXT: sw $1, 16($sp) |
| 5726 | ; MIPS32R5-NEXT: jal i64_2 |
| 5727 | ; MIPS32R5-NEXT: nop |
| 5728 | ; MIPS32R5-NEXT: ldi.b $w0, 0 |
| 5729 | ; MIPS32R5-NEXT: insert.w $w0[0], $2 |
| 5730 | ; MIPS32R5-NEXT: lui $1, %hi(gv2i64) |
| 5731 | ; MIPS32R5-NEXT: insert.w $w0[1], $3 |
| 5732 | ; MIPS32R5-NEXT: addiu $1, $1, %lo(gv2i64) |
| 5733 | ; MIPS32R5-NEXT: insert.w $w0[2], $4 |
| 5734 | ; MIPS32R5-NEXT: insert.w $w0[3], $5 |
| 5735 | ; MIPS32R5-NEXT: st.w $w0, 0($1) |
| 5736 | ; MIPS32R5-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload |
| 5737 | ; MIPS32R5-NEXT: addiu $sp, $sp, 40 |
| 5738 | ; MIPS32R5-NEXT: jr $ra |
| 5739 | ; MIPS32R5-NEXT: nop |
| 5740 | ; |
| 5741 | ; MIPS64R5-LABEL: calli64_2: |
| 5742 | ; MIPS64R5: # %bb.0: # %entry |
| 5743 | ; MIPS64R5-NEXT: daddiu $sp, $sp, -16 |
| 5744 | ; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 |
| 5745 | ; MIPS64R5-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 5746 | ; MIPS64R5-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 5747 | ; MIPS64R5-NEXT: .cfi_offset 31, -8 |
| 5748 | ; MIPS64R5-NEXT: .cfi_offset 28, -16 |
| 5749 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(calli64_2))) |
| 5750 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 5751 | ; MIPS64R5-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli64_2))) |
| 5752 | ; MIPS64R5-NEXT: ld $25, %call16(i64_2)($gp) |
| 5753 | ; MIPS64R5-NEXT: daddiu $4, $zero, 6 |
| 5754 | ; MIPS64R5-NEXT: daddiu $5, $zero, 7 |
| 5755 | ; MIPS64R5-NEXT: daddiu $6, $zero, 12 |
| 5756 | ; MIPS64R5-NEXT: daddiu $7, $zero, 8 |
| 5757 | ; MIPS64R5-NEXT: jalr $25 |
| 5758 | ; MIPS64R5-NEXT: nop |
| 5759 | ; MIPS64R5-NEXT: ldi.b $w0, 0 |
| 5760 | ; MIPS64R5-NEXT: insert.d $w0[0], $2 |
| 5761 | ; MIPS64R5-NEXT: insert.d $w0[1], $3 |
| 5762 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv2i64)($gp) |
| 5763 | ; MIPS64R5-NEXT: st.d $w0, 0($1) |
| 5764 | ; MIPS64R5-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 5765 | ; MIPS64R5-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 5766 | ; MIPS64R5-NEXT: daddiu $sp, $sp, 16 |
| 5767 | ; MIPS64R5-NEXT: jr $ra |
| 5768 | ; MIPS64R5-NEXT: nop |
| 5769 | ; |
| 5770 | ; MIPS32EL-LABEL: calli64_2: |
| 5771 | ; MIPS32EL: # %bb.0: # %entry |
| 5772 | ; MIPS32EL-NEXT: addiu $sp, $sp, -40 |
| 5773 | ; MIPS32EL-NEXT: .cfi_def_cfa_offset 40 |
| 5774 | ; MIPS32EL-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill |
| 5775 | ; MIPS32EL-NEXT: .cfi_offset 31, -4 |
| 5776 | ; MIPS32EL-NEXT: addiu $1, $zero, 8 |
| 5777 | ; MIPS32EL-NEXT: sw $1, 24($sp) |
| 5778 | ; MIPS32EL-NEXT: addiu $1, $zero, 12 |
| 5779 | ; MIPS32EL-NEXT: sw $1, 16($sp) |
| 5780 | ; MIPS32EL-NEXT: sw $zero, 28($sp) |
| 5781 | ; MIPS32EL-NEXT: sw $zero, 20($sp) |
| 5782 | ; MIPS32EL-NEXT: addiu $4, $zero, 6 |
| 5783 | ; MIPS32EL-NEXT: addiu $5, $zero, 0 |
| 5784 | ; MIPS32EL-NEXT: addiu $6, $zero, 7 |
| 5785 | ; MIPS32EL-NEXT: addiu $7, $zero, 0 |
| 5786 | ; MIPS32EL-NEXT: jal i64_2 |
| 5787 | ; MIPS32EL-NEXT: nop |
| 5788 | ; MIPS32EL-NEXT: lui $1, %hi(gv2i64) |
| 5789 | ; MIPS32EL-NEXT: addiu $6, $1, %lo(gv2i64) |
| 5790 | ; MIPS32EL-NEXT: sw $5, 12($6) |
| 5791 | ; MIPS32EL-NEXT: sw $4, 8($6) |
| 5792 | ; MIPS32EL-NEXT: sw $3, 4($6) |
| 5793 | ; MIPS32EL-NEXT: sw $2, %lo(gv2i64)($1) |
| 5794 | ; MIPS32EL-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload |
| 5795 | ; MIPS32EL-NEXT: addiu $sp, $sp, 40 |
| 5796 | ; MIPS32EL-NEXT: jr $ra |
| 5797 | ; MIPS32EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 5798 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 5799 | %0 = call <2 x i64> @i64_2(<2 x i64> <i64 6, i64 7>, <2 x i64> <i64 12, i64 8>) |
| 5800 | store <2 x i64> %0, <2 x i64> * @gv2i64 |
| 5801 | ret void |
| 5802 | } |
| 5803 | |
| 5804 | declare <2 x float> @float2_extern(<2 x float>, <2 x float>) |
| 5805 | declare <4 x float> @float4_extern(<4 x float>, <4 x float>) |
| 5806 | declare <2 x double> @double2_extern(<2 x double>, <2 x double>) |
| 5807 | |
| 5808 | define void @callfloat_2() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 5809 | ; MIPS32-LABEL: callfloat_2: |
| 5810 | ; MIPS32: # %bb.0: # %entry |
| 5811 | ; MIPS32-NEXT: addiu $sp, $sp, -40 |
| 5812 | ; MIPS32-NEXT: .cfi_def_cfa_offset 40 |
| 5813 | ; MIPS32-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill |
| 5814 | ; MIPS32-NEXT: .cfi_offset 31, -4 |
| 5815 | ; MIPS32-NEXT: lui $1, 16736 |
| 5816 | ; MIPS32-NEXT: sw $1, 20($sp) |
| 5817 | ; MIPS32-NEXT: lui $1, 16704 |
| 5818 | ; MIPS32-NEXT: sw $1, 16($sp) |
| 5819 | ; MIPS32-NEXT: addiu $4, $sp, 24 |
| 5820 | ; MIPS32-NEXT: addiu $6, $zero, 0 |
| 5821 | ; MIPS32-NEXT: lui $7, 49024 |
| 5822 | ; MIPS32-NEXT: jal float2_extern |
| 5823 | ; MIPS32-NEXT: nop |
| 5824 | ; MIPS32-NEXT: lui $1, %hi(gv2f32) |
| 5825 | ; MIPS32-NEXT: addiu $2, $1, %lo(gv2f32) |
| 5826 | ; MIPS32-NEXT: lwc1 $f0, 28($sp) |
| 5827 | ; MIPS32-NEXT: swc1 $f0, 4($2) |
| 5828 | ; MIPS32-NEXT: lwc1 $f0, 24($sp) |
| 5829 | ; MIPS32-NEXT: swc1 $f0, %lo(gv2f32)($1) |
| 5830 | ; MIPS32-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload |
| 5831 | ; MIPS32-NEXT: addiu $sp, $sp, 40 |
| 5832 | ; MIPS32-NEXT: jr $ra |
| 5833 | ; MIPS32-NEXT: nop |
| 5834 | ; |
| 5835 | ; MIPS64EB-LABEL: callfloat_2: |
| 5836 | ; MIPS64EB: # %bb.0: # %entry |
| 5837 | ; MIPS64EB-NEXT: daddiu $sp, $sp, -16 |
| 5838 | ; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 |
| 5839 | ; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 5840 | ; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 5841 | ; MIPS64EB-NEXT: .cfi_offset 31, -8 |
| 5842 | ; MIPS64EB-NEXT: .cfi_offset 28, -16 |
| 5843 | ; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(callfloat_2))) |
| 5844 | ; MIPS64EB-NEXT: daddu $1, $1, $25 |
| 5845 | ; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(callfloat_2))) |
| 5846 | ; MIPS64EB-NEXT: daddiu $1, $zero, 383 |
| 5847 | ; MIPS64EB-NEXT: dsll $4, $1, 23 |
| 5848 | ; MIPS64EB-NEXT: daddiu $1, $zero, 261 |
| 5849 | ; MIPS64EB-NEXT: dsll $1, $1, 33 |
| 5850 | ; MIPS64EB-NEXT: daddiu $1, $1, 523 |
| 5851 | ; MIPS64EB-NEXT: dsll $5, $1, 21 |
| 5852 | ; MIPS64EB-NEXT: ld $25, %call16(float2_extern)($gp) |
| 5853 | ; MIPS64EB-NEXT: jalr $25 |
| 5854 | ; MIPS64EB-NEXT: nop |
| 5855 | ; MIPS64EB-NEXT: ld $1, %got_disp(gv2f32)($gp) |
| 5856 | ; MIPS64EB-NEXT: sd $2, 0($1) |
| 5857 | ; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 5858 | ; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 5859 | ; MIPS64EB-NEXT: daddiu $sp, $sp, 16 |
| 5860 | ; MIPS64EB-NEXT: jr $ra |
| 5861 | ; MIPS64EB-NEXT: nop |
| 5862 | ; |
| 5863 | ; MIPS32R5-LABEL: callfloat_2: |
| 5864 | ; MIPS32R5: # %bb.0: # %entry |
| 5865 | ; MIPS32R5-NEXT: addiu $sp, $sp, -40 |
| 5866 | ; MIPS32R5-NEXT: .cfi_def_cfa_offset 40 |
| 5867 | ; MIPS32R5-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill |
| 5868 | ; MIPS32R5-NEXT: .cfi_offset 31, -4 |
| 5869 | ; MIPS32R5-NEXT: lui $1, 16736 |
| 5870 | ; MIPS32R5-NEXT: sw $1, 20($sp) |
| 5871 | ; MIPS32R5-NEXT: lui $1, 16704 |
| 5872 | ; MIPS32R5-NEXT: sw $1, 16($sp) |
| 5873 | ; MIPS32R5-NEXT: addiu $4, $sp, 24 |
| 5874 | ; MIPS32R5-NEXT: addiu $6, $zero, 0 |
| 5875 | ; MIPS32R5-NEXT: lui $7, 49024 |
| 5876 | ; MIPS32R5-NEXT: jal float2_extern |
| 5877 | ; MIPS32R5-NEXT: nop |
| 5878 | ; MIPS32R5-NEXT: lui $1, %hi(gv2f32) |
| 5879 | ; MIPS32R5-NEXT: addiu $2, $1, %lo(gv2f32) |
| 5880 | ; MIPS32R5-NEXT: lwc1 $f0, 28($sp) |
| 5881 | ; MIPS32R5-NEXT: swc1 $f0, 4($2) |
| 5882 | ; MIPS32R5-NEXT: lwc1 $f0, 24($sp) |
| 5883 | ; MIPS32R5-NEXT: swc1 $f0, %lo(gv2f32)($1) |
| 5884 | ; MIPS32R5-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload |
| 5885 | ; MIPS32R5-NEXT: addiu $sp, $sp, 40 |
| 5886 | ; MIPS32R5-NEXT: jr $ra |
| 5887 | ; MIPS32R5-NEXT: nop |
| 5888 | ; |
| 5889 | ; MIPS64R5-LABEL: callfloat_2: |
| 5890 | ; MIPS64R5: # %bb.0: # %entry |
| 5891 | ; MIPS64R5-NEXT: daddiu $sp, $sp, -16 |
| 5892 | ; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 |
| 5893 | ; MIPS64R5-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 5894 | ; MIPS64R5-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 5895 | ; MIPS64R5-NEXT: .cfi_offset 31, -8 |
| 5896 | ; MIPS64R5-NEXT: .cfi_offset 28, -16 |
| 5897 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(callfloat_2))) |
| 5898 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 5899 | ; MIPS64R5-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(callfloat_2))) |
| 5900 | ; MIPS64R5-NEXT: ld $1, %got_page(.LCPI37_0)($gp) |
| 5901 | ; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI37_0) |
| 5902 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 5903 | ; MIPS64R5-NEXT: copy_s.d $4, $w0[0] |
| 5904 | ; MIPS64R5-NEXT: ld $1, %got_page(.LCPI37_1)($gp) |
| 5905 | ; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI37_1) |
| 5906 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 5907 | ; MIPS64R5-NEXT: copy_s.d $5, $w0[0] |
| 5908 | ; MIPS64R5-NEXT: ld $25, %call16(float2_extern)($gp) |
| 5909 | ; MIPS64R5-NEXT: jalr $25 |
| 5910 | ; MIPS64R5-NEXT: nop |
| 5911 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv2f32)($gp) |
| 5912 | ; MIPS64R5-NEXT: sd $2, 0($1) |
| 5913 | ; MIPS64R5-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 5914 | ; MIPS64R5-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 5915 | ; MIPS64R5-NEXT: daddiu $sp, $sp, 16 |
| 5916 | ; MIPS64R5-NEXT: jr $ra |
| 5917 | ; MIPS64R5-NEXT: nop |
| 5918 | ; |
| 5919 | ; MIPS64EL-LABEL: callfloat_2: |
| 5920 | ; MIPS64EL: # %bb.0: # %entry |
| 5921 | ; MIPS64EL-NEXT: daddiu $sp, $sp, -16 |
| 5922 | ; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 |
| 5923 | ; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 5924 | ; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 5925 | ; MIPS64EL-NEXT: .cfi_offset 31, -8 |
| 5926 | ; MIPS64EL-NEXT: .cfi_offset 28, -16 |
| 5927 | ; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(callfloat_2))) |
| 5928 | ; MIPS64EL-NEXT: daddu $1, $1, $25 |
| 5929 | ; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(callfloat_2))) |
| 5930 | ; MIPS64EL-NEXT: daddiu $1, $zero, 383 |
| 5931 | ; MIPS64EL-NEXT: dsll $4, $1, 55 |
| 5932 | ; MIPS64EL-NEXT: daddiu $1, $zero, 523 |
| 5933 | ; MIPS64EL-NEXT: dsll $1, $1, 31 |
| 5934 | ; MIPS64EL-NEXT: daddiu $1, $1, 261 |
| 5935 | ; MIPS64EL-NEXT: dsll $5, $1, 22 |
| 5936 | ; MIPS64EL-NEXT: ld $25, %call16(float2_extern)($gp) |
| 5937 | ; MIPS64EL-NEXT: jalr $25 |
| 5938 | ; MIPS64EL-NEXT: nop |
| 5939 | ; MIPS64EL-NEXT: ld $1, %got_disp(gv2f32)($gp) |
| 5940 | ; MIPS64EL-NEXT: sd $2, 0($1) |
| 5941 | ; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 5942 | ; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 5943 | ; MIPS64EL-NEXT: daddiu $sp, $sp, 16 |
| 5944 | ; MIPS64EL-NEXT: jr $ra |
| 5945 | ; MIPS64EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 5946 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 5947 | %0 = call <2 x float> @float2_extern(<2 x float> <float 0.0, float -1.0>, <2 x float> <float 12.0, float 14.0>) |
| 5948 | store <2 x float> %0, <2 x float> * @gv2f32 |
| 5949 | ret void |
| 5950 | } |
| 5951 | |
| 5952 | define void @callfloat_4() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 5953 | ; MIPS32-LABEL: callfloat_4: |
| 5954 | ; MIPS32: # %bb.0: # %entry |
| 5955 | ; MIPS32-NEXT: addiu $sp, $sp, -80 |
| 5956 | ; MIPS32-NEXT: .cfi_def_cfa_offset 80 |
| 5957 | ; MIPS32-NEXT: sw $ra, 76($sp) # 4-byte Folded Spill |
| 5958 | ; MIPS32-NEXT: sw $fp, 72($sp) # 4-byte Folded Spill |
| 5959 | ; MIPS32-NEXT: .cfi_offset 31, -4 |
| 5960 | ; MIPS32-NEXT: .cfi_offset 30, -8 |
| 5961 | ; MIPS32-NEXT: move $fp, $sp |
| 5962 | ; MIPS32-NEXT: .cfi_def_cfa_register 30 |
| 5963 | ; MIPS32-NEXT: addiu $1, $zero, -16 |
| 5964 | ; MIPS32-NEXT: and $sp, $sp, $1 |
| 5965 | ; MIPS32-NEXT: lui $1, 16704 |
| 5966 | ; MIPS32-NEXT: lui $2, 16736 |
| 5967 | ; MIPS32-NEXT: lui $3, 16752 |
| 5968 | ; MIPS32-NEXT: lui $4, 16768 |
| 5969 | ; MIPS32-NEXT: sw $4, 36($sp) |
| 5970 | ; MIPS32-NEXT: sw $3, 32($sp) |
| 5971 | ; MIPS32-NEXT: sw $2, 28($sp) |
| 5972 | ; MIPS32-NEXT: sw $1, 24($sp) |
| 5973 | ; MIPS32-NEXT: lui $1, 16512 |
| 5974 | ; MIPS32-NEXT: sw $1, 20($sp) |
| 5975 | ; MIPS32-NEXT: lui $1, 16384 |
| 5976 | ; MIPS32-NEXT: sw $1, 16($sp) |
| 5977 | ; MIPS32-NEXT: addiu $4, $sp, 48 |
| 5978 | ; MIPS32-NEXT: addiu $6, $zero, 0 |
| 5979 | ; MIPS32-NEXT: lui $7, 49024 |
| 5980 | ; MIPS32-NEXT: jal float4_extern |
| 5981 | ; MIPS32-NEXT: nop |
| 5982 | ; MIPS32-NEXT: lui $1, %hi(gv4f32) |
| 5983 | ; MIPS32-NEXT: addiu $2, $1, %lo(gv4f32) |
| 5984 | ; MIPS32-NEXT: lwc1 $f0, 60($sp) |
| 5985 | ; MIPS32-NEXT: swc1 $f0, 12($2) |
| 5986 | ; MIPS32-NEXT: lwc1 $f0, 56($sp) |
| 5987 | ; MIPS32-NEXT: swc1 $f0, 8($2) |
| 5988 | ; MIPS32-NEXT: lwc1 $f0, 52($sp) |
| 5989 | ; MIPS32-NEXT: swc1 $f0, 4($2) |
| 5990 | ; MIPS32-NEXT: lwc1 $f0, 48($sp) |
| 5991 | ; MIPS32-NEXT: swc1 $f0, %lo(gv4f32)($1) |
| 5992 | ; MIPS32-NEXT: move $sp, $fp |
| 5993 | ; MIPS32-NEXT: lw $fp, 72($sp) # 4-byte Folded Reload |
| 5994 | ; MIPS32-NEXT: lw $ra, 76($sp) # 4-byte Folded Reload |
| 5995 | ; MIPS32-NEXT: addiu $sp, $sp, 80 |
| 5996 | ; MIPS32-NEXT: jr $ra |
| 5997 | ; MIPS32-NEXT: nop |
| 5998 | ; |
| 5999 | ; MIPS64EB-LABEL: callfloat_4: |
| 6000 | ; MIPS64EB: # %bb.0: # %entry |
| 6001 | ; MIPS64EB-NEXT: daddiu $sp, $sp, -16 |
| 6002 | ; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 |
| 6003 | ; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 6004 | ; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 6005 | ; MIPS64EB-NEXT: .cfi_offset 31, -8 |
| 6006 | ; MIPS64EB-NEXT: .cfi_offset 28, -16 |
| 6007 | ; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(callfloat_4))) |
| 6008 | ; MIPS64EB-NEXT: daddu $1, $1, $25 |
| 6009 | ; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(callfloat_4))) |
| 6010 | ; MIPS64EB-NEXT: daddiu $1, $zero, 1 |
| 6011 | ; MIPS64EB-NEXT: dsll $1, $1, 39 |
| 6012 | ; MIPS64EB-NEXT: daddiu $1, $1, 129 |
| 6013 | ; MIPS64EB-NEXT: daddiu $2, $zero, 261 |
| 6014 | ; MIPS64EB-NEXT: dsll $2, $2, 33 |
| 6015 | ; MIPS64EB-NEXT: daddiu $3, $zero, 383 |
| 6016 | ; MIPS64EB-NEXT: dsll $4, $3, 23 |
| 6017 | ; MIPS64EB-NEXT: dsll $5, $1, 23 |
| 6018 | ; MIPS64EB-NEXT: daddiu $1, $2, 523 |
| 6019 | ; MIPS64EB-NEXT: dsll $6, $1, 21 |
| 6020 | ; MIPS64EB-NEXT: daddiu $1, $zero, 1047 |
| 6021 | ; MIPS64EB-NEXT: dsll $1, $1, 29 |
| 6022 | ; MIPS64EB-NEXT: daddiu $1, $1, 131 |
| 6023 | ; MIPS64EB-NEXT: dsll $7, $1, 23 |
| 6024 | ; MIPS64EB-NEXT: ld $25, %call16(float4_extern)($gp) |
| 6025 | ; MIPS64EB-NEXT: jalr $25 |
| 6026 | ; MIPS64EB-NEXT: nop |
| 6027 | ; MIPS64EB-NEXT: ld $1, %got_disp(gv4f32)($gp) |
| 6028 | ; MIPS64EB-NEXT: sd $3, 8($1) |
| 6029 | ; MIPS64EB-NEXT: sd $2, 0($1) |
| 6030 | ; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 6031 | ; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 6032 | ; MIPS64EB-NEXT: daddiu $sp, $sp, 16 |
| 6033 | ; MIPS64EB-NEXT: jr $ra |
| 6034 | ; MIPS64EB-NEXT: nop |
| 6035 | ; |
| 6036 | ; MIPS32R5-LABEL: callfloat_4: |
| 6037 | ; MIPS32R5: # %bb.0: # %entry |
| 6038 | ; MIPS32R5-NEXT: addiu $sp, $sp, -80 |
| 6039 | ; MIPS32R5-NEXT: .cfi_def_cfa_offset 80 |
| 6040 | ; MIPS32R5-NEXT: sw $ra, 76($sp) # 4-byte Folded Spill |
| 6041 | ; MIPS32R5-NEXT: sw $fp, 72($sp) # 4-byte Folded Spill |
| 6042 | ; MIPS32R5-NEXT: .cfi_offset 31, -4 |
| 6043 | ; MIPS32R5-NEXT: .cfi_offset 30, -8 |
| 6044 | ; MIPS32R5-NEXT: move $fp, $sp |
| 6045 | ; MIPS32R5-NEXT: .cfi_def_cfa_register 30 |
| 6046 | ; MIPS32R5-NEXT: addiu $1, $zero, -16 |
| 6047 | ; MIPS32R5-NEXT: and $sp, $sp, $1 |
| 6048 | ; MIPS32R5-NEXT: lui $1, %hi($CPI38_0) |
| 6049 | ; MIPS32R5-NEXT: addiu $1, $1, %lo($CPI38_0) |
| 6050 | ; MIPS32R5-NEXT: ld.w $w0, 0($1) |
| 6051 | ; MIPS32R5-NEXT: copy_s.w $6, $w0[0] |
| 6052 | ; MIPS32R5-NEXT: copy_s.w $7, $w0[1] |
| 6053 | ; MIPS32R5-NEXT: copy_s.w $1, $w0[2] |
| 6054 | ; MIPS32R5-NEXT: copy_s.w $2, $w0[3] |
| 6055 | ; MIPS32R5-NEXT: lui $3, %hi($CPI38_1) |
| 6056 | ; MIPS32R5-NEXT: addiu $3, $3, %lo($CPI38_1) |
| 6057 | ; MIPS32R5-NEXT: ld.w $w0, 0($3) |
| 6058 | ; MIPS32R5-NEXT: copy_s.w $3, $w0[0] |
| 6059 | ; MIPS32R5-NEXT: copy_s.w $4, $w0[1] |
| 6060 | ; MIPS32R5-NEXT: copy_s.w $5, $w0[2] |
| 6061 | ; MIPS32R5-NEXT: copy_s.w $8, $w0[3] |
| 6062 | ; MIPS32R5-NEXT: sw $8, 36($sp) |
| 6063 | ; MIPS32R5-NEXT: sw $5, 32($sp) |
| 6064 | ; MIPS32R5-NEXT: sw $4, 28($sp) |
| 6065 | ; MIPS32R5-NEXT: sw $3, 24($sp) |
| 6066 | ; MIPS32R5-NEXT: sw $2, 20($sp) |
| 6067 | ; MIPS32R5-NEXT: sw $1, 16($sp) |
| 6068 | ; MIPS32R5-NEXT: addiu $4, $sp, 48 |
| 6069 | ; MIPS32R5-NEXT: jal float4_extern |
| 6070 | ; MIPS32R5-NEXT: nop |
| 6071 | ; MIPS32R5-NEXT: lui $1, %hi(gv4f32) |
| 6072 | ; MIPS32R5-NEXT: addiu $1, $1, %lo(gv4f32) |
| 6073 | ; MIPS32R5-NEXT: ld.w $w0, 48($sp) |
| 6074 | ; MIPS32R5-NEXT: st.w $w0, 0($1) |
| 6075 | ; MIPS32R5-NEXT: move $sp, $fp |
| 6076 | ; MIPS32R5-NEXT: lw $fp, 72($sp) # 4-byte Folded Reload |
| 6077 | ; MIPS32R5-NEXT: lw $ra, 76($sp) # 4-byte Folded Reload |
| 6078 | ; MIPS32R5-NEXT: addiu $sp, $sp, 80 |
| 6079 | ; MIPS32R5-NEXT: jr $ra |
| 6080 | ; MIPS32R5-NEXT: nop |
| 6081 | ; |
| 6082 | ; MIPS64R5-LABEL: callfloat_4: |
| 6083 | ; MIPS64R5: # %bb.0: # %entry |
| 6084 | ; MIPS64R5-NEXT: daddiu $sp, $sp, -16 |
| 6085 | ; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 |
| 6086 | ; MIPS64R5-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 6087 | ; MIPS64R5-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 6088 | ; MIPS64R5-NEXT: .cfi_offset 31, -8 |
| 6089 | ; MIPS64R5-NEXT: .cfi_offset 28, -16 |
| 6090 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(callfloat_4))) |
| 6091 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 6092 | ; MIPS64R5-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(callfloat_4))) |
| 6093 | ; MIPS64R5-NEXT: ld $1, %got_page(.LCPI38_0)($gp) |
| 6094 | ; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI38_0) |
| 6095 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 6096 | ; MIPS64R5-NEXT: copy_s.d $4, $w0[0] |
| 6097 | ; MIPS64R5-NEXT: copy_s.d $5, $w0[1] |
| 6098 | ; MIPS64R5-NEXT: ld $1, %got_page(.LCPI38_1)($gp) |
| 6099 | ; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI38_1) |
| 6100 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 6101 | ; MIPS64R5-NEXT: copy_s.d $6, $w0[0] |
| 6102 | ; MIPS64R5-NEXT: copy_s.d $7, $w0[1] |
| 6103 | ; MIPS64R5-NEXT: ld $25, %call16(float4_extern)($gp) |
| 6104 | ; MIPS64R5-NEXT: jalr $25 |
| 6105 | ; MIPS64R5-NEXT: nop |
| 6106 | ; MIPS64R5-NEXT: ldi.b $w0, 0 |
| 6107 | ; MIPS64R5-NEXT: insert.d $w0[0], $2 |
| 6108 | ; MIPS64R5-NEXT: insert.d $w0[1], $3 |
| 6109 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv4f32)($gp) |
| 6110 | ; MIPS64R5-NEXT: st.d $w0, 0($1) |
| 6111 | ; MIPS64R5-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 6112 | ; MIPS64R5-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 6113 | ; MIPS64R5-NEXT: daddiu $sp, $sp, 16 |
| 6114 | ; MIPS64R5-NEXT: jr $ra |
| 6115 | ; MIPS64R5-NEXT: nop |
| 6116 | ; |
| 6117 | ; MIPS64EL-LABEL: callfloat_4: |
| 6118 | ; MIPS64EL: # %bb.0: # %entry |
| 6119 | ; MIPS64EL-NEXT: daddiu $sp, $sp, -16 |
| 6120 | ; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 |
| 6121 | ; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 6122 | ; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 6123 | ; MIPS64EL-NEXT: .cfi_offset 31, -8 |
| 6124 | ; MIPS64EL-NEXT: .cfi_offset 28, -16 |
| 6125 | ; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(callfloat_4))) |
| 6126 | ; MIPS64EL-NEXT: daddu $1, $1, $25 |
| 6127 | ; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(callfloat_4))) |
| 6128 | ; MIPS64EL-NEXT: daddiu $1, $zero, 129 |
| 6129 | ; MIPS64EL-NEXT: dsll $1, $1, 25 |
| 6130 | ; MIPS64EL-NEXT: daddiu $1, $1, 1 |
| 6131 | ; MIPS64EL-NEXT: daddiu $2, $zero, 523 |
| 6132 | ; MIPS64EL-NEXT: dsll $2, $2, 31 |
| 6133 | ; MIPS64EL-NEXT: daddiu $3, $zero, 383 |
| 6134 | ; MIPS64EL-NEXT: dsll $4, $3, 55 |
| 6135 | ; MIPS64EL-NEXT: dsll $5, $1, 30 |
| 6136 | ; MIPS64EL-NEXT: daddiu $1, $2, 261 |
| 6137 | ; MIPS64EL-NEXT: dsll $6, $1, 22 |
| 6138 | ; MIPS64EL-NEXT: daddiu $1, $zero, 131 |
| 6139 | ; MIPS64EL-NEXT: dsll $1, $1, 35 |
| 6140 | ; MIPS64EL-NEXT: daddiu $1, $1, 1047 |
| 6141 | ; MIPS64EL-NEXT: dsll $7, $1, 20 |
| 6142 | ; MIPS64EL-NEXT: ld $25, %call16(float4_extern)($gp) |
| 6143 | ; MIPS64EL-NEXT: jalr $25 |
| 6144 | ; MIPS64EL-NEXT: nop |
| 6145 | ; MIPS64EL-NEXT: ld $1, %got_disp(gv4f32)($gp) |
| 6146 | ; MIPS64EL-NEXT: sd $3, 8($1) |
| 6147 | ; MIPS64EL-NEXT: sd $2, 0($1) |
| 6148 | ; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 6149 | ; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 6150 | ; MIPS64EL-NEXT: daddiu $sp, $sp, 16 |
| 6151 | ; MIPS64EL-NEXT: jr $ra |
| 6152 | ; MIPS64EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 6153 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 6154 | %0 = call <4 x float> @float4_extern(<4 x float> <float 0.0, float -1.0, float 2.0, float 4.0>, <4 x float> <float 12.0, float 14.0, float 15.0, float 16.0>) |
| 6155 | store <4 x float> %0, <4 x float> * @gv4f32 |
| 6156 | ret void |
| 6157 | } |
| 6158 | |
| 6159 | define void @calldouble_2() { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 6160 | ; MIPS32EB-LABEL: calldouble_2: |
| 6161 | ; MIPS32EB: # %bb.0: # %entry |
| 6162 | ; MIPS32EB-NEXT: addiu $sp, $sp, -80 |
| 6163 | ; MIPS32EB-NEXT: .cfi_def_cfa_offset 80 |
| 6164 | ; MIPS32EB-NEXT: sw $ra, 76($sp) # 4-byte Folded Spill |
| 6165 | ; MIPS32EB-NEXT: sw $fp, 72($sp) # 4-byte Folded Spill |
| 6166 | ; MIPS32EB-NEXT: .cfi_offset 31, -4 |
| 6167 | ; MIPS32EB-NEXT: .cfi_offset 30, -8 |
| 6168 | ; MIPS32EB-NEXT: move $fp, $sp |
| 6169 | ; MIPS32EB-NEXT: .cfi_def_cfa_register 30 |
| 6170 | ; MIPS32EB-NEXT: addiu $1, $zero, -16 |
| 6171 | ; MIPS32EB-NEXT: and $sp, $sp, $1 |
| 6172 | ; MIPS32EB-NEXT: lui $1, 16424 |
| 6173 | ; MIPS32EB-NEXT: lui $2, 16428 |
| 6174 | ; MIPS32EB-NEXT: sw $2, 32($sp) |
| 6175 | ; MIPS32EB-NEXT: sw $1, 24($sp) |
| 6176 | ; MIPS32EB-NEXT: lui $1, 49136 |
| 6177 | ; MIPS32EB-NEXT: sw $1, 16($sp) |
| 6178 | ; MIPS32EB-NEXT: sw $zero, 36($sp) |
| 6179 | ; MIPS32EB-NEXT: sw $zero, 28($sp) |
| 6180 | ; MIPS32EB-NEXT: sw $zero, 20($sp) |
| 6181 | ; MIPS32EB-NEXT: addiu $4, $sp, 48 |
| 6182 | ; MIPS32EB-NEXT: addiu $6, $zero, 0 |
| 6183 | ; MIPS32EB-NEXT: addiu $7, $zero, 0 |
| 6184 | ; MIPS32EB-NEXT: jal double2_extern |
| 6185 | ; MIPS32EB-NEXT: nop |
| 6186 | ; MIPS32EB-NEXT: lui $1, %hi(gv2f64) |
| 6187 | ; MIPS32EB-NEXT: addiu $2, $1, %lo(gv2f64) |
| 6188 | ; MIPS32EB-NEXT: ldc1 $f0, 56($sp) |
| 6189 | ; MIPS32EB-NEXT: sdc1 $f0, 8($2) |
| 6190 | ; MIPS32EB-NEXT: ldc1 $f0, 48($sp) |
| 6191 | ; MIPS32EB-NEXT: sdc1 $f0, %lo(gv2f64)($1) |
| 6192 | ; MIPS32EB-NEXT: move $sp, $fp |
| 6193 | ; MIPS32EB-NEXT: lw $fp, 72($sp) # 4-byte Folded Reload |
| 6194 | ; MIPS32EB-NEXT: lw $ra, 76($sp) # 4-byte Folded Reload |
| 6195 | ; MIPS32EB-NEXT: addiu $sp, $sp, 80 |
| 6196 | ; MIPS32EB-NEXT: jr $ra |
| 6197 | ; MIPS32EB-NEXT: nop |
| 6198 | ; |
| 6199 | ; MIPS64-LABEL: calldouble_2: |
| 6200 | ; MIPS64: # %bb.0: # %entry |
| 6201 | ; MIPS64-NEXT: daddiu $sp, $sp, -16 |
| 6202 | ; MIPS64-NEXT: .cfi_def_cfa_offset 16 |
| 6203 | ; MIPS64-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 6204 | ; MIPS64-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 6205 | ; MIPS64-NEXT: .cfi_offset 31, -8 |
| 6206 | ; MIPS64-NEXT: .cfi_offset 28, -16 |
| 6207 | ; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(calldouble_2))) |
| 6208 | ; MIPS64-NEXT: daddu $1, $1, $25 |
| 6209 | ; MIPS64-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calldouble_2))) |
| 6210 | ; MIPS64-NEXT: daddiu $1, $zero, 3071 |
| 6211 | ; MIPS64-NEXT: dsll $5, $1, 52 |
| 6212 | ; MIPS64-NEXT: daddiu $1, $zero, 2053 |
| 6213 | ; MIPS64-NEXT: dsll $6, $1, 51 |
| 6214 | ; MIPS64-NEXT: daddiu $1, $zero, 4107 |
| 6215 | ; MIPS64-NEXT: dsll $7, $1, 50 |
| 6216 | ; MIPS64-NEXT: ld $25, %call16(double2_extern)($gp) |
| 6217 | ; MIPS64-NEXT: daddiu $4, $zero, 0 |
| 6218 | ; MIPS64-NEXT: jalr $25 |
| 6219 | ; MIPS64-NEXT: nop |
| 6220 | ; MIPS64-NEXT: ld $1, %got_disp(gv2f64)($gp) |
| 6221 | ; MIPS64-NEXT: sd $3, 8($1) |
| 6222 | ; MIPS64-NEXT: sd $2, 0($1) |
| 6223 | ; MIPS64-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 6224 | ; MIPS64-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 6225 | ; MIPS64-NEXT: daddiu $sp, $sp, 16 |
| 6226 | ; MIPS64-NEXT: jr $ra |
| 6227 | ; MIPS64-NEXT: nop |
| 6228 | ; |
| 6229 | ; MIPS32R5-LABEL: calldouble_2: |
| 6230 | ; MIPS32R5: # %bb.0: # %entry |
| 6231 | ; MIPS32R5-NEXT: addiu $sp, $sp, -80 |
| 6232 | ; MIPS32R5-NEXT: .cfi_def_cfa_offset 80 |
| 6233 | ; MIPS32R5-NEXT: sw $ra, 76($sp) # 4-byte Folded Spill |
| 6234 | ; MIPS32R5-NEXT: sw $fp, 72($sp) # 4-byte Folded Spill |
| 6235 | ; MIPS32R5-NEXT: .cfi_offset 31, -4 |
| 6236 | ; MIPS32R5-NEXT: .cfi_offset 30, -8 |
| 6237 | ; MIPS32R5-NEXT: move $fp, $sp |
| 6238 | ; MIPS32R5-NEXT: .cfi_def_cfa_register 30 |
| 6239 | ; MIPS32R5-NEXT: addiu $1, $zero, -16 |
| 6240 | ; MIPS32R5-NEXT: and $sp, $sp, $1 |
| 6241 | ; MIPS32R5-NEXT: lui $1, %hi($CPI39_0) |
| 6242 | ; MIPS32R5-NEXT: addiu $1, $1, %lo($CPI39_0) |
| 6243 | ; MIPS32R5-NEXT: ld.w $w0, 0($1) |
| 6244 | ; MIPS32R5-NEXT: copy_s.w $6, $w0[0] |
| 6245 | ; MIPS32R5-NEXT: copy_s.w $7, $w0[1] |
| 6246 | ; MIPS32R5-NEXT: copy_s.w $1, $w0[2] |
| 6247 | ; MIPS32R5-NEXT: copy_s.w $2, $w0[3] |
| 6248 | ; MIPS32R5-NEXT: lui $3, %hi($CPI39_1) |
| 6249 | ; MIPS32R5-NEXT: addiu $3, $3, %lo($CPI39_1) |
| 6250 | ; MIPS32R5-NEXT: ld.w $w0, 0($3) |
| 6251 | ; MIPS32R5-NEXT: copy_s.w $3, $w0[0] |
| 6252 | ; MIPS32R5-NEXT: copy_s.w $4, $w0[1] |
| 6253 | ; MIPS32R5-NEXT: copy_s.w $5, $w0[2] |
| 6254 | ; MIPS32R5-NEXT: copy_s.w $8, $w0[3] |
| 6255 | ; MIPS32R5-NEXT: sw $8, 36($sp) |
| 6256 | ; MIPS32R5-NEXT: sw $5, 32($sp) |
| 6257 | ; MIPS32R5-NEXT: sw $4, 28($sp) |
| 6258 | ; MIPS32R5-NEXT: sw $3, 24($sp) |
| 6259 | ; MIPS32R5-NEXT: sw $2, 20($sp) |
| 6260 | ; MIPS32R5-NEXT: sw $1, 16($sp) |
| 6261 | ; MIPS32R5-NEXT: addiu $4, $sp, 48 |
| 6262 | ; MIPS32R5-NEXT: jal double2_extern |
| 6263 | ; MIPS32R5-NEXT: nop |
| 6264 | ; MIPS32R5-NEXT: lui $1, %hi(gv2f64) |
| 6265 | ; MIPS32R5-NEXT: addiu $1, $1, %lo(gv2f64) |
| 6266 | ; MIPS32R5-NEXT: ld.d $w0, 48($sp) |
| 6267 | ; MIPS32R5-NEXT: st.d $w0, 0($1) |
| 6268 | ; MIPS32R5-NEXT: move $sp, $fp |
| 6269 | ; MIPS32R5-NEXT: lw $fp, 72($sp) # 4-byte Folded Reload |
| 6270 | ; MIPS32R5-NEXT: lw $ra, 76($sp) # 4-byte Folded Reload |
| 6271 | ; MIPS32R5-NEXT: addiu $sp, $sp, 80 |
| 6272 | ; MIPS32R5-NEXT: jr $ra |
| 6273 | ; MIPS32R5-NEXT: nop |
| 6274 | ; |
| 6275 | ; MIPS64R5-LABEL: calldouble_2: |
| 6276 | ; MIPS64R5: # %bb.0: # %entry |
| 6277 | ; MIPS64R5-NEXT: daddiu $sp, $sp, -16 |
| 6278 | ; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 |
| 6279 | ; MIPS64R5-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill |
| 6280 | ; MIPS64R5-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill |
| 6281 | ; MIPS64R5-NEXT: .cfi_offset 31, -8 |
| 6282 | ; MIPS64R5-NEXT: .cfi_offset 28, -16 |
| 6283 | ; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(calldouble_2))) |
| 6284 | ; MIPS64R5-NEXT: daddu $1, $1, $25 |
| 6285 | ; MIPS64R5-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calldouble_2))) |
| 6286 | ; MIPS64R5-NEXT: ld $1, %got_page(.LCPI39_0)($gp) |
| 6287 | ; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI39_0) |
| 6288 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 6289 | ; MIPS64R5-NEXT: copy_s.d $4, $w0[0] |
| 6290 | ; MIPS64R5-NEXT: copy_s.d $5, $w0[1] |
| 6291 | ; MIPS64R5-NEXT: ld $1, %got_page(.LCPI39_1)($gp) |
| 6292 | ; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI39_1) |
| 6293 | ; MIPS64R5-NEXT: ld.d $w0, 0($1) |
| 6294 | ; MIPS64R5-NEXT: copy_s.d $6, $w0[0] |
| 6295 | ; MIPS64R5-NEXT: copy_s.d $7, $w0[1] |
| 6296 | ; MIPS64R5-NEXT: ld $25, %call16(double2_extern)($gp) |
| 6297 | ; MIPS64R5-NEXT: jalr $25 |
| 6298 | ; MIPS64R5-NEXT: nop |
| 6299 | ; MIPS64R5-NEXT: ldi.b $w0, 0 |
| 6300 | ; MIPS64R5-NEXT: insert.d $w0[0], $2 |
| 6301 | ; MIPS64R5-NEXT: insert.d $w0[1], $3 |
| 6302 | ; MIPS64R5-NEXT: ld $1, %got_disp(gv2f64)($gp) |
| 6303 | ; MIPS64R5-NEXT: st.d $w0, 0($1) |
| 6304 | ; MIPS64R5-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload |
| 6305 | ; MIPS64R5-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload |
| 6306 | ; MIPS64R5-NEXT: daddiu $sp, $sp, 16 |
| 6307 | ; MIPS64R5-NEXT: jr $ra |
| 6308 | ; MIPS64R5-NEXT: nop |
| 6309 | ; |
| 6310 | ; MIPS32EL-LABEL: calldouble_2: |
| 6311 | ; MIPS32EL: # %bb.0: # %entry |
| 6312 | ; MIPS32EL-NEXT: addiu $sp, $sp, -80 |
| 6313 | ; MIPS32EL-NEXT: .cfi_def_cfa_offset 80 |
| 6314 | ; MIPS32EL-NEXT: sw $ra, 76($sp) # 4-byte Folded Spill |
| 6315 | ; MIPS32EL-NEXT: sw $fp, 72($sp) # 4-byte Folded Spill |
| 6316 | ; MIPS32EL-NEXT: .cfi_offset 31, -4 |
| 6317 | ; MIPS32EL-NEXT: .cfi_offset 30, -8 |
| 6318 | ; MIPS32EL-NEXT: move $fp, $sp |
| 6319 | ; MIPS32EL-NEXT: .cfi_def_cfa_register 30 |
| 6320 | ; MIPS32EL-NEXT: addiu $1, $zero, -16 |
| 6321 | ; MIPS32EL-NEXT: and $sp, $sp, $1 |
| 6322 | ; MIPS32EL-NEXT: lui $1, 16424 |
| 6323 | ; MIPS32EL-NEXT: lui $2, 16428 |
| 6324 | ; MIPS32EL-NEXT: sw $2, 36($sp) |
| 6325 | ; MIPS32EL-NEXT: sw $1, 28($sp) |
| 6326 | ; MIPS32EL-NEXT: lui $1, 49136 |
| 6327 | ; MIPS32EL-NEXT: sw $1, 20($sp) |
| 6328 | ; MIPS32EL-NEXT: sw $zero, 32($sp) |
| 6329 | ; MIPS32EL-NEXT: sw $zero, 24($sp) |
| 6330 | ; MIPS32EL-NEXT: sw $zero, 16($sp) |
| 6331 | ; MIPS32EL-NEXT: addiu $4, $sp, 48 |
| 6332 | ; MIPS32EL-NEXT: addiu $6, $zero, 0 |
| 6333 | ; MIPS32EL-NEXT: addiu $7, $zero, 0 |
| 6334 | ; MIPS32EL-NEXT: jal double2_extern |
| 6335 | ; MIPS32EL-NEXT: nop |
| 6336 | ; MIPS32EL-NEXT: lui $1, %hi(gv2f64) |
| 6337 | ; MIPS32EL-NEXT: addiu $2, $1, %lo(gv2f64) |
| 6338 | ; MIPS32EL-NEXT: ldc1 $f0, 56($sp) |
| 6339 | ; MIPS32EL-NEXT: sdc1 $f0, 8($2) |
| 6340 | ; MIPS32EL-NEXT: ldc1 $f0, 48($sp) |
| 6341 | ; MIPS32EL-NEXT: sdc1 $f0, %lo(gv2f64)($1) |
| 6342 | ; MIPS32EL-NEXT: move $sp, $fp |
| 6343 | ; MIPS32EL-NEXT: lw $fp, 72($sp) # 4-byte Folded Reload |
| 6344 | ; MIPS32EL-NEXT: lw $ra, 76($sp) # 4-byte Folded Reload |
| 6345 | ; MIPS32EL-NEXT: addiu $sp, $sp, 80 |
| 6346 | ; MIPS32EL-NEXT: jr $ra |
| 6347 | ; MIPS32EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 6348 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 6349 | %0 = call <2 x double> @double2_extern(<2 x double> <double 0.0, double -1.0>, <2 x double> <double 12.0, double 14.0>) |
| 6350 | store <2 x double> %0, <2 x double> * @gv2f64 |
| 6351 | ret void |
| 6352 | } |
| 6353 | |
| 6354 | ; The mixed tests show that due to alignment requirements, $5 is not used |
| 6355 | ; in argument passing. |
| 6356 | |
| 6357 | define float @mixed_i8(<2 x float> %a, i8 %b, <2 x float> %c) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 6358 | ; MIPS32-LABEL: mixed_i8: |
| 6359 | ; MIPS32: # %bb.0: # %entry |
| 6360 | ; MIPS32-NEXT: mtc1 $5, $f0 |
| 6361 | ; MIPS32-NEXT: andi $1, $6, 255 |
| 6362 | ; MIPS32-NEXT: mtc1 $1, $f1 |
| 6363 | ; MIPS32-NEXT: cvt.s.w $f1, $f1 |
| 6364 | ; MIPS32-NEXT: add.s $f0, $f1, $f0 |
| 6365 | ; MIPS32-NEXT: lwc1 $f2, 20($sp) |
| 6366 | ; MIPS32-NEXT: add.s $f0, $f0, $f2 |
| 6367 | ; MIPS32-NEXT: mtc1 $4, $f2 |
| 6368 | ; MIPS32-NEXT: add.s $f1, $f1, $f2 |
| 6369 | ; MIPS32-NEXT: lwc1 $f2, 16($sp) |
| 6370 | ; MIPS32-NEXT: add.s $f1, $f1, $f2 |
| 6371 | ; MIPS32-NEXT: add.s $f0, $f1, $f0 |
| 6372 | ; MIPS32-NEXT: jr $ra |
| 6373 | ; MIPS32-NEXT: nop |
| 6374 | ; |
| 6375 | ; MIPS64EB-LABEL: mixed_i8: |
| 6376 | ; MIPS64EB: # %bb.0: # %entry |
| 6377 | ; MIPS64EB-NEXT: sll $1, $4, 0 |
| 6378 | ; MIPS64EB-NEXT: mtc1 $1, $f0 |
| 6379 | ; MIPS64EB-NEXT: sll $1, $5, 0 |
| 6380 | ; MIPS64EB-NEXT: andi $1, $1, 255 |
| 6381 | ; MIPS64EB-NEXT: mtc1 $1, $f1 |
| 6382 | ; MIPS64EB-NEXT: cvt.s.w $f1, $f1 |
| 6383 | ; MIPS64EB-NEXT: add.s $f0, $f1, $f0 |
| 6384 | ; MIPS64EB-NEXT: dsrl $1, $4, 32 |
| 6385 | ; MIPS64EB-NEXT: sll $1, $1, 0 |
| 6386 | ; MIPS64EB-NEXT: sll $2, $6, 0 |
| 6387 | ; MIPS64EB-NEXT: mtc1 $2, $f2 |
| 6388 | ; MIPS64EB-NEXT: add.s $f0, $f0, $f2 |
| 6389 | ; MIPS64EB-NEXT: mtc1 $1, $f2 |
| 6390 | ; MIPS64EB-NEXT: add.s $f1, $f1, $f2 |
| 6391 | ; MIPS64EB-NEXT: dsrl $1, $6, 32 |
| 6392 | ; MIPS64EB-NEXT: sll $1, $1, 0 |
| 6393 | ; MIPS64EB-NEXT: mtc1 $1, $f2 |
| 6394 | ; MIPS64EB-NEXT: add.s $f1, $f1, $f2 |
| 6395 | ; MIPS64EB-NEXT: add.s $f0, $f1, $f0 |
| 6396 | ; MIPS64EB-NEXT: jr $ra |
| 6397 | ; MIPS64EB-NEXT: nop |
| 6398 | ; |
| 6399 | ; MIPS32R5-LABEL: mixed_i8: |
| 6400 | ; MIPS32R5: # %bb.0: # %entry |
| 6401 | ; MIPS32R5-NEXT: addiu $sp, $sp, -64 |
| 6402 | ; MIPS32R5-NEXT: .cfi_def_cfa_offset 64 |
| 6403 | ; MIPS32R5-NEXT: sw $fp, 60($sp) # 4-byte Folded Spill |
| 6404 | ; MIPS32R5-NEXT: .cfi_offset 30, -4 |
| 6405 | ; MIPS32R5-NEXT: move $fp, $sp |
| 6406 | ; MIPS32R5-NEXT: .cfi_def_cfa_register 30 |
| 6407 | ; MIPS32R5-NEXT: addiu $1, $zero, -16 |
| 6408 | ; MIPS32R5-NEXT: and $sp, $sp, $1 |
| 6409 | ; MIPS32R5-NEXT: andi $1, $6, 255 |
| 6410 | ; MIPS32R5-NEXT: sw $1, 36($sp) |
| 6411 | ; MIPS32R5-NEXT: sw $1, 32($sp) |
| 6412 | ; MIPS32R5-NEXT: sw $5, 4($sp) |
| 6413 | ; MIPS32R5-NEXT: sw $4, 0($sp) |
| 6414 | ; MIPS32R5-NEXT: ld.w $w0, 32($sp) |
| 6415 | ; MIPS32R5-NEXT: ffint_s.w $w0, $w0 |
| 6416 | ; MIPS32R5-NEXT: ld.w $w1, 0($sp) |
| 6417 | ; MIPS32R5-NEXT: fadd.w $w0, $w0, $w1 |
| 6418 | ; MIPS32R5-NEXT: lw $1, 84($fp) |
| 6419 | ; MIPS32R5-NEXT: sw $1, 20($sp) |
| 6420 | ; MIPS32R5-NEXT: lw $1, 80($fp) |
| 6421 | ; MIPS32R5-NEXT: sw $1, 16($sp) |
| 6422 | ; MIPS32R5-NEXT: ld.w $w1, 16($sp) |
| 6423 | ; MIPS32R5-NEXT: fadd.w $w0, $w0, $w1 |
| 6424 | ; MIPS32R5-NEXT: splati.w $w1, $w0[1] |
| 6425 | ; MIPS32R5-NEXT: add.s $f0, $f0, $f1 |
| 6426 | ; MIPS32R5-NEXT: move $sp, $fp |
| 6427 | ; MIPS32R5-NEXT: lw $fp, 60($sp) # 4-byte Folded Reload |
| 6428 | ; MIPS32R5-NEXT: addiu $sp, $sp, 64 |
| 6429 | ; MIPS32R5-NEXT: jr $ra |
| 6430 | ; MIPS32R5-NEXT: nop |
| 6431 | ; |
| 6432 | ; MIPS64R5-LABEL: mixed_i8: |
| 6433 | ; MIPS64R5: # %bb.0: # %entry |
| 6434 | ; MIPS64R5-NEXT: daddiu $sp, $sp, -48 |
| 6435 | ; MIPS64R5-NEXT: .cfi_def_cfa_offset 48 |
| 6436 | ; MIPS64R5-NEXT: sll $1, $5, 0 |
| 6437 | ; MIPS64R5-NEXT: andi $1, $1, 255 |
| 6438 | ; MIPS64R5-NEXT: sw $1, 36($sp) |
| 6439 | ; MIPS64R5-NEXT: sw $1, 32($sp) |
| 6440 | ; MIPS64R5-NEXT: sd $4, 16($sp) |
| 6441 | ; MIPS64R5-NEXT: ld.w $w0, 32($sp) |
| 6442 | ; MIPS64R5-NEXT: ffint_s.w $w0, $w0 |
| 6443 | ; MIPS64R5-NEXT: ld.w $w1, 16($sp) |
| 6444 | ; MIPS64R5-NEXT: fadd.w $w0, $w0, $w1 |
| 6445 | ; MIPS64R5-NEXT: sd $6, 0($sp) |
| 6446 | ; MIPS64R5-NEXT: ld.w $w1, 0($sp) |
| 6447 | ; MIPS64R5-NEXT: fadd.w $w0, $w0, $w1 |
| 6448 | ; MIPS64R5-NEXT: splati.w $w1, $w0[1] |
| 6449 | ; MIPS64R5-NEXT: add.s $f0, $f0, $f1 |
| 6450 | ; MIPS64R5-NEXT: daddiu $sp, $sp, 48 |
| 6451 | ; MIPS64R5-NEXT: jr $ra |
| 6452 | ; MIPS64R5-NEXT: nop |
| 6453 | ; |
| 6454 | ; MIPS64EL-LABEL: mixed_i8: |
| 6455 | ; MIPS64EL: # %bb.0: # %entry |
| 6456 | ; MIPS64EL-NEXT: dsrl $1, $4, 32 |
| 6457 | ; MIPS64EL-NEXT: sll $1, $1, 0 |
| 6458 | ; MIPS64EL-NEXT: mtc1 $1, $f0 |
| 6459 | ; MIPS64EL-NEXT: sll $1, $5, 0 |
| 6460 | ; MIPS64EL-NEXT: andi $1, $1, 255 |
| 6461 | ; MIPS64EL-NEXT: mtc1 $1, $f1 |
| 6462 | ; MIPS64EL-NEXT: cvt.s.w $f1, $f1 |
| 6463 | ; MIPS64EL-NEXT: add.s $f0, $f1, $f0 |
| 6464 | ; MIPS64EL-NEXT: dsrl $1, $6, 32 |
| 6465 | ; MIPS64EL-NEXT: sll $1, $1, 0 |
| 6466 | ; MIPS64EL-NEXT: mtc1 $1, $f2 |
| 6467 | ; MIPS64EL-NEXT: add.s $f0, $f0, $f2 |
| 6468 | ; MIPS64EL-NEXT: sll $1, $4, 0 |
| 6469 | ; MIPS64EL-NEXT: mtc1 $1, $f2 |
| 6470 | ; MIPS64EL-NEXT: add.s $f1, $f1, $f2 |
| 6471 | ; MIPS64EL-NEXT: sll $1, $6, 0 |
| 6472 | ; MIPS64EL-NEXT: mtc1 $1, $f2 |
| 6473 | ; MIPS64EL-NEXT: add.s $f1, $f1, $f2 |
| 6474 | ; MIPS64EL-NEXT: add.s $f0, $f1, $f0 |
| 6475 | ; MIPS64EL-NEXT: jr $ra |
| 6476 | ; MIPS64EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 6477 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 6478 | %0 = zext i8 %b to i32 |
| 6479 | %1 = uitofp i32 %0 to float |
| 6480 | %2 = insertelement <2 x float> undef, float %1, i32 0 |
| 6481 | %3 = insertelement <2 x float> %2, float %1, i32 1 |
| 6482 | %4 = fadd <2 x float> %3, %a |
| 6483 | %5 = fadd <2 x float> %4, %c |
| 6484 | %6 = extractelement <2 x float> %5, i32 0 |
| 6485 | %7 = extractelement <2 x float> %5, i32 1 |
| 6486 | %8 = fadd float %6, %7 |
| 6487 | ret float %8 |
| 6488 | } |
| 6489 | |
| 6490 | define <4 x float> @mixed_32(<4 x float> %a, i32 %b) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 6491 | ; MIPS32EB-LABEL: mixed_32: |
| 6492 | ; MIPS32EB: # %bb.0: # %entry |
| 6493 | ; MIPS32EB-NEXT: addiu $sp, $sp, -8 |
| 6494 | ; MIPS32EB-NEXT: .cfi_def_cfa_offset 8 |
| 6495 | ; MIPS32EB-NEXT: lui $1, 17200 |
| 6496 | ; MIPS32EB-NEXT: sw $1, 0($sp) |
| 6497 | ; MIPS32EB-NEXT: lw $1, 32($sp) |
| 6498 | ; MIPS32EB-NEXT: sw $1, 4($sp) |
| 6499 | ; MIPS32EB-NEXT: lui $1, %hi($CPI41_0) |
| 6500 | ; MIPS32EB-NEXT: ldc1 $f0, %lo($CPI41_0)($1) |
| 6501 | ; MIPS32EB-NEXT: ldc1 $f2, 0($sp) |
| 6502 | ; MIPS32EB-NEXT: sub.d $f0, $f2, $f0 |
| 6503 | ; MIPS32EB-NEXT: cvt.s.d $f0, $f0 |
| 6504 | ; MIPS32EB-NEXT: lwc1 $f1, 28($sp) |
| 6505 | ; MIPS32EB-NEXT: lwc1 $f2, 24($sp) |
| 6506 | ; MIPS32EB-NEXT: add.s $f2, $f0, $f2 |
| 6507 | ; MIPS32EB-NEXT: add.s $f1, $f0, $f1 |
| 6508 | ; MIPS32EB-NEXT: swc1 $f1, 12($4) |
| 6509 | ; MIPS32EB-NEXT: swc1 $f2, 8($4) |
| 6510 | ; MIPS32EB-NEXT: mtc1 $7, $f1 |
| 6511 | ; MIPS32EB-NEXT: add.s $f1, $f0, $f1 |
| 6512 | ; MIPS32EB-NEXT: swc1 $f1, 4($4) |
| 6513 | ; MIPS32EB-NEXT: mtc1 $6, $f1 |
| 6514 | ; MIPS32EB-NEXT: add.s $f0, $f0, $f1 |
| 6515 | ; MIPS32EB-NEXT: swc1 $f0, 0($4) |
| 6516 | ; MIPS32EB-NEXT: addiu $sp, $sp, 8 |
| 6517 | ; MIPS32EB-NEXT: jr $ra |
| 6518 | ; MIPS32EB-NEXT: nop |
| 6519 | ; |
| 6520 | ; MIPS64EB-LABEL: mixed_32: |
| 6521 | ; MIPS64EB: # %bb.0: # %entry |
| 6522 | ; MIPS64EB-NEXT: daddiu $sp, $sp, -16 |
| 6523 | ; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 |
| 6524 | ; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(mixed_32))) |
| 6525 | ; MIPS64EB-NEXT: daddu $1, $1, $25 |
| 6526 | ; MIPS64EB-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(mixed_32))) |
| 6527 | ; MIPS64EB-NEXT: lui $2, 17200 |
| 6528 | ; MIPS64EB-NEXT: sw $2, 8($sp) |
| 6529 | ; MIPS64EB-NEXT: sll $2, $6, 0 |
| 6530 | ; MIPS64EB-NEXT: sw $2, 12($sp) |
| 6531 | ; MIPS64EB-NEXT: ld $1, %got_page(.LCPI41_0)($1) |
| 6532 | ; MIPS64EB-NEXT: ldc1 $f0, %got_ofst(.LCPI41_0)($1) |
| 6533 | ; MIPS64EB-NEXT: ldc1 $f1, 8($sp) |
| 6534 | ; MIPS64EB-NEXT: sub.d $f0, $f1, $f0 |
| 6535 | ; MIPS64EB-NEXT: cvt.s.d $f0, $f0 |
| 6536 | ; MIPS64EB-NEXT: dsrl $1, $4, 32 |
| 6537 | ; MIPS64EB-NEXT: sll $1, $1, 0 |
| 6538 | ; MIPS64EB-NEXT: mtc1 $1, $f1 |
| 6539 | ; MIPS64EB-NEXT: add.s $f1, $f0, $f1 |
| 6540 | ; MIPS64EB-NEXT: dsrl $1, $5, 32 |
| 6541 | ; MIPS64EB-NEXT: mfc1 $2, $f1 |
| 6542 | ; MIPS64EB-NEXT: sll $3, $4, 0 |
| 6543 | ; MIPS64EB-NEXT: sll $1, $1, 0 |
| 6544 | ; MIPS64EB-NEXT: mtc1 $1, $f1 |
| 6545 | ; MIPS64EB-NEXT: add.s $f1, $f0, $f1 |
| 6546 | ; MIPS64EB-NEXT: mfc1 $1, $f1 |
| 6547 | ; MIPS64EB-NEXT: mtc1 $3, $f1 |
| 6548 | ; MIPS64EB-NEXT: sll $3, $5, 0 |
| 6549 | ; MIPS64EB-NEXT: mtc1 $3, $f2 |
| 6550 | ; MIPS64EB-NEXT: dsll $2, $2, 32 |
| 6551 | ; MIPS64EB-NEXT: add.s $f1, $f0, $f1 |
| 6552 | ; MIPS64EB-NEXT: mfc1 $3, $f1 |
| 6553 | ; MIPS64EB-NEXT: dsll $3, $3, 32 |
| 6554 | ; MIPS64EB-NEXT: dsrl $3, $3, 32 |
| 6555 | ; MIPS64EB-NEXT: or $2, $3, $2 |
| 6556 | ; MIPS64EB-NEXT: dsll $1, $1, 32 |
| 6557 | ; MIPS64EB-NEXT: add.s $f0, $f0, $f2 |
| 6558 | ; MIPS64EB-NEXT: mfc1 $3, $f0 |
| 6559 | ; MIPS64EB-NEXT: dsll $3, $3, 32 |
| 6560 | ; MIPS64EB-NEXT: dsrl $3, $3, 32 |
| 6561 | ; MIPS64EB-NEXT: or $3, $3, $1 |
| 6562 | ; MIPS64EB-NEXT: daddiu $sp, $sp, 16 |
| 6563 | ; MIPS64EB-NEXT: jr $ra |
| 6564 | ; MIPS64EB-NEXT: nop |
| 6565 | ; |
| 6566 | ; MIPS32R5-LABEL: mixed_32: |
| 6567 | ; MIPS32R5: # %bb.0: # %entry |
| 6568 | ; MIPS32R5-NEXT: ldi.b $w0, 0 |
| 6569 | ; MIPS32R5-NEXT: insert.w $w0[0], $6 |
| 6570 | ; MIPS32R5-NEXT: insert.w $w0[1], $7 |
| 6571 | ; MIPS32R5-NEXT: lw $1, 16($sp) |
| 6572 | ; MIPS32R5-NEXT: insert.w $w0[2], $1 |
| 6573 | ; MIPS32R5-NEXT: lw $1, 20($sp) |
| 6574 | ; MIPS32R5-NEXT: insert.w $w0[3], $1 |
| 6575 | ; MIPS32R5-NEXT: lw $1, 24($sp) |
| 6576 | ; MIPS32R5-NEXT: fill.w $w1, $1 |
| 6577 | ; MIPS32R5-NEXT: ffint_u.w $w1, $w1 |
| 6578 | ; MIPS32R5-NEXT: fadd.w $w0, $w1, $w0 |
| 6579 | ; MIPS32R5-NEXT: st.w $w0, 0($4) |
| 6580 | ; MIPS32R5-NEXT: jr $ra |
| 6581 | ; MIPS32R5-NEXT: nop |
| 6582 | ; |
| 6583 | ; MIPS64R5EB-LABEL: mixed_32: |
| 6584 | ; MIPS64R5EB: # %bb.0: # %entry |
| 6585 | ; MIPS64R5EB-NEXT: ldi.b $w0, 0 |
| 6586 | ; MIPS64R5EB-NEXT: insert.d $w0[0], $4 |
| 6587 | ; MIPS64R5EB-NEXT: insert.d $w0[1], $5 |
| 6588 | ; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 |
| 6589 | ; MIPS64R5EB-NEXT: sll $1, $6, 0 |
| 6590 | ; MIPS64R5EB-NEXT: fill.w $w1, $1 |
| 6591 | ; MIPS64R5EB-NEXT: ffint_u.w $w1, $w1 |
| 6592 | ; MIPS64R5EB-NEXT: fadd.w $w0, $w1, $w0 |
| 6593 | ; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 |
| 6594 | ; MIPS64R5EB-NEXT: copy_s.d $2, $w0[0] |
| 6595 | ; MIPS64R5EB-NEXT: copy_s.d $3, $w0[1] |
| 6596 | ; MIPS64R5EB-NEXT: jr $ra |
| 6597 | ; MIPS64R5EB-NEXT: nop |
| 6598 | ; |
| 6599 | ; MIPS32EL-LABEL: mixed_32: |
| 6600 | ; MIPS32EL: # %bb.0: # %entry |
| 6601 | ; MIPS32EL-NEXT: addiu $sp, $sp, -8 |
| 6602 | ; MIPS32EL-NEXT: .cfi_def_cfa_offset 8 |
| 6603 | ; MIPS32EL-NEXT: lui $1, 17200 |
| 6604 | ; MIPS32EL-NEXT: sw $1, 4($sp) |
| 6605 | ; MIPS32EL-NEXT: lw $1, 32($sp) |
| 6606 | ; MIPS32EL-NEXT: sw $1, 0($sp) |
| 6607 | ; MIPS32EL-NEXT: lui $1, %hi($CPI41_0) |
| 6608 | ; MIPS32EL-NEXT: ldc1 $f0, %lo($CPI41_0)($1) |
| 6609 | ; MIPS32EL-NEXT: ldc1 $f2, 0($sp) |
| 6610 | ; MIPS32EL-NEXT: sub.d $f0, $f2, $f0 |
| 6611 | ; MIPS32EL-NEXT: cvt.s.d $f0, $f0 |
| 6612 | ; MIPS32EL-NEXT: lwc1 $f1, 28($sp) |
| 6613 | ; MIPS32EL-NEXT: lwc1 $f2, 24($sp) |
| 6614 | ; MIPS32EL-NEXT: add.s $f2, $f0, $f2 |
| 6615 | ; MIPS32EL-NEXT: add.s $f1, $f0, $f1 |
| 6616 | ; MIPS32EL-NEXT: swc1 $f1, 12($4) |
| 6617 | ; MIPS32EL-NEXT: swc1 $f2, 8($4) |
| 6618 | ; MIPS32EL-NEXT: mtc1 $7, $f1 |
| 6619 | ; MIPS32EL-NEXT: add.s $f1, $f0, $f1 |
| 6620 | ; MIPS32EL-NEXT: swc1 $f1, 4($4) |
| 6621 | ; MIPS32EL-NEXT: mtc1 $6, $f1 |
| 6622 | ; MIPS32EL-NEXT: add.s $f0, $f0, $f1 |
| 6623 | ; MIPS32EL-NEXT: swc1 $f0, 0($4) |
| 6624 | ; MIPS32EL-NEXT: addiu $sp, $sp, 8 |
| 6625 | ; MIPS32EL-NEXT: jr $ra |
| 6626 | ; MIPS32EL-NEXT: nop |
| 6627 | ; |
| 6628 | ; MIPS64EL-LABEL: mixed_32: |
| 6629 | ; MIPS64EL: # %bb.0: # %entry |
| 6630 | ; MIPS64EL-NEXT: daddiu $sp, $sp, -16 |
| 6631 | ; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 |
| 6632 | ; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(mixed_32))) |
| 6633 | ; MIPS64EL-NEXT: daddu $1, $1, $25 |
| 6634 | ; MIPS64EL-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(mixed_32))) |
| 6635 | ; MIPS64EL-NEXT: lui $2, 17200 |
| 6636 | ; MIPS64EL-NEXT: sw $2, 12($sp) |
| 6637 | ; MIPS64EL-NEXT: sll $2, $6, 0 |
| 6638 | ; MIPS64EL-NEXT: sw $2, 8($sp) |
| 6639 | ; MIPS64EL-NEXT: ld $1, %got_page(.LCPI41_0)($1) |
| 6640 | ; MIPS64EL-NEXT: ldc1 $f0, %got_ofst(.LCPI41_0)($1) |
| 6641 | ; MIPS64EL-NEXT: ldc1 $f1, 8($sp) |
| 6642 | ; MIPS64EL-NEXT: sub.d $f0, $f1, $f0 |
| 6643 | ; MIPS64EL-NEXT: cvt.s.d $f0, $f0 |
| 6644 | ; MIPS64EL-NEXT: dsrl $1, $4, 32 |
| 6645 | ; MIPS64EL-NEXT: sll $1, $1, 0 |
| 6646 | ; MIPS64EL-NEXT: mtc1 $1, $f1 |
| 6647 | ; MIPS64EL-NEXT: add.s $f1, $f0, $f1 |
| 6648 | ; MIPS64EL-NEXT: dsrl $1, $5, 32 |
| 6649 | ; MIPS64EL-NEXT: mfc1 $2, $f1 |
| 6650 | ; MIPS64EL-NEXT: sll $3, $4, 0 |
| 6651 | ; MIPS64EL-NEXT: sll $1, $1, 0 |
| 6652 | ; MIPS64EL-NEXT: mtc1 $1, $f1 |
| 6653 | ; MIPS64EL-NEXT: add.s $f1, $f0, $f1 |
| 6654 | ; MIPS64EL-NEXT: mfc1 $1, $f1 |
| 6655 | ; MIPS64EL-NEXT: mtc1 $3, $f1 |
| 6656 | ; MIPS64EL-NEXT: sll $3, $5, 0 |
| 6657 | ; MIPS64EL-NEXT: mtc1 $3, $f2 |
| 6658 | ; MIPS64EL-NEXT: dsll $2, $2, 32 |
| 6659 | ; MIPS64EL-NEXT: add.s $f1, $f0, $f1 |
| 6660 | ; MIPS64EL-NEXT: mfc1 $3, $f1 |
| 6661 | ; MIPS64EL-NEXT: dsll $3, $3, 32 |
| 6662 | ; MIPS64EL-NEXT: dsrl $3, $3, 32 |
| 6663 | ; MIPS64EL-NEXT: or $2, $3, $2 |
| 6664 | ; MIPS64EL-NEXT: dsll $1, $1, 32 |
| 6665 | ; MIPS64EL-NEXT: add.s $f0, $f0, $f2 |
| 6666 | ; MIPS64EL-NEXT: mfc1 $3, $f0 |
| 6667 | ; MIPS64EL-NEXT: dsll $3, $3, 32 |
| 6668 | ; MIPS64EL-NEXT: dsrl $3, $3, 32 |
| 6669 | ; MIPS64EL-NEXT: or $3, $3, $1 |
| 6670 | ; MIPS64EL-NEXT: daddiu $sp, $sp, 16 |
| 6671 | ; MIPS64EL-NEXT: jr $ra |
| 6672 | ; MIPS64EL-NEXT: nop |
| 6673 | ; |
| 6674 | ; MIPS64R5EL-LABEL: mixed_32: |
| 6675 | ; MIPS64R5EL: # %bb.0: # %entry |
| 6676 | ; MIPS64R5EL-NEXT: ldi.b $w0, 0 |
| 6677 | ; MIPS64R5EL-NEXT: insert.d $w0[0], $4 |
| 6678 | ; MIPS64R5EL-NEXT: insert.d $w0[1], $5 |
| 6679 | ; MIPS64R5EL-NEXT: sll $1, $6, 0 |
| 6680 | ; MIPS64R5EL-NEXT: fill.w $w1, $1 |
| 6681 | ; MIPS64R5EL-NEXT: ffint_u.w $w1, $w1 |
| 6682 | ; MIPS64R5EL-NEXT: fadd.w $w0, $w1, $w0 |
| 6683 | ; MIPS64R5EL-NEXT: copy_s.d $2, $w0[0] |
| 6684 | ; MIPS64R5EL-NEXT: copy_s.d $3, $w0[1] |
| 6685 | ; MIPS64R5EL-NEXT: jr $ra |
| 6686 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 6687 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 6688 | %0 = uitofp i32 %b to float |
| 6689 | %1 = insertelement <4 x float> undef, float %0, i32 0 |
| 6690 | %2 = insertelement <4 x float> %1, float %0, i32 1 |
| 6691 | %3 = insertelement <4 x float> %2, float %0, i32 2 |
| 6692 | %4 = insertelement <4 x float> %3, float %0, i32 3 |
| 6693 | %5 = fadd <4 x float> %4, %a |
| 6694 | ret <4 x float> %5 |
| 6695 | } |
| 6696 | |
| 6697 | |
| 6698 | ; This test is slightly more fragile than I'd like as the offset into the |
| 6699 | ; outgoing arguments area is dependant on the size of the stack frame for |
| 6700 | ; this function. |
| 6701 | |
| 6702 | define <4 x float> @cast(<4 x i32> %a) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 6703 | ; MIPS32EB-LABEL: cast: |
| 6704 | ; MIPS32EB: # %bb.0: # %entry |
| 6705 | ; MIPS32EB-NEXT: addiu $sp, $sp, -32 |
| 6706 | ; MIPS32EB-NEXT: .cfi_def_cfa_offset 32 |
| 6707 | ; MIPS32EB-NEXT: lw $1, 52($sp) |
| 6708 | ; MIPS32EB-NEXT: lui $2, 17200 |
| 6709 | ; MIPS32EB-NEXT: sw $2, 24($sp) |
| 6710 | ; MIPS32EB-NEXT: sw $1, 28($sp) |
| 6711 | ; MIPS32EB-NEXT: lw $1, 48($sp) |
| 6712 | ; MIPS32EB-NEXT: sw $2, 16($sp) |
| 6713 | ; MIPS32EB-NEXT: sw $1, 20($sp) |
| 6714 | ; MIPS32EB-NEXT: lui $1, %hi($CPI42_0) |
| 6715 | ; MIPS32EB-NEXT: sw $2, 8($sp) |
| 6716 | ; MIPS32EB-NEXT: sw $7, 12($sp) |
| 6717 | ; MIPS32EB-NEXT: ldc1 $f0, %lo($CPI42_0)($1) |
| 6718 | ; MIPS32EB-NEXT: ldc1 $f2, 24($sp) |
| 6719 | ; MIPS32EB-NEXT: sub.d $f2, $f2, $f0 |
| 6720 | ; MIPS32EB-NEXT: ldc1 $f4, 16($sp) |
| 6721 | ; MIPS32EB-NEXT: sub.d $f4, $f4, $f0 |
| 6722 | ; MIPS32EB-NEXT: ldc1 $f6, 8($sp) |
| 6723 | ; MIPS32EB-NEXT: sub.d $f6, $f6, $f0 |
| 6724 | ; MIPS32EB-NEXT: cvt.s.d $f6, $f6 |
| 6725 | ; MIPS32EB-NEXT: cvt.s.d $f4, $f4 |
| 6726 | ; MIPS32EB-NEXT: cvt.s.d $f2, $f2 |
| 6727 | ; MIPS32EB-NEXT: swc1 $f2, 12($4) |
| 6728 | ; MIPS32EB-NEXT: swc1 $f4, 8($4) |
| 6729 | ; MIPS32EB-NEXT: swc1 $f6, 4($4) |
| 6730 | ; MIPS32EB-NEXT: sw $2, 0($sp) |
| 6731 | ; MIPS32EB-NEXT: sw $6, 4($sp) |
| 6732 | ; MIPS32EB-NEXT: ldc1 $f2, 0($sp) |
| 6733 | ; MIPS32EB-NEXT: sub.d $f0, $f2, $f0 |
| 6734 | ; MIPS32EB-NEXT: cvt.s.d $f0, $f0 |
| 6735 | ; MIPS32EB-NEXT: swc1 $f0, 0($4) |
| 6736 | ; MIPS32EB-NEXT: addiu $sp, $sp, 32 |
| 6737 | ; MIPS32EB-NEXT: jr $ra |
| 6738 | ; MIPS32EB-NEXT: nop |
| 6739 | ; |
| 6740 | ; MIPS64EB-LABEL: cast: |
| 6741 | ; MIPS64EB: # %bb.0: # %entry |
| 6742 | ; MIPS64EB-NEXT: daddiu $sp, $sp, -32 |
| 6743 | ; MIPS64EB-NEXT: .cfi_def_cfa_offset 32 |
| 6744 | ; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(cast))) |
| 6745 | ; MIPS64EB-NEXT: daddu $1, $1, $25 |
| 6746 | ; MIPS64EB-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(cast))) |
| 6747 | ; MIPS64EB-NEXT: sll $2, $4, 0 |
| 6748 | ; MIPS64EB-NEXT: lui $3, 17200 |
| 6749 | ; MIPS64EB-NEXT: sw $3, 0($sp) |
| 6750 | ; MIPS64EB-NEXT: sw $2, 4($sp) |
| 6751 | ; MIPS64EB-NEXT: sll $2, $5, 0 |
| 6752 | ; MIPS64EB-NEXT: sw $3, 8($sp) |
| 6753 | ; MIPS64EB-NEXT: sw $2, 12($sp) |
| 6754 | ; MIPS64EB-NEXT: ld $1, %got_page(.LCPI42_0)($1) |
| 6755 | ; MIPS64EB-NEXT: ldc1 $f0, %got_ofst(.LCPI42_0)($1) |
| 6756 | ; MIPS64EB-NEXT: ldc1 $f1, 0($sp) |
| 6757 | ; MIPS64EB-NEXT: sub.d $f1, $f1, $f0 |
| 6758 | ; MIPS64EB-NEXT: cvt.s.d $f1, $f1 |
| 6759 | ; MIPS64EB-NEXT: ldc1 $f2, 8($sp) |
| 6760 | ; MIPS64EB-NEXT: sub.d $f2, $f2, $f0 |
| 6761 | ; MIPS64EB-NEXT: mfc1 $1, $f1 |
| 6762 | ; MIPS64EB-NEXT: dsrl $2, $4, 32 |
| 6763 | ; MIPS64EB-NEXT: sll $2, $2, 0 |
| 6764 | ; MIPS64EB-NEXT: sw $3, 16($sp) |
| 6765 | ; MIPS64EB-NEXT: sw $2, 20($sp) |
| 6766 | ; MIPS64EB-NEXT: sw $3, 24($sp) |
| 6767 | ; MIPS64EB-NEXT: dsll $1, $1, 32 |
| 6768 | ; MIPS64EB-NEXT: cvt.s.d $f1, $f2 |
| 6769 | ; MIPS64EB-NEXT: dsrl $2, $5, 32 |
| 6770 | ; MIPS64EB-NEXT: sll $2, $2, 0 |
| 6771 | ; MIPS64EB-NEXT: sw $2, 28($sp) |
| 6772 | ; MIPS64EB-NEXT: mfc1 $2, $f1 |
| 6773 | ; MIPS64EB-NEXT: dsll $3, $2, 32 |
| 6774 | ; MIPS64EB-NEXT: dsrl $1, $1, 32 |
| 6775 | ; MIPS64EB-NEXT: ldc1 $f1, 16($sp) |
| 6776 | ; MIPS64EB-NEXT: sub.d $f1, $f1, $f0 |
| 6777 | ; MIPS64EB-NEXT: cvt.s.d $f1, $f1 |
| 6778 | ; MIPS64EB-NEXT: mfc1 $2, $f1 |
| 6779 | ; MIPS64EB-NEXT: dsll $2, $2, 32 |
| 6780 | ; MIPS64EB-NEXT: or $2, $1, $2 |
| 6781 | ; MIPS64EB-NEXT: dsrl $1, $3, 32 |
| 6782 | ; MIPS64EB-NEXT: ldc1 $f1, 24($sp) |
| 6783 | ; MIPS64EB-NEXT: sub.d $f0, $f1, $f0 |
| 6784 | ; MIPS64EB-NEXT: cvt.s.d $f0, $f0 |
| 6785 | ; MIPS64EB-NEXT: mfc1 $3, $f0 |
| 6786 | ; MIPS64EB-NEXT: dsll $3, $3, 32 |
| 6787 | ; MIPS64EB-NEXT: or $3, $1, $3 |
| 6788 | ; MIPS64EB-NEXT: daddiu $sp, $sp, 32 |
| 6789 | ; MIPS64EB-NEXT: jr $ra |
| 6790 | ; MIPS64EB-NEXT: nop |
| 6791 | ; |
| 6792 | ; MIPS32R5-LABEL: cast: |
| 6793 | ; MIPS32R5: # %bb.0: # %entry |
| 6794 | ; MIPS32R5-NEXT: ldi.b $w0, 0 |
| 6795 | ; MIPS32R5-NEXT: insert.w $w0[0], $6 |
| 6796 | ; MIPS32R5-NEXT: insert.w $w0[1], $7 |
| 6797 | ; MIPS32R5-NEXT: lw $1, 16($sp) |
| 6798 | ; MIPS32R5-NEXT: insert.w $w0[2], $1 |
| 6799 | ; MIPS32R5-NEXT: lw $1, 20($sp) |
| 6800 | ; MIPS32R5-NEXT: insert.w $w0[3], $1 |
| 6801 | ; MIPS32R5-NEXT: ffint_u.w $w0, $w0 |
| 6802 | ; MIPS32R5-NEXT: st.w $w0, 0($4) |
| 6803 | ; MIPS32R5-NEXT: jr $ra |
| 6804 | ; MIPS32R5-NEXT: nop |
| 6805 | ; |
| 6806 | ; MIPS64R5EB-LABEL: cast: |
| 6807 | ; MIPS64R5EB: # %bb.0: # %entry |
| 6808 | ; MIPS64R5EB-NEXT: ldi.b $w0, 0 |
| 6809 | ; MIPS64R5EB-NEXT: insert.d $w0[0], $4 |
| 6810 | ; MIPS64R5EB-NEXT: insert.d $w0[1], $5 |
| 6811 | ; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 |
| 6812 | ; MIPS64R5EB-NEXT: ffint_u.w $w0, $w0 |
| 6813 | ; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 |
| 6814 | ; MIPS64R5EB-NEXT: copy_s.d $2, $w0[0] |
| 6815 | ; MIPS64R5EB-NEXT: copy_s.d $3, $w0[1] |
| 6816 | ; MIPS64R5EB-NEXT: jr $ra |
| 6817 | ; MIPS64R5EB-NEXT: nop |
| 6818 | ; |
| 6819 | ; MIPS32EL-LABEL: cast: |
| 6820 | ; MIPS32EL: # %bb.0: # %entry |
| 6821 | ; MIPS32EL-NEXT: addiu $sp, $sp, -32 |
| 6822 | ; MIPS32EL-NEXT: .cfi_def_cfa_offset 32 |
| 6823 | ; MIPS32EL-NEXT: lw $1, 52($sp) |
| 6824 | ; MIPS32EL-NEXT: lui $2, 17200 |
| 6825 | ; MIPS32EL-NEXT: sw $2, 28($sp) |
| 6826 | ; MIPS32EL-NEXT: sw $1, 24($sp) |
| 6827 | ; MIPS32EL-NEXT: lw $1, 48($sp) |
| 6828 | ; MIPS32EL-NEXT: sw $2, 20($sp) |
| 6829 | ; MIPS32EL-NEXT: sw $1, 16($sp) |
| 6830 | ; MIPS32EL-NEXT: lui $1, %hi($CPI42_0) |
| 6831 | ; MIPS32EL-NEXT: sw $2, 12($sp) |
| 6832 | ; MIPS32EL-NEXT: sw $7, 8($sp) |
| 6833 | ; MIPS32EL-NEXT: ldc1 $f0, %lo($CPI42_0)($1) |
| 6834 | ; MIPS32EL-NEXT: ldc1 $f2, 24($sp) |
| 6835 | ; MIPS32EL-NEXT: sub.d $f2, $f2, $f0 |
| 6836 | ; MIPS32EL-NEXT: ldc1 $f4, 16($sp) |
| 6837 | ; MIPS32EL-NEXT: sub.d $f4, $f4, $f0 |
| 6838 | ; MIPS32EL-NEXT: ldc1 $f6, 8($sp) |
| 6839 | ; MIPS32EL-NEXT: sub.d $f6, $f6, $f0 |
| 6840 | ; MIPS32EL-NEXT: cvt.s.d $f6, $f6 |
| 6841 | ; MIPS32EL-NEXT: cvt.s.d $f4, $f4 |
| 6842 | ; MIPS32EL-NEXT: cvt.s.d $f2, $f2 |
| 6843 | ; MIPS32EL-NEXT: swc1 $f2, 12($4) |
| 6844 | ; MIPS32EL-NEXT: swc1 $f4, 8($4) |
| 6845 | ; MIPS32EL-NEXT: swc1 $f6, 4($4) |
| 6846 | ; MIPS32EL-NEXT: sw $2, 4($sp) |
| 6847 | ; MIPS32EL-NEXT: sw $6, 0($sp) |
| 6848 | ; MIPS32EL-NEXT: ldc1 $f2, 0($sp) |
| 6849 | ; MIPS32EL-NEXT: sub.d $f0, $f2, $f0 |
| 6850 | ; MIPS32EL-NEXT: cvt.s.d $f0, $f0 |
| 6851 | ; MIPS32EL-NEXT: swc1 $f0, 0($4) |
| 6852 | ; MIPS32EL-NEXT: addiu $sp, $sp, 32 |
| 6853 | ; MIPS32EL-NEXT: jr $ra |
| 6854 | ; MIPS32EL-NEXT: nop |
| 6855 | ; |
| 6856 | ; MIPS64EL-LABEL: cast: |
| 6857 | ; MIPS64EL: # %bb.0: # %entry |
| 6858 | ; MIPS64EL-NEXT: daddiu $sp, $sp, -32 |
| 6859 | ; MIPS64EL-NEXT: .cfi_def_cfa_offset 32 |
| 6860 | ; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(cast))) |
| 6861 | ; MIPS64EL-NEXT: daddu $1, $1, $25 |
| 6862 | ; MIPS64EL-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(cast))) |
| 6863 | ; MIPS64EL-NEXT: sll $2, $4, 0 |
| 6864 | ; MIPS64EL-NEXT: lui $3, 17200 |
| 6865 | ; MIPS64EL-NEXT: sw $3, 4($sp) |
| 6866 | ; MIPS64EL-NEXT: sw $2, 0($sp) |
| 6867 | ; MIPS64EL-NEXT: sll $2, $5, 0 |
| 6868 | ; MIPS64EL-NEXT: sw $3, 12($sp) |
| 6869 | ; MIPS64EL-NEXT: sw $2, 8($sp) |
| 6870 | ; MIPS64EL-NEXT: ld $1, %got_page(.LCPI42_0)($1) |
| 6871 | ; MIPS64EL-NEXT: ldc1 $f0, %got_ofst(.LCPI42_0)($1) |
| 6872 | ; MIPS64EL-NEXT: ldc1 $f1, 0($sp) |
| 6873 | ; MIPS64EL-NEXT: sub.d $f1, $f1, $f0 |
| 6874 | ; MIPS64EL-NEXT: cvt.s.d $f1, $f1 |
| 6875 | ; MIPS64EL-NEXT: ldc1 $f2, 8($sp) |
| 6876 | ; MIPS64EL-NEXT: sub.d $f2, $f2, $f0 |
| 6877 | ; MIPS64EL-NEXT: mfc1 $1, $f1 |
| 6878 | ; MIPS64EL-NEXT: dsrl $2, $4, 32 |
| 6879 | ; MIPS64EL-NEXT: sll $2, $2, 0 |
| 6880 | ; MIPS64EL-NEXT: sw $3, 20($sp) |
| 6881 | ; MIPS64EL-NEXT: sw $2, 16($sp) |
| 6882 | ; MIPS64EL-NEXT: sw $3, 28($sp) |
| 6883 | ; MIPS64EL-NEXT: dsll $1, $1, 32 |
| 6884 | ; MIPS64EL-NEXT: cvt.s.d $f1, $f2 |
| 6885 | ; MIPS64EL-NEXT: dsrl $2, $5, 32 |
| 6886 | ; MIPS64EL-NEXT: sll $2, $2, 0 |
| 6887 | ; MIPS64EL-NEXT: sw $2, 24($sp) |
| 6888 | ; MIPS64EL-NEXT: mfc1 $2, $f1 |
| 6889 | ; MIPS64EL-NEXT: dsll $3, $2, 32 |
| 6890 | ; MIPS64EL-NEXT: dsrl $1, $1, 32 |
| 6891 | ; MIPS64EL-NEXT: ldc1 $f1, 16($sp) |
| 6892 | ; MIPS64EL-NEXT: sub.d $f1, $f1, $f0 |
| 6893 | ; MIPS64EL-NEXT: cvt.s.d $f1, $f1 |
| 6894 | ; MIPS64EL-NEXT: mfc1 $2, $f1 |
| 6895 | ; MIPS64EL-NEXT: dsll $2, $2, 32 |
| 6896 | ; MIPS64EL-NEXT: or $2, $1, $2 |
| 6897 | ; MIPS64EL-NEXT: dsrl $1, $3, 32 |
| 6898 | ; MIPS64EL-NEXT: ldc1 $f1, 24($sp) |
| 6899 | ; MIPS64EL-NEXT: sub.d $f0, $f1, $f0 |
| 6900 | ; MIPS64EL-NEXT: cvt.s.d $f0, $f0 |
| 6901 | ; MIPS64EL-NEXT: mfc1 $3, $f0 |
| 6902 | ; MIPS64EL-NEXT: dsll $3, $3, 32 |
| 6903 | ; MIPS64EL-NEXT: or $3, $1, $3 |
| 6904 | ; MIPS64EL-NEXT: daddiu $sp, $sp, 32 |
| 6905 | ; MIPS64EL-NEXT: jr $ra |
| 6906 | ; MIPS64EL-NEXT: nop |
| 6907 | ; |
| 6908 | ; MIPS64R5EL-LABEL: cast: |
| 6909 | ; MIPS64R5EL: # %bb.0: # %entry |
| 6910 | ; MIPS64R5EL-NEXT: ldi.b $w0, 0 |
| 6911 | ; MIPS64R5EL-NEXT: insert.d $w0[0], $4 |
| 6912 | ; MIPS64R5EL-NEXT: insert.d $w0[1], $5 |
| 6913 | ; MIPS64R5EL-NEXT: ffint_u.w $w0, $w0 |
| 6914 | ; MIPS64R5EL-NEXT: copy_s.d $2, $w0[0] |
| 6915 | ; MIPS64R5EL-NEXT: copy_s.d $3, $w0[1] |
| 6916 | ; MIPS64R5EL-NEXT: jr $ra |
| 6917 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 6918 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 6919 | %0 = uitofp <4 x i32> %a to <4 x float> |
| 6920 | ret <4 x float> %0 |
| 6921 | } |
| 6922 | |
| 6923 | define <4 x float> @select(<4 x i32> %cond, <4 x float> %arg1, <4 x float> %arg2) { |
Simon Pilgrim | 7aec506 | 2018-02-03 22:11:22 +0000 | [diff] [blame] | 6924 | ; MIPS32-LABEL: select: |
| 6925 | ; MIPS32: # %bb.0: # %entry |
| 6926 | ; MIPS32-NEXT: andi $1, $7, 1 |
| 6927 | ; MIPS32-NEXT: lw $2, 16($sp) |
| 6928 | ; MIPS32-NEXT: andi $2, $2, 1 |
| 6929 | ; MIPS32-NEXT: addiu $3, $sp, 44 |
| 6930 | ; MIPS32-NEXT: addiu $5, $sp, 28 |
| 6931 | ; MIPS32-NEXT: addiu $7, $sp, 48 |
| 6932 | ; MIPS32-NEXT: addiu $8, $sp, 32 |
| 6933 | ; MIPS32-NEXT: movn $7, $8, $2 |
| 6934 | ; MIPS32-NEXT: movn $3, $5, $1 |
| 6935 | ; MIPS32-NEXT: andi $1, $6, 1 |
| 6936 | ; MIPS32-NEXT: addiu $2, $sp, 40 |
| 6937 | ; MIPS32-NEXT: addiu $5, $sp, 24 |
| 6938 | ; MIPS32-NEXT: movn $2, $5, $1 |
| 6939 | ; MIPS32-NEXT: lw $1, 20($sp) |
| 6940 | ; MIPS32-NEXT: lwc1 $f0, 0($2) |
| 6941 | ; MIPS32-NEXT: lwc1 $f1, 0($3) |
| 6942 | ; MIPS32-NEXT: lwc1 $f2, 0($7) |
| 6943 | ; MIPS32-NEXT: andi $1, $1, 1 |
| 6944 | ; MIPS32-NEXT: addiu $2, $sp, 52 |
| 6945 | ; MIPS32-NEXT: addiu $3, $sp, 36 |
| 6946 | ; MIPS32-NEXT: movn $2, $3, $1 |
| 6947 | ; MIPS32-NEXT: lwc1 $f3, 0($2) |
| 6948 | ; MIPS32-NEXT: swc1 $f3, 12($4) |
| 6949 | ; MIPS32-NEXT: swc1 $f2, 8($4) |
| 6950 | ; MIPS32-NEXT: swc1 $f1, 4($4) |
| 6951 | ; MIPS32-NEXT: swc1 $f0, 0($4) |
| 6952 | ; MIPS32-NEXT: jr $ra |
| 6953 | ; MIPS32-NEXT: nop |
| 6954 | ; |
| 6955 | ; MIPS64-LABEL: select: |
| 6956 | ; MIPS64: # %bb.0: # %entry |
| 6957 | ; MIPS64-NEXT: sll $1, $8, 0 |
| 6958 | ; MIPS64-NEXT: mtc1 $1, $f0 |
| 6959 | ; MIPS64-NEXT: sll $1, $4, 0 |
| 6960 | ; MIPS64-NEXT: andi $1, $1, 1 |
| 6961 | ; MIPS64-NEXT: sll $2, $6, 0 |
| 6962 | ; MIPS64-NEXT: mtc1 $2, $f1 |
| 6963 | ; MIPS64-NEXT: movn.s $f0, $f1, $1 |
| 6964 | ; MIPS64-NEXT: dsrl $1, $8, 32 |
| 6965 | ; MIPS64-NEXT: dsrl $2, $4, 32 |
| 6966 | ; MIPS64-NEXT: sll $1, $1, 0 |
| 6967 | ; MIPS64-NEXT: mfc1 $3, $f0 |
| 6968 | ; MIPS64-NEXT: sll $4, $9, 0 |
| 6969 | ; MIPS64-NEXT: mtc1 $1, $f0 |
| 6970 | ; MIPS64-NEXT: sll $1, $2, 0 |
| 6971 | ; MIPS64-NEXT: andi $1, $1, 1 |
| 6972 | ; MIPS64-NEXT: dsrl $2, $6, 32 |
| 6973 | ; MIPS64-NEXT: sll $2, $2, 0 |
| 6974 | ; MIPS64-NEXT: mtc1 $2, $f1 |
| 6975 | ; MIPS64-NEXT: movn.s $f0, $f1, $1 |
| 6976 | ; MIPS64-NEXT: dsll $1, $3, 32 |
| 6977 | ; MIPS64-NEXT: mtc1 $4, $f1 |
| 6978 | ; MIPS64-NEXT: sll $2, $5, 0 |
| 6979 | ; MIPS64-NEXT: andi $2, $2, 1 |
| 6980 | ; MIPS64-NEXT: sll $3, $7, 0 |
| 6981 | ; MIPS64-NEXT: mtc1 $3, $f2 |
| 6982 | ; MIPS64-NEXT: movn.s $f1, $f2, $2 |
| 6983 | ; MIPS64-NEXT: mfc1 $2, $f1 |
| 6984 | ; MIPS64-NEXT: dsll $3, $2, 32 |
| 6985 | ; MIPS64-NEXT: dsrl $1, $1, 32 |
| 6986 | ; MIPS64-NEXT: mfc1 $2, $f0 |
| 6987 | ; MIPS64-NEXT: dsrl $4, $5, 32 |
| 6988 | ; MIPS64-NEXT: dsrl $5, $9, 32 |
| 6989 | ; MIPS64-NEXT: dsll $2, $2, 32 |
| 6990 | ; MIPS64-NEXT: sll $5, $5, 0 |
| 6991 | ; MIPS64-NEXT: or $2, $1, $2 |
| 6992 | ; MIPS64-NEXT: dsrl $1, $3, 32 |
| 6993 | ; MIPS64-NEXT: mtc1 $5, $f0 |
| 6994 | ; MIPS64-NEXT: sll $3, $4, 0 |
| 6995 | ; MIPS64-NEXT: andi $3, $3, 1 |
| 6996 | ; MIPS64-NEXT: dsrl $4, $7, 32 |
| 6997 | ; MIPS64-NEXT: sll $4, $4, 0 |
| 6998 | ; MIPS64-NEXT: mtc1 $4, $f1 |
| 6999 | ; MIPS64-NEXT: movn.s $f0, $f1, $3 |
| 7000 | ; MIPS64-NEXT: mfc1 $3, $f0 |
| 7001 | ; MIPS64-NEXT: dsll $3, $3, 32 |
| 7002 | ; MIPS64-NEXT: or $3, $1, $3 |
| 7003 | ; MIPS64-NEXT: jr $ra |
| 7004 | ; MIPS64-NEXT: nop |
| 7005 | ; |
| 7006 | ; MIPS32R5-LABEL: select: |
| 7007 | ; MIPS32R5: # %bb.0: # %entry |
| 7008 | ; MIPS32R5-NEXT: ldi.b $w0, 0 |
| 7009 | ; MIPS32R5-NEXT: lw $1, 44($sp) |
| 7010 | ; MIPS32R5-NEXT: lw $2, 40($sp) |
| 7011 | ; MIPS32R5-NEXT: move.v $w1, $w0 |
| 7012 | ; MIPS32R5-NEXT: insert.w $w1[0], $2 |
| 7013 | ; MIPS32R5-NEXT: insert.w $w1[1], $1 |
| 7014 | ; MIPS32R5-NEXT: lw $1, 48($sp) |
| 7015 | ; MIPS32R5-NEXT: insert.w $w1[2], $1 |
| 7016 | ; MIPS32R5-NEXT: lw $1, 28($sp) |
| 7017 | ; MIPS32R5-NEXT: lw $2, 52($sp) |
| 7018 | ; MIPS32R5-NEXT: lw $3, 24($sp) |
| 7019 | ; MIPS32R5-NEXT: move.v $w2, $w0 |
| 7020 | ; MIPS32R5-NEXT: insert.w $w2[0], $3 |
| 7021 | ; MIPS32R5-NEXT: insert.w $w0[0], $6 |
| 7022 | ; MIPS32R5-NEXT: insert.w $w1[3], $2 |
| 7023 | ; MIPS32R5-NEXT: insert.w $w2[1], $1 |
| 7024 | ; MIPS32R5-NEXT: lw $1, 32($sp) |
| 7025 | ; MIPS32R5-NEXT: insert.w $w2[2], $1 |
| 7026 | ; MIPS32R5-NEXT: lw $1, 36($sp) |
| 7027 | ; MIPS32R5-NEXT: insert.w $w2[3], $1 |
| 7028 | ; MIPS32R5-NEXT: insert.w $w0[1], $7 |
| 7029 | ; MIPS32R5-NEXT: lw $1, 16($sp) |
| 7030 | ; MIPS32R5-NEXT: insert.w $w0[2], $1 |
| 7031 | ; MIPS32R5-NEXT: lw $1, 20($sp) |
| 7032 | ; MIPS32R5-NEXT: insert.w $w0[3], $1 |
| 7033 | ; MIPS32R5-NEXT: slli.w $w0, $w0, 31 |
| 7034 | ; MIPS32R5-NEXT: srai.w $w0, $w0, 31 |
| 7035 | ; MIPS32R5-NEXT: bsel.v $w0, $w1, $w2 |
| 7036 | ; MIPS32R5-NEXT: st.w $w0, 0($4) |
| 7037 | ; MIPS32R5-NEXT: jr $ra |
| 7038 | ; MIPS32R5-NEXT: nop |
| 7039 | ; |
| 7040 | ; MIPS64R5EB-LABEL: select: |
| 7041 | ; MIPS64R5EB: # %bb.0: # %entry |
| 7042 | ; MIPS64R5EB-NEXT: ldi.b $w0, 0 |
| 7043 | ; MIPS64R5EB-NEXT: move.v $w1, $w0 |
| 7044 | ; MIPS64R5EB-NEXT: insert.d $w1[0], $8 |
| 7045 | ; MIPS64R5EB-NEXT: insert.d $w1[1], $9 |
| 7046 | ; MIPS64R5EB-NEXT: shf.w $w1, $w1, 177 |
| 7047 | ; MIPS64R5EB-NEXT: move.v $w2, $w0 |
| 7048 | ; MIPS64R5EB-NEXT: insert.d $w2[0], $6 |
| 7049 | ; MIPS64R5EB-NEXT: insert.d $w2[1], $7 |
| 7050 | ; MIPS64R5EB-NEXT: shf.w $w2, $w2, 177 |
| 7051 | ; MIPS64R5EB-NEXT: insert.d $w0[0], $4 |
| 7052 | ; MIPS64R5EB-NEXT: insert.d $w0[1], $5 |
| 7053 | ; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 |
| 7054 | ; MIPS64R5EB-NEXT: slli.w $w0, $w0, 31 |
| 7055 | ; MIPS64R5EB-NEXT: srai.w $w0, $w0, 31 |
| 7056 | ; MIPS64R5EB-NEXT: bsel.v $w0, $w1, $w2 |
| 7057 | ; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 |
| 7058 | ; MIPS64R5EB-NEXT: copy_s.d $2, $w0[0] |
| 7059 | ; MIPS64R5EB-NEXT: copy_s.d $3, $w0[1] |
| 7060 | ; MIPS64R5EB-NEXT: jr $ra |
| 7061 | ; MIPS64R5EB-NEXT: nop |
| 7062 | ; |
| 7063 | ; MIPS64R5EL-LABEL: select: |
| 7064 | ; MIPS64R5EL: # %bb.0: # %entry |
| 7065 | ; MIPS64R5EL-NEXT: ldi.b $w0, 0 |
| 7066 | ; MIPS64R5EL-NEXT: move.v $w1, $w0 |
| 7067 | ; MIPS64R5EL-NEXT: insert.d $w1[0], $8 |
| 7068 | ; MIPS64R5EL-NEXT: insert.d $w1[1], $9 |
| 7069 | ; MIPS64R5EL-NEXT: move.v $w2, $w0 |
| 7070 | ; MIPS64R5EL-NEXT: insert.d $w2[0], $6 |
| 7071 | ; MIPS64R5EL-NEXT: insert.d $w2[1], $7 |
| 7072 | ; MIPS64R5EL-NEXT: insert.d $w0[0], $4 |
| 7073 | ; MIPS64R5EL-NEXT: insert.d $w0[1], $5 |
| 7074 | ; MIPS64R5EL-NEXT: slli.w $w0, $w0, 31 |
| 7075 | ; MIPS64R5EL-NEXT: srai.w $w0, $w0, 31 |
| 7076 | ; MIPS64R5EL-NEXT: bsel.v $w0, $w1, $w2 |
| 7077 | ; MIPS64R5EL-NEXT: copy_s.d $2, $w0[0] |
| 7078 | ; MIPS64R5EL-NEXT: copy_s.d $3, $w0[1] |
| 7079 | ; MIPS64R5EL-NEXT: jr $ra |
| 7080 | ; MIPS64R5EL-NEXT: nop |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 7081 | entry: |
Simon Dardis | 212cccb | 2017-06-09 14:37:08 +0000 | [diff] [blame] | 7082 | %cond.t = trunc <4 x i32> %cond to <4 x i1> |
| 7083 | %res = select <4 x i1> %cond.t, <4 x float> %arg1, <4 x float> %arg2 |
| 7084 | ret <4 x float> %res |
| 7085 | } |