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=MIPS32,MIPS32EB 3; RUN: llc < %s -mtriple=mips64-unknown-linux-gnu -relocation-model=pic -mcpu=mips64 -disable-mips-delay-filler -mips-jalr-reloc=false | FileCheck %s --check-prefixes=MIPS64,MIPS64EB 4; RUN: llc < %s -mtriple=mips-unknown-linux-gnu -mcpu=mips32r5 -mattr=+fp64,+msa -disable-mips-delay-filler | FileCheck %s --check-prefixes=MIPS32R5,MIPS32R5EB 5; RUN: llc < %s -mtriple=mips64-unknown-linux-gnu -relocation-model=pic -mcpu=mips64r5 -mattr=+fp64,+msa -disable-mips-delay-filler -mips-jalr-reloc=false | FileCheck %s --check-prefixes=MIPS64R5,MIPS64R5EB 6; RUN: llc < %s -mtriple=mipsel-unknown-linux-gnu -mcpu=mips32 -disable-mips-delay-filler | FileCheck %s --check-prefixes=MIPS32,MIPS32EL 7; RUN: llc < %s -mtriple=mips64el-unknown-linux-gnu -relocation-model=pic -mcpu=mips64 -disable-mips-delay-filler -mips-jalr-reloc=false | FileCheck %s --check-prefixes=MIPS64,MIPS64EL 8; RUN: llc < %s -mtriple=mipsel-unknown-linux-gnu -mcpu=mips32r5 -mattr=+fp64,+msa -disable-mips-delay-filler | FileCheck %s --check-prefixes=MIPS32R5,MIPS32R5EL 9; RUN: llc < %s -mtriple=mips64el-unknown-linux-gnu -relocation-model=pic -mcpu=mips64r5 -mattr=+fp64,+msa -disable-mips-delay-filler -mips-jalr-reloc=false | FileCheck %s --check-prefixes=MIPS64R5,MIPS64R5EL 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 18define <2 x i8> @i8_2(<2 x i8> %a, <2 x i8> %b) { 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: 53; MIPS32R5EB-NEXT: addiu $sp, $sp, -64 54; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 64 55; MIPS32R5EB-NEXT: sw $ra, 60($sp) # 4-byte Folded Spill 56; MIPS32R5EB-NEXT: sw $fp, 56($sp) # 4-byte Folded Spill 57; MIPS32R5EB-NEXT: .cfi_offset 31, -4 58; MIPS32R5EB-NEXT: .cfi_offset 30, -8 59; MIPS32R5EB-NEXT: move $fp, $sp 60; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 61; MIPS32R5EB-NEXT: addiu $1, $zero, -16 62; MIPS32R5EB-NEXT: and $sp, $sp, $1 63; MIPS32R5EB-NEXT: sw $5, 48($sp) 64; MIPS32R5EB-NEXT: sw $4, 52($sp) 65; MIPS32R5EB-NEXT: lbu $1, 49($sp) 66; MIPS32R5EB-NEXT: sw $1, 28($sp) 67; MIPS32R5EB-NEXT: lbu $1, 48($sp) 68; MIPS32R5EB-NEXT: sw $1, 20($sp) 69; MIPS32R5EB-NEXT: lbu $1, 53($sp) 70; MIPS32R5EB-NEXT: sw $1, 12($sp) 71; MIPS32R5EB-NEXT: lbu $1, 52($sp) 72; MIPS32R5EB-NEXT: sw $1, 4($sp) 73; MIPS32R5EB-NEXT: ld.d $w0, 16($sp) 74; MIPS32R5EB-NEXT: ld.d $w1, 0($sp) 75; MIPS32R5EB-NEXT: addv.d $w0, $w1, $w0 76; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 77; MIPS32R5EB-NEXT: copy_s.w $1, $w0[1] 78; MIPS32R5EB-NEXT: copy_s.w $2, $w0[3] 79; MIPS32R5EB-NEXT: sb $2, 45($sp) 80; MIPS32R5EB-NEXT: sb $1, 44($sp) 81; MIPS32R5EB-NEXT: lhu $2, 44($sp) 82; MIPS32R5EB-NEXT: move $sp, $fp 83; MIPS32R5EB-NEXT: lw $fp, 56($sp) # 4-byte Folded Reload 84; MIPS32R5EB-NEXT: lw $ra, 60($sp) # 4-byte Folded Reload 85; MIPS32R5EB-NEXT: addiu $sp, $sp, 64 86; MIPS32R5EB-NEXT: jr $ra 87; MIPS32R5EB-NEXT: nop 88; 89; MIPS64R5EB-LABEL: i8_2: 90; MIPS64R5EB: # %bb.0: 91; MIPS64R5EB-NEXT: daddiu $sp, $sp, -96 92; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 96 93; MIPS64R5EB-NEXT: sd $4, 88($sp) 94; MIPS64R5EB-NEXT: lbu $1, 89($sp) 95; MIPS64R5EB-NEXT: sh $1, 2($sp) 96; MIPS64R5EB-NEXT: lbu $1, 88($sp) 97; MIPS64R5EB-NEXT: sh $1, 0($sp) 98; MIPS64R5EB-NEXT: ld.h $w0, 0($sp) 99; MIPS64R5EB-NEXT: copy_s.h $1, $w0[0] 100; MIPS64R5EB-NEXT: copy_s.h $2, $w0[1] 101; MIPS64R5EB-NEXT: sd $5, 80($sp) 102; MIPS64R5EB-NEXT: lbu $3, 81($sp) 103; MIPS64R5EB-NEXT: sh $3, 18($sp) 104; MIPS64R5EB-NEXT: lbu $3, 80($sp) 105; MIPS64R5EB-NEXT: sh $3, 16($sp) 106; MIPS64R5EB-NEXT: ld.h $w0, 16($sp) 107; MIPS64R5EB-NEXT: copy_s.h $3, $w0[0] 108; MIPS64R5EB-NEXT: copy_s.h $4, $w0[1] 109; MIPS64R5EB-NEXT: sw $4, 60($sp) 110; MIPS64R5EB-NEXT: sw $3, 52($sp) 111; MIPS64R5EB-NEXT: sw $2, 44($sp) 112; MIPS64R5EB-NEXT: sw $1, 36($sp) 113; MIPS64R5EB-NEXT: ld.d $w0, 48($sp) 114; MIPS64R5EB-NEXT: ld.d $w1, 32($sp) 115; MIPS64R5EB-NEXT: addv.d $w0, $w1, $w0 116; MIPS64R5EB-NEXT: copy_s.d $1, $w0[0] 117; MIPS64R5EB-NEXT: copy_s.d $2, $w0[1] 118; MIPS64R5EB-NEXT: sb $2, 77($sp) 119; MIPS64R5EB-NEXT: sb $1, 76($sp) 120; MIPS64R5EB-NEXT: lh $2, 76($sp) 121; MIPS64R5EB-NEXT: daddiu $sp, $sp, 96 122; MIPS64R5EB-NEXT: jr $ra 123; MIPS64R5EB-NEXT: nop 124; 125; MIPS32EL-LABEL: i8_2: 126; MIPS32EL: # %bb.0: 127; MIPS32EL-NEXT: addu $1, $4, $5 128; MIPS32EL-NEXT: andi $1, $1, 255 129; MIPS32EL-NEXT: andi $2, $5, 65280 130; MIPS32EL-NEXT: srl $2, $2, 8 131; MIPS32EL-NEXT: andi $3, $4, 65280 132; MIPS32EL-NEXT: srl $3, $3, 8 133; MIPS32EL-NEXT: addu $2, $3, $2 134; MIPS32EL-NEXT: sll $2, $2, 8 135; MIPS32EL-NEXT: or $2, $1, $2 136; MIPS32EL-NEXT: jr $ra 137; MIPS32EL-NEXT: nop 138; 139; MIPS64EL-LABEL: i8_2: 140; MIPS64EL: # %bb.0: 141; MIPS64EL-NEXT: sll $1, $5, 0 142; MIPS64EL-NEXT: sll $2, $4, 0 143; MIPS64EL-NEXT: addu $3, $2, $1 144; MIPS64EL-NEXT: andi $3, $3, 255 145; MIPS64EL-NEXT: andi $1, $1, 65280 146; MIPS64EL-NEXT: srl $1, $1, 8 147; MIPS64EL-NEXT: andi $2, $2, 65280 148; MIPS64EL-NEXT: srl $2, $2, 8 149; MIPS64EL-NEXT: addu $1, $2, $1 150; MIPS64EL-NEXT: sll $1, $1, 8 151; MIPS64EL-NEXT: or $2, $3, $1 152; MIPS64EL-NEXT: jr $ra 153; MIPS64EL-NEXT: nop 154; 155; MIPS32R5EL-LABEL: i8_2: 156; MIPS32R5EL: # %bb.0: 157; MIPS32R5EL-NEXT: addiu $sp, $sp, -64 158; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 64 159; MIPS32R5EL-NEXT: sw $ra, 60($sp) # 4-byte Folded Spill 160; MIPS32R5EL-NEXT: sw $fp, 56($sp) # 4-byte Folded Spill 161; MIPS32R5EL-NEXT: .cfi_offset 31, -4 162; MIPS32R5EL-NEXT: .cfi_offset 30, -8 163; MIPS32R5EL-NEXT: move $fp, $sp 164; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 165; MIPS32R5EL-NEXT: addiu $1, $zero, -16 166; MIPS32R5EL-NEXT: and $sp, $sp, $1 167; MIPS32R5EL-NEXT: sw $5, 48($sp) 168; MIPS32R5EL-NEXT: sw $4, 52($sp) 169; MIPS32R5EL-NEXT: lbu $1, 49($sp) 170; MIPS32R5EL-NEXT: sw $1, 24($sp) 171; MIPS32R5EL-NEXT: lbu $1, 48($sp) 172; MIPS32R5EL-NEXT: sw $1, 16($sp) 173; MIPS32R5EL-NEXT: lbu $1, 53($sp) 174; MIPS32R5EL-NEXT: sw $1, 8($sp) 175; MIPS32R5EL-NEXT: lbu $1, 52($sp) 176; MIPS32R5EL-NEXT: sw $1, 0($sp) 177; MIPS32R5EL-NEXT: ld.d $w0, 16($sp) 178; MIPS32R5EL-NEXT: ld.d $w1, 0($sp) 179; MIPS32R5EL-NEXT: addv.d $w0, $w1, $w0 180; MIPS32R5EL-NEXT: copy_s.w $1, $w0[0] 181; MIPS32R5EL-NEXT: copy_s.w $2, $w0[2] 182; MIPS32R5EL-NEXT: sb $2, 45($sp) 183; MIPS32R5EL-NEXT: sb $1, 44($sp) 184; MIPS32R5EL-NEXT: lhu $2, 44($sp) 185; MIPS32R5EL-NEXT: move $sp, $fp 186; MIPS32R5EL-NEXT: lw $fp, 56($sp) # 4-byte Folded Reload 187; MIPS32R5EL-NEXT: lw $ra, 60($sp) # 4-byte Folded Reload 188; MIPS32R5EL-NEXT: addiu $sp, $sp, 64 189; MIPS32R5EL-NEXT: jr $ra 190; MIPS32R5EL-NEXT: nop 191; 192; MIPS64R5EL-LABEL: i8_2: 193; MIPS64R5EL: # %bb.0: 194; MIPS64R5EL-NEXT: daddiu $sp, $sp, -96 195; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 96 196; MIPS64R5EL-NEXT: sd $4, 88($sp) 197; MIPS64R5EL-NEXT: lbu $1, 89($sp) 198; MIPS64R5EL-NEXT: sh $1, 2($sp) 199; MIPS64R5EL-NEXT: lbu $1, 88($sp) 200; MIPS64R5EL-NEXT: sh $1, 0($sp) 201; MIPS64R5EL-NEXT: ld.h $w0, 0($sp) 202; MIPS64R5EL-NEXT: copy_s.h $1, $w0[0] 203; MIPS64R5EL-NEXT: copy_s.h $2, $w0[1] 204; MIPS64R5EL-NEXT: sd $5, 80($sp) 205; MIPS64R5EL-NEXT: lbu $3, 81($sp) 206; MIPS64R5EL-NEXT: sh $3, 18($sp) 207; MIPS64R5EL-NEXT: lbu $3, 80($sp) 208; MIPS64R5EL-NEXT: sh $3, 16($sp) 209; MIPS64R5EL-NEXT: ld.h $w0, 16($sp) 210; MIPS64R5EL-NEXT: copy_s.h $3, $w0[0] 211; MIPS64R5EL-NEXT: copy_s.h $4, $w0[1] 212; MIPS64R5EL-NEXT: sw $4, 56($sp) 213; MIPS64R5EL-NEXT: sw $3, 48($sp) 214; MIPS64R5EL-NEXT: sw $2, 40($sp) 215; MIPS64R5EL-NEXT: sw $1, 32($sp) 216; MIPS64R5EL-NEXT: ld.d $w0, 48($sp) 217; MIPS64R5EL-NEXT: ld.d $w1, 32($sp) 218; MIPS64R5EL-NEXT: addv.d $w0, $w1, $w0 219; MIPS64R5EL-NEXT: copy_s.d $1, $w0[0] 220; MIPS64R5EL-NEXT: copy_s.d $2, $w0[1] 221; MIPS64R5EL-NEXT: sb $2, 77($sp) 222; MIPS64R5EL-NEXT: sb $1, 76($sp) 223; MIPS64R5EL-NEXT: lh $2, 76($sp) 224; MIPS64R5EL-NEXT: daddiu $sp, $sp, 96 225; MIPS64R5EL-NEXT: jr $ra 226; MIPS64R5EL-NEXT: nop 227 %1 = add <2 x i8> %a, %b 228 ret <2 x i8> %1 229} 230 231; Test that vector spilled to the outgoing argument area have the expected 232; offset from $sp. 233 234define <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) { 235; MIPS32EB-LABEL: i8x2_7: 236; MIPS32EB: # %bb.0: # %entry 237; MIPS32EB-NEXT: srl $1, $5, 24 238; MIPS32EB-NEXT: srl $2, $4, 24 239; MIPS32EB-NEXT: addu $1, $2, $1 240; MIPS32EB-NEXT: srl $2, $6, 24 241; MIPS32EB-NEXT: addu $1, $1, $2 242; MIPS32EB-NEXT: srl $2, $7, 24 243; MIPS32EB-NEXT: addu $1, $1, $2 244; MIPS32EB-NEXT: srl $2, $5, 16 245; MIPS32EB-NEXT: srl $3, $4, 16 246; MIPS32EB-NEXT: addu $2, $3, $2 247; MIPS32EB-NEXT: srl $3, $6, 16 248; MIPS32EB-NEXT: lbu $4, 16($sp) 249; MIPS32EB-NEXT: addu $2, $2, $3 250; MIPS32EB-NEXT: addu $1, $1, $4 251; MIPS32EB-NEXT: lbu $3, 20($sp) 252; MIPS32EB-NEXT: addu $1, $1, $3 253; MIPS32EB-NEXT: lbu $3, 24($sp) 254; MIPS32EB-NEXT: addu $1, $1, $3 255; MIPS32EB-NEXT: srl $3, $7, 16 256; MIPS32EB-NEXT: sll $1, $1, 8 257; MIPS32EB-NEXT: addu $2, $2, $3 258; MIPS32EB-NEXT: lbu $3, 17($sp) 259; MIPS32EB-NEXT: addu $2, $2, $3 260; MIPS32EB-NEXT: lbu $3, 21($sp) 261; MIPS32EB-NEXT: addu $2, $2, $3 262; MIPS32EB-NEXT: lbu $3, 25($sp) 263; MIPS32EB-NEXT: addu $2, $2, $3 264; MIPS32EB-NEXT: andi $2, $2, 255 265; MIPS32EB-NEXT: or $2, $2, $1 266; MIPS32EB-NEXT: jr $ra 267; MIPS32EB-NEXT: nop 268; 269; MIPS64EB-LABEL: i8x2_7: 270; MIPS64EB: # %bb.0: # %entry 271; MIPS64EB-NEXT: dsrl $1, $5, 56 272; MIPS64EB-NEXT: dsrl $2, $6, 56 273; MIPS64EB-NEXT: sll $1, $1, 0 274; MIPS64EB-NEXT: dsrl $3, $4, 56 275; MIPS64EB-NEXT: sll $3, $3, 0 276; MIPS64EB-NEXT: addu $1, $3, $1 277; MIPS64EB-NEXT: dsrl $3, $6, 48 278; MIPS64EB-NEXT: sll $2, $2, 0 279; MIPS64EB-NEXT: dsrl $5, $5, 48 280; MIPS64EB-NEXT: sll $5, $5, 0 281; MIPS64EB-NEXT: dsrl $4, $4, 48 282; MIPS64EB-NEXT: sll $4, $4, 0 283; MIPS64EB-NEXT: addu $4, $4, $5 284; MIPS64EB-NEXT: addu $1, $1, $2 285; MIPS64EB-NEXT: dsrl $2, $8, 48 286; MIPS64EB-NEXT: dsrl $5, $8, 56 287; MIPS64EB-NEXT: sll $3, $3, 0 288; MIPS64EB-NEXT: dsrl $6, $7, 56 289; MIPS64EB-NEXT: sll $6, $6, 0 290; MIPS64EB-NEXT: addu $1, $1, $6 291; MIPS64EB-NEXT: addu $3, $4, $3 292; MIPS64EB-NEXT: sll $4, $5, 0 293; MIPS64EB-NEXT: dsrl $5, $7, 48 294; MIPS64EB-NEXT: sll $5, $5, 0 295; MIPS64EB-NEXT: addu $3, $3, $5 296; MIPS64EB-NEXT: dsrl $5, $10, 48 297; MIPS64EB-NEXT: sll $2, $2, 0 298; MIPS64EB-NEXT: dsrl $6, $10, 56 299; MIPS64EB-NEXT: addu $1, $1, $4 300; MIPS64EB-NEXT: dsrl $4, $9, 56 301; MIPS64EB-NEXT: sll $4, $4, 0 302; MIPS64EB-NEXT: addu $1, $1, $4 303; MIPS64EB-NEXT: sll $4, $6, 0 304; MIPS64EB-NEXT: addu $1, $1, $4 305; MIPS64EB-NEXT: sll $1, $1, 8 306; MIPS64EB-NEXT: addu $2, $3, $2 307; MIPS64EB-NEXT: dsrl $3, $9, 48 308; MIPS64EB-NEXT: sll $3, $3, 0 309; MIPS64EB-NEXT: addu $2, $2, $3 310; MIPS64EB-NEXT: sll $3, $5, 0 311; MIPS64EB-NEXT: addu $2, $2, $3 312; MIPS64EB-NEXT: andi $2, $2, 255 313; MIPS64EB-NEXT: or $2, $2, $1 314; MIPS64EB-NEXT: jr $ra 315; MIPS64EB-NEXT: nop 316; 317; MIPS32R5EB-LABEL: i8x2_7: 318; MIPS32R5EB: # %bb.0: # %entry 319; MIPS32R5EB-NEXT: addiu $sp, $sp, -144 320; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 144 321; MIPS32R5EB-NEXT: sw $ra, 140($sp) # 4-byte Folded Spill 322; MIPS32R5EB-NEXT: sw $fp, 136($sp) # 4-byte Folded Spill 323; MIPS32R5EB-NEXT: .cfi_offset 31, -4 324; MIPS32R5EB-NEXT: .cfi_offset 30, -8 325; MIPS32R5EB-NEXT: move $fp, $sp 326; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 327; MIPS32R5EB-NEXT: addiu $1, $zero, -16 328; MIPS32R5EB-NEXT: and $sp, $sp, $1 329; MIPS32R5EB-NEXT: sw $5, 128($sp) 330; MIPS32R5EB-NEXT: sw $4, 132($sp) 331; MIPS32R5EB-NEXT: lbu $1, 129($sp) 332; MIPS32R5EB-NEXT: sw $1, 76($sp) 333; MIPS32R5EB-NEXT: lbu $1, 128($sp) 334; MIPS32R5EB-NEXT: sw $1, 68($sp) 335; MIPS32R5EB-NEXT: lbu $1, 133($sp) 336; MIPS32R5EB-NEXT: sw $1, 60($sp) 337; MIPS32R5EB-NEXT: lbu $1, 132($sp) 338; MIPS32R5EB-NEXT: sw $1, 52($sp) 339; MIPS32R5EB-NEXT: ld.d $w0, 64($sp) 340; MIPS32R5EB-NEXT: ld.d $w1, 48($sp) 341; MIPS32R5EB-NEXT: addv.d $w0, $w1, $w0 342; MIPS32R5EB-NEXT: sw $6, 124($sp) 343; MIPS32R5EB-NEXT: lbu $1, 125($sp) 344; MIPS32R5EB-NEXT: sw $1, 92($sp) 345; MIPS32R5EB-NEXT: lbu $1, 124($sp) 346; MIPS32R5EB-NEXT: sw $1, 84($sp) 347; MIPS32R5EB-NEXT: ld.d $w1, 80($sp) 348; MIPS32R5EB-NEXT: addv.d $w0, $w0, $w1 349; MIPS32R5EB-NEXT: sw $7, 120($sp) 350; MIPS32R5EB-NEXT: lbu $1, 121($sp) 351; MIPS32R5EB-NEXT: sw $1, 108($sp) 352; MIPS32R5EB-NEXT: lbu $1, 120($sp) 353; MIPS32R5EB-NEXT: sw $1, 100($sp) 354; MIPS32R5EB-NEXT: ld.d $w1, 96($sp) 355; MIPS32R5EB-NEXT: addv.d $w0, $w0, $w1 356; MIPS32R5EB-NEXT: lbu $1, 161($fp) 357; MIPS32R5EB-NEXT: sw $1, 12($sp) 358; MIPS32R5EB-NEXT: lbu $1, 160($fp) 359; MIPS32R5EB-NEXT: sw $1, 4($sp) 360; MIPS32R5EB-NEXT: ld.d $w1, 0($sp) 361; MIPS32R5EB-NEXT: addv.d $w0, $w0, $w1 362; MIPS32R5EB-NEXT: lbu $1, 165($fp) 363; MIPS32R5EB-NEXT: sw $1, 28($sp) 364; MIPS32R5EB-NEXT: lbu $1, 164($fp) 365; MIPS32R5EB-NEXT: sw $1, 20($sp) 366; MIPS32R5EB-NEXT: ld.d $w1, 16($sp) 367; MIPS32R5EB-NEXT: addv.d $w0, $w0, $w1 368; MIPS32R5EB-NEXT: lbu $1, 169($fp) 369; MIPS32R5EB-NEXT: sw $1, 44($sp) 370; MIPS32R5EB-NEXT: lbu $1, 168($fp) 371; MIPS32R5EB-NEXT: sw $1, 36($sp) 372; MIPS32R5EB-NEXT: ld.d $w1, 32($sp) 373; MIPS32R5EB-NEXT: addv.d $w0, $w0, $w1 374; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 375; MIPS32R5EB-NEXT: copy_s.w $1, $w0[1] 376; MIPS32R5EB-NEXT: copy_s.w $2, $w0[3] 377; MIPS32R5EB-NEXT: sb $2, 117($sp) 378; MIPS32R5EB-NEXT: sb $1, 116($sp) 379; MIPS32R5EB-NEXT: lhu $2, 116($sp) 380; MIPS32R5EB-NEXT: move $sp, $fp 381; MIPS32R5EB-NEXT: lw $fp, 136($sp) # 4-byte Folded Reload 382; MIPS32R5EB-NEXT: lw $ra, 140($sp) # 4-byte Folded Reload 383; MIPS32R5EB-NEXT: addiu $sp, $sp, 144 384; MIPS32R5EB-NEXT: jr $ra 385; MIPS32R5EB-NEXT: nop 386; 387; MIPS64R5EB-LABEL: i8x2_7: 388; MIPS64R5EB: # %bb.0: # %entry 389; MIPS64R5EB-NEXT: daddiu $sp, $sp, -288 390; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 288 391; MIPS64R5EB-NEXT: sd $4, 280($sp) 392; MIPS64R5EB-NEXT: lbu $1, 281($sp) 393; MIPS64R5EB-NEXT: sh $1, 2($sp) 394; MIPS64R5EB-NEXT: lbu $1, 280($sp) 395; MIPS64R5EB-NEXT: sh $1, 0($sp) 396; MIPS64R5EB-NEXT: ld.h $w0, 0($sp) 397; MIPS64R5EB-NEXT: copy_s.h $1, $w0[0] 398; MIPS64R5EB-NEXT: copy_s.h $2, $w0[1] 399; MIPS64R5EB-NEXT: sd $5, 272($sp) 400; MIPS64R5EB-NEXT: lbu $3, 273($sp) 401; MIPS64R5EB-NEXT: sh $3, 18($sp) 402; MIPS64R5EB-NEXT: lbu $3, 272($sp) 403; MIPS64R5EB-NEXT: sh $3, 16($sp) 404; MIPS64R5EB-NEXT: ld.h $w0, 16($sp) 405; MIPS64R5EB-NEXT: copy_s.h $3, $w0[0] 406; MIPS64R5EB-NEXT: copy_s.h $4, $w0[1] 407; MIPS64R5EB-NEXT: sw $4, 140($sp) 408; MIPS64R5EB-NEXT: sw $3, 132($sp) 409; MIPS64R5EB-NEXT: sw $2, 124($sp) 410; MIPS64R5EB-NEXT: sw $1, 116($sp) 411; MIPS64R5EB-NEXT: ld.d $w0, 128($sp) 412; MIPS64R5EB-NEXT: ld.d $w1, 112($sp) 413; MIPS64R5EB-NEXT: addv.d $w0, $w1, $w0 414; MIPS64R5EB-NEXT: sd $6, 264($sp) 415; MIPS64R5EB-NEXT: lbu $1, 265($sp) 416; MIPS64R5EB-NEXT: sh $1, 34($sp) 417; MIPS64R5EB-NEXT: lbu $1, 264($sp) 418; MIPS64R5EB-NEXT: sh $1, 32($sp) 419; MIPS64R5EB-NEXT: ld.h $w1, 32($sp) 420; MIPS64R5EB-NEXT: copy_s.h $1, $w1[0] 421; MIPS64R5EB-NEXT: copy_s.h $2, $w1[1] 422; MIPS64R5EB-NEXT: sw $2, 156($sp) 423; MIPS64R5EB-NEXT: sw $1, 148($sp) 424; MIPS64R5EB-NEXT: ld.d $w1, 144($sp) 425; MIPS64R5EB-NEXT: addv.d $w0, $w0, $w1 426; MIPS64R5EB-NEXT: sd $7, 256($sp) 427; MIPS64R5EB-NEXT: lbu $1, 257($sp) 428; MIPS64R5EB-NEXT: sh $1, 50($sp) 429; MIPS64R5EB-NEXT: lbu $1, 256($sp) 430; MIPS64R5EB-NEXT: sh $1, 48($sp) 431; MIPS64R5EB-NEXT: ld.h $w1, 48($sp) 432; MIPS64R5EB-NEXT: copy_s.h $1, $w1[0] 433; MIPS64R5EB-NEXT: copy_s.h $2, $w1[1] 434; MIPS64R5EB-NEXT: sw $2, 172($sp) 435; MIPS64R5EB-NEXT: sw $1, 164($sp) 436; MIPS64R5EB-NEXT: ld.d $w1, 160($sp) 437; MIPS64R5EB-NEXT: addv.d $w0, $w0, $w1 438; MIPS64R5EB-NEXT: sd $8, 248($sp) 439; MIPS64R5EB-NEXT: lbu $1, 249($sp) 440; MIPS64R5EB-NEXT: sh $1, 66($sp) 441; MIPS64R5EB-NEXT: lbu $1, 248($sp) 442; MIPS64R5EB-NEXT: sh $1, 64($sp) 443; MIPS64R5EB-NEXT: ld.h $w1, 64($sp) 444; MIPS64R5EB-NEXT: copy_s.h $1, $w1[0] 445; MIPS64R5EB-NEXT: copy_s.h $2, $w1[1] 446; MIPS64R5EB-NEXT: sw $2, 188($sp) 447; MIPS64R5EB-NEXT: sw $1, 180($sp) 448; MIPS64R5EB-NEXT: ld.d $w1, 176($sp) 449; MIPS64R5EB-NEXT: addv.d $w0, $w0, $w1 450; MIPS64R5EB-NEXT: sd $10, 232($sp) 451; MIPS64R5EB-NEXT: lbu $1, 233($sp) 452; MIPS64R5EB-NEXT: sh $1, 98($sp) 453; MIPS64R5EB-NEXT: lbu $1, 232($sp) 454; MIPS64R5EB-NEXT: sh $1, 96($sp) 455; MIPS64R5EB-NEXT: ld.h $w1, 96($sp) 456; MIPS64R5EB-NEXT: copy_s.h $1, $w1[0] 457; MIPS64R5EB-NEXT: copy_s.h $2, $w1[1] 458; MIPS64R5EB-NEXT: sd $9, 240($sp) 459; MIPS64R5EB-NEXT: lbu $3, 241($sp) 460; MIPS64R5EB-NEXT: sh $3, 82($sp) 461; MIPS64R5EB-NEXT: lbu $3, 240($sp) 462; MIPS64R5EB-NEXT: sh $3, 80($sp) 463; MIPS64R5EB-NEXT: ld.h $w1, 80($sp) 464; MIPS64R5EB-NEXT: copy_s.h $3, $w1[0] 465; MIPS64R5EB-NEXT: copy_s.h $4, $w1[1] 466; MIPS64R5EB-NEXT: sw $4, 204($sp) 467; MIPS64R5EB-NEXT: sw $3, 196($sp) 468; MIPS64R5EB-NEXT: ld.d $w1, 192($sp) 469; MIPS64R5EB-NEXT: addv.d $w0, $w0, $w1 470; MIPS64R5EB-NEXT: sw $2, 220($sp) 471; MIPS64R5EB-NEXT: sw $1, 212($sp) 472; MIPS64R5EB-NEXT: ld.d $w1, 208($sp) 473; MIPS64R5EB-NEXT: addv.d $w0, $w0, $w1 474; MIPS64R5EB-NEXT: copy_s.d $1, $w0[0] 475; MIPS64R5EB-NEXT: copy_s.d $2, $w0[1] 476; MIPS64R5EB-NEXT: sb $2, 229($sp) 477; MIPS64R5EB-NEXT: sb $1, 228($sp) 478; MIPS64R5EB-NEXT: lh $2, 228($sp) 479; MIPS64R5EB-NEXT: daddiu $sp, $sp, 288 480; MIPS64R5EB-NEXT: jr $ra 481; MIPS64R5EB-NEXT: nop 482; 483; MIPS32EL-LABEL: i8x2_7: 484; MIPS32EL: # %bb.0: # %entry 485; MIPS32EL-NEXT: addu $1, $4, $5 486; MIPS32EL-NEXT: addu $1, $1, $6 487; MIPS32EL-NEXT: addu $1, $1, $7 488; MIPS32EL-NEXT: andi $2, $5, 65280 489; MIPS32EL-NEXT: lbu $3, 16($sp) 490; MIPS32EL-NEXT: addu $1, $1, $3 491; MIPS32EL-NEXT: srl $2, $2, 8 492; MIPS32EL-NEXT: andi $3, $4, 65280 493; MIPS32EL-NEXT: srl $3, $3, 8 494; MIPS32EL-NEXT: addu $2, $3, $2 495; MIPS32EL-NEXT: andi $3, $6, 65280 496; MIPS32EL-NEXT: srl $3, $3, 8 497; MIPS32EL-NEXT: lbu $4, 20($sp) 498; MIPS32EL-NEXT: addu $2, $2, $3 499; MIPS32EL-NEXT: addu $1, $1, $4 500; MIPS32EL-NEXT: lbu $3, 24($sp) 501; MIPS32EL-NEXT: addu $1, $1, $3 502; MIPS32EL-NEXT: andi $3, $7, 65280 503; MIPS32EL-NEXT: srl $3, $3, 8 504; MIPS32EL-NEXT: lbu $4, 25($sp) 505; MIPS32EL-NEXT: andi $1, $1, 255 506; MIPS32EL-NEXT: addu $2, $2, $3 507; MIPS32EL-NEXT: lbu $3, 17($sp) 508; MIPS32EL-NEXT: addu $2, $2, $3 509; MIPS32EL-NEXT: lbu $3, 21($sp) 510; MIPS32EL-NEXT: addu $2, $2, $3 511; MIPS32EL-NEXT: addu $2, $2, $4 512; MIPS32EL-NEXT: sll $2, $2, 8 513; MIPS32EL-NEXT: or $2, $1, $2 514; MIPS32EL-NEXT: jr $ra 515; MIPS32EL-NEXT: nop 516; 517; MIPS64EL-LABEL: i8x2_7: 518; MIPS64EL: # %bb.0: # %entry 519; MIPS64EL-NEXT: sll $1, $5, 0 520; MIPS64EL-NEXT: sll $2, $4, 0 521; MIPS64EL-NEXT: addu $3, $2, $1 522; MIPS64EL-NEXT: sll $4, $6, 0 523; MIPS64EL-NEXT: andi $1, $1, 65280 524; MIPS64EL-NEXT: srl $1, $1, 8 525; MIPS64EL-NEXT: andi $2, $2, 65280 526; MIPS64EL-NEXT: srl $2, $2, 8 527; MIPS64EL-NEXT: addu $1, $2, $1 528; MIPS64EL-NEXT: addu $2, $3, $4 529; MIPS64EL-NEXT: sll $3, $7, 0 530; MIPS64EL-NEXT: andi $5, $3, 65280 531; MIPS64EL-NEXT: andi $4, $4, 65280 532; MIPS64EL-NEXT: srl $4, $4, 8 533; MIPS64EL-NEXT: addu $2, $2, $3 534; MIPS64EL-NEXT: addu $1, $1, $4 535; MIPS64EL-NEXT: srl $3, $5, 8 536; MIPS64EL-NEXT: sll $4, $8, 0 537; MIPS64EL-NEXT: andi $5, $4, 65280 538; MIPS64EL-NEXT: srl $5, $5, 8 539; MIPS64EL-NEXT: addu $1, $1, $3 540; MIPS64EL-NEXT: addu $2, $2, $4 541; MIPS64EL-NEXT: sll $3, $9, 0 542; MIPS64EL-NEXT: addu $2, $2, $3 543; MIPS64EL-NEXT: sll $4, $10, 0 544; MIPS64EL-NEXT: addu $2, $2, $4 545; MIPS64EL-NEXT: andi $2, $2, 255 546; MIPS64EL-NEXT: addu $1, $1, $5 547; MIPS64EL-NEXT: andi $3, $3, 65280 548; MIPS64EL-NEXT: srl $3, $3, 8 549; MIPS64EL-NEXT: addu $1, $1, $3 550; MIPS64EL-NEXT: andi $3, $4, 65280 551; MIPS64EL-NEXT: srl $3, $3, 8 552; MIPS64EL-NEXT: addu $1, $1, $3 553; MIPS64EL-NEXT: sll $1, $1, 8 554; MIPS64EL-NEXT: or $2, $2, $1 555; MIPS64EL-NEXT: jr $ra 556; MIPS64EL-NEXT: nop 557; 558; MIPS32R5EL-LABEL: i8x2_7: 559; MIPS32R5EL: # %bb.0: # %entry 560; MIPS32R5EL-NEXT: addiu $sp, $sp, -144 561; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 144 562; MIPS32R5EL-NEXT: sw $ra, 140($sp) # 4-byte Folded Spill 563; MIPS32R5EL-NEXT: sw $fp, 136($sp) # 4-byte Folded Spill 564; MIPS32R5EL-NEXT: .cfi_offset 31, -4 565; MIPS32R5EL-NEXT: .cfi_offset 30, -8 566; MIPS32R5EL-NEXT: move $fp, $sp 567; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 568; MIPS32R5EL-NEXT: addiu $1, $zero, -16 569; MIPS32R5EL-NEXT: and $sp, $sp, $1 570; MIPS32R5EL-NEXT: sw $5, 128($sp) 571; MIPS32R5EL-NEXT: sw $4, 132($sp) 572; MIPS32R5EL-NEXT: lbu $1, 129($sp) 573; MIPS32R5EL-NEXT: sw $1, 72($sp) 574; MIPS32R5EL-NEXT: lbu $1, 128($sp) 575; MIPS32R5EL-NEXT: sw $1, 64($sp) 576; MIPS32R5EL-NEXT: lbu $1, 133($sp) 577; MIPS32R5EL-NEXT: sw $1, 56($sp) 578; MIPS32R5EL-NEXT: lbu $1, 132($sp) 579; MIPS32R5EL-NEXT: sw $1, 48($sp) 580; MIPS32R5EL-NEXT: ld.d $w0, 64($sp) 581; MIPS32R5EL-NEXT: ld.d $w1, 48($sp) 582; MIPS32R5EL-NEXT: addv.d $w0, $w1, $w0 583; MIPS32R5EL-NEXT: sw $6, 124($sp) 584; MIPS32R5EL-NEXT: lbu $1, 125($sp) 585; MIPS32R5EL-NEXT: sw $1, 88($sp) 586; MIPS32R5EL-NEXT: lbu $1, 124($sp) 587; MIPS32R5EL-NEXT: sw $1, 80($sp) 588; MIPS32R5EL-NEXT: ld.d $w1, 80($sp) 589; MIPS32R5EL-NEXT: addv.d $w0, $w0, $w1 590; MIPS32R5EL-NEXT: sw $7, 120($sp) 591; MIPS32R5EL-NEXT: lbu $1, 121($sp) 592; MIPS32R5EL-NEXT: sw $1, 104($sp) 593; MIPS32R5EL-NEXT: lbu $1, 120($sp) 594; MIPS32R5EL-NEXT: sw $1, 96($sp) 595; MIPS32R5EL-NEXT: ld.d $w1, 96($sp) 596; MIPS32R5EL-NEXT: addv.d $w0, $w0, $w1 597; MIPS32R5EL-NEXT: lbu $1, 161($fp) 598; MIPS32R5EL-NEXT: sw $1, 8($sp) 599; MIPS32R5EL-NEXT: lbu $1, 160($fp) 600; MIPS32R5EL-NEXT: sw $1, 0($sp) 601; MIPS32R5EL-NEXT: ld.d $w1, 0($sp) 602; MIPS32R5EL-NEXT: addv.d $w0, $w0, $w1 603; MIPS32R5EL-NEXT: lbu $1, 165($fp) 604; MIPS32R5EL-NEXT: sw $1, 24($sp) 605; MIPS32R5EL-NEXT: lbu $1, 164($fp) 606; MIPS32R5EL-NEXT: sw $1, 16($sp) 607; MIPS32R5EL-NEXT: ld.d $w1, 16($sp) 608; MIPS32R5EL-NEXT: addv.d $w0, $w0, $w1 609; MIPS32R5EL-NEXT: lbu $1, 169($fp) 610; MIPS32R5EL-NEXT: sw $1, 40($sp) 611; MIPS32R5EL-NEXT: lbu $1, 168($fp) 612; MIPS32R5EL-NEXT: sw $1, 32($sp) 613; MIPS32R5EL-NEXT: ld.d $w1, 32($sp) 614; MIPS32R5EL-NEXT: addv.d $w0, $w0, $w1 615; MIPS32R5EL-NEXT: copy_s.w $1, $w0[0] 616; MIPS32R5EL-NEXT: copy_s.w $2, $w0[2] 617; MIPS32R5EL-NEXT: sb $2, 117($sp) 618; MIPS32R5EL-NEXT: sb $1, 116($sp) 619; MIPS32R5EL-NEXT: lhu $2, 116($sp) 620; MIPS32R5EL-NEXT: move $sp, $fp 621; MIPS32R5EL-NEXT: lw $fp, 136($sp) # 4-byte Folded Reload 622; MIPS32R5EL-NEXT: lw $ra, 140($sp) # 4-byte Folded Reload 623; MIPS32R5EL-NEXT: addiu $sp, $sp, 144 624; MIPS32R5EL-NEXT: jr $ra 625; MIPS32R5EL-NEXT: nop 626; 627; MIPS64R5EL-LABEL: i8x2_7: 628; MIPS64R5EL: # %bb.0: # %entry 629; MIPS64R5EL-NEXT: daddiu $sp, $sp, -288 630; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 288 631; MIPS64R5EL-NEXT: sd $4, 280($sp) 632; MIPS64R5EL-NEXT: lbu $1, 281($sp) 633; MIPS64R5EL-NEXT: sh $1, 2($sp) 634; MIPS64R5EL-NEXT: lbu $1, 280($sp) 635; MIPS64R5EL-NEXT: sh $1, 0($sp) 636; MIPS64R5EL-NEXT: ld.h $w0, 0($sp) 637; MIPS64R5EL-NEXT: copy_s.h $1, $w0[0] 638; MIPS64R5EL-NEXT: copy_s.h $2, $w0[1] 639; MIPS64R5EL-NEXT: sd $5, 272($sp) 640; MIPS64R5EL-NEXT: lbu $3, 273($sp) 641; MIPS64R5EL-NEXT: sh $3, 18($sp) 642; MIPS64R5EL-NEXT: lbu $3, 272($sp) 643; MIPS64R5EL-NEXT: sh $3, 16($sp) 644; MIPS64R5EL-NEXT: ld.h $w0, 16($sp) 645; MIPS64R5EL-NEXT: copy_s.h $3, $w0[0] 646; MIPS64R5EL-NEXT: copy_s.h $4, $w0[1] 647; MIPS64R5EL-NEXT: sw $4, 136($sp) 648; MIPS64R5EL-NEXT: sw $3, 128($sp) 649; MIPS64R5EL-NEXT: sw $2, 120($sp) 650; MIPS64R5EL-NEXT: sw $1, 112($sp) 651; MIPS64R5EL-NEXT: ld.d $w0, 128($sp) 652; MIPS64R5EL-NEXT: ld.d $w1, 112($sp) 653; MIPS64R5EL-NEXT: addv.d $w0, $w1, $w0 654; MIPS64R5EL-NEXT: sd $6, 264($sp) 655; MIPS64R5EL-NEXT: lbu $1, 265($sp) 656; MIPS64R5EL-NEXT: sh $1, 34($sp) 657; MIPS64R5EL-NEXT: lbu $1, 264($sp) 658; MIPS64R5EL-NEXT: sh $1, 32($sp) 659; MIPS64R5EL-NEXT: ld.h $w1, 32($sp) 660; MIPS64R5EL-NEXT: copy_s.h $1, $w1[0] 661; MIPS64R5EL-NEXT: copy_s.h $2, $w1[1] 662; MIPS64R5EL-NEXT: sw $2, 152($sp) 663; MIPS64R5EL-NEXT: sw $1, 144($sp) 664; MIPS64R5EL-NEXT: ld.d $w1, 144($sp) 665; MIPS64R5EL-NEXT: addv.d $w0, $w0, $w1 666; MIPS64R5EL-NEXT: sd $7, 256($sp) 667; MIPS64R5EL-NEXT: lbu $1, 257($sp) 668; MIPS64R5EL-NEXT: sh $1, 50($sp) 669; MIPS64R5EL-NEXT: lbu $1, 256($sp) 670; MIPS64R5EL-NEXT: sh $1, 48($sp) 671; MIPS64R5EL-NEXT: ld.h $w1, 48($sp) 672; MIPS64R5EL-NEXT: copy_s.h $1, $w1[0] 673; MIPS64R5EL-NEXT: copy_s.h $2, $w1[1] 674; MIPS64R5EL-NEXT: sw $2, 168($sp) 675; MIPS64R5EL-NEXT: sw $1, 160($sp) 676; MIPS64R5EL-NEXT: ld.d $w1, 160($sp) 677; MIPS64R5EL-NEXT: addv.d $w0, $w0, $w1 678; MIPS64R5EL-NEXT: sd $8, 248($sp) 679; MIPS64R5EL-NEXT: lbu $1, 249($sp) 680; MIPS64R5EL-NEXT: sh $1, 66($sp) 681; MIPS64R5EL-NEXT: lbu $1, 248($sp) 682; MIPS64R5EL-NEXT: sh $1, 64($sp) 683; MIPS64R5EL-NEXT: ld.h $w1, 64($sp) 684; MIPS64R5EL-NEXT: copy_s.h $1, $w1[0] 685; MIPS64R5EL-NEXT: copy_s.h $2, $w1[1] 686; MIPS64R5EL-NEXT: sw $2, 184($sp) 687; MIPS64R5EL-NEXT: sw $1, 176($sp) 688; MIPS64R5EL-NEXT: ld.d $w1, 176($sp) 689; MIPS64R5EL-NEXT: addv.d $w0, $w0, $w1 690; MIPS64R5EL-NEXT: sd $10, 232($sp) 691; MIPS64R5EL-NEXT: lbu $1, 233($sp) 692; MIPS64R5EL-NEXT: sh $1, 98($sp) 693; MIPS64R5EL-NEXT: lbu $1, 232($sp) 694; MIPS64R5EL-NEXT: sh $1, 96($sp) 695; MIPS64R5EL-NEXT: ld.h $w1, 96($sp) 696; MIPS64R5EL-NEXT: copy_s.h $1, $w1[0] 697; MIPS64R5EL-NEXT: copy_s.h $2, $w1[1] 698; MIPS64R5EL-NEXT: sd $9, 240($sp) 699; MIPS64R5EL-NEXT: lbu $3, 241($sp) 700; MIPS64R5EL-NEXT: sh $3, 82($sp) 701; MIPS64R5EL-NEXT: lbu $3, 240($sp) 702; MIPS64R5EL-NEXT: sh $3, 80($sp) 703; MIPS64R5EL-NEXT: ld.h $w1, 80($sp) 704; MIPS64R5EL-NEXT: copy_s.h $3, $w1[0] 705; MIPS64R5EL-NEXT: copy_s.h $4, $w1[1] 706; MIPS64R5EL-NEXT: sw $4, 200($sp) 707; MIPS64R5EL-NEXT: sw $3, 192($sp) 708; MIPS64R5EL-NEXT: ld.d $w1, 192($sp) 709; MIPS64R5EL-NEXT: addv.d $w0, $w0, $w1 710; MIPS64R5EL-NEXT: sw $2, 216($sp) 711; MIPS64R5EL-NEXT: sw $1, 208($sp) 712; MIPS64R5EL-NEXT: ld.d $w1, 208($sp) 713; MIPS64R5EL-NEXT: addv.d $w0, $w0, $w1 714; MIPS64R5EL-NEXT: copy_s.d $1, $w0[0] 715; MIPS64R5EL-NEXT: copy_s.d $2, $w0[1] 716; MIPS64R5EL-NEXT: sb $2, 229($sp) 717; MIPS64R5EL-NEXT: sb $1, 228($sp) 718; MIPS64R5EL-NEXT: lh $2, 228($sp) 719; MIPS64R5EL-NEXT: daddiu $sp, $sp, 288 720; MIPS64R5EL-NEXT: jr $ra 721; MIPS64R5EL-NEXT: nop 722entry: 723 %0 = add <2 x i8> %a, %b 724 %1 = add <2 x i8> %0, %c 725 %2 = add <2 x i8> %1, %d 726 %3 = add <2 x i8> %2, %e 727 %4 = add <2 x i8> %3, %f 728 %5 = add <2 x i8> %4, %g 729 ret <2 x i8> %5 730} 731 732define <4 x i8> @i8_4(<4 x i8> %a, <4 x i8> %b) { 733; MIPS32-LABEL: i8_4: 734; MIPS32: # %bb.0: 735; MIPS32-NEXT: srl $1, $5, 24 736; MIPS32-NEXT: srl $2, $4, 24 737; MIPS32-NEXT: addu $1, $2, $1 738; MIPS32-NEXT: sll $1, $1, 8 739; MIPS32-NEXT: srl $2, $5, 16 740; MIPS32-NEXT: srl $3, $4, 16 741; MIPS32-NEXT: addu $2, $3, $2 742; MIPS32-NEXT: andi $2, $2, 255 743; MIPS32-NEXT: or $1, $2, $1 744; MIPS32-NEXT: addu $2, $4, $5 745; MIPS32-NEXT: sll $1, $1, 16 746; MIPS32-NEXT: andi $2, $2, 255 747; MIPS32-NEXT: srl $3, $5, 8 748; MIPS32-NEXT: srl $4, $4, 8 749; MIPS32-NEXT: addu $3, $4, $3 750; MIPS32-NEXT: sll $3, $3, 8 751; MIPS32-NEXT: or $2, $2, $3 752; MIPS32-NEXT: andi $2, $2, 65535 753; MIPS32-NEXT: or $2, $2, $1 754; MIPS32-NEXT: jr $ra 755; MIPS32-NEXT: nop 756; 757; MIPS64-LABEL: i8_4: 758; MIPS64: # %bb.0: 759; MIPS64-NEXT: sll $1, $5, 0 760; MIPS64-NEXT: srl $2, $1, 24 761; MIPS64-NEXT: sll $3, $4, 0 762; MIPS64-NEXT: srl $4, $3, 24 763; MIPS64-NEXT: addu $2, $4, $2 764; MIPS64-NEXT: sll $2, $2, 8 765; MIPS64-NEXT: srl $4, $1, 16 766; MIPS64-NEXT: srl $5, $3, 16 767; MIPS64-NEXT: addu $4, $5, $4 768; MIPS64-NEXT: andi $4, $4, 255 769; MIPS64-NEXT: or $2, $4, $2 770; MIPS64-NEXT: addu $4, $3, $1 771; MIPS64-NEXT: sll $2, $2, 16 772; MIPS64-NEXT: andi $4, $4, 255 773; MIPS64-NEXT: srl $1, $1, 8 774; MIPS64-NEXT: srl $3, $3, 8 775; MIPS64-NEXT: addu $1, $3, $1 776; MIPS64-NEXT: sll $1, $1, 8 777; MIPS64-NEXT: or $1, $4, $1 778; MIPS64-NEXT: andi $1, $1, 65535 779; MIPS64-NEXT: or $2, $1, $2 780; MIPS64-NEXT: jr $ra 781; MIPS64-NEXT: nop 782; 783; MIPS32R5-LABEL: i8_4: 784; MIPS32R5: # %bb.0: 785; MIPS32R5-NEXT: addiu $sp, $sp, -16 786; MIPS32R5-NEXT: .cfi_def_cfa_offset 16 787; MIPS32R5-NEXT: sw $5, 8($sp) 788; MIPS32R5-NEXT: sw $4, 12($sp) 789; MIPS32R5-NEXT: lbu $1, 9($sp) 790; MIPS32R5-NEXT: lbu $2, 8($sp) 791; MIPS32R5-NEXT: insert.w $w0[0], $2 792; MIPS32R5-NEXT: insert.w $w0[1], $1 793; MIPS32R5-NEXT: lbu $1, 10($sp) 794; MIPS32R5-NEXT: insert.w $w0[2], $1 795; MIPS32R5-NEXT: lbu $1, 11($sp) 796; MIPS32R5-NEXT: insert.w $w0[3], $1 797; MIPS32R5-NEXT: lbu $1, 13($sp) 798; MIPS32R5-NEXT: lbu $2, 12($sp) 799; MIPS32R5-NEXT: insert.w $w1[0], $2 800; MIPS32R5-NEXT: insert.w $w1[1], $1 801; MIPS32R5-NEXT: lbu $1, 14($sp) 802; MIPS32R5-NEXT: insert.w $w1[2], $1 803; MIPS32R5-NEXT: lbu $1, 15($sp) 804; MIPS32R5-NEXT: insert.w $w1[3], $1 805; MIPS32R5-NEXT: addv.w $w0, $w1, $w0 806; MIPS32R5-NEXT: copy_s.w $1, $w0[0] 807; MIPS32R5-NEXT: copy_s.w $2, $w0[1] 808; MIPS32R5-NEXT: copy_s.w $3, $w0[2] 809; MIPS32R5-NEXT: copy_s.w $4, $w0[3] 810; MIPS32R5-NEXT: sb $4, 7($sp) 811; MIPS32R5-NEXT: sb $3, 6($sp) 812; MIPS32R5-NEXT: sb $2, 5($sp) 813; MIPS32R5-NEXT: sb $1, 4($sp) 814; MIPS32R5-NEXT: lw $2, 4($sp) 815; MIPS32R5-NEXT: addiu $sp, $sp, 16 816; MIPS32R5-NEXT: jr $ra 817; MIPS32R5-NEXT: nop 818; 819; MIPS64R5-LABEL: i8_4: 820; MIPS64R5: # %bb.0: 821; MIPS64R5-NEXT: daddiu $sp, $sp, -16 822; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 823; MIPS64R5-NEXT: sll $1, $5, 0 824; MIPS64R5-NEXT: sw $1, 8($sp) 825; MIPS64R5-NEXT: sll $1, $4, 0 826; MIPS64R5-NEXT: sw $1, 12($sp) 827; MIPS64R5-NEXT: lbu $1, 9($sp) 828; MIPS64R5-NEXT: lbu $2, 8($sp) 829; MIPS64R5-NEXT: insert.w $w0[0], $2 830; MIPS64R5-NEXT: insert.w $w0[1], $1 831; MIPS64R5-NEXT: lbu $1, 10($sp) 832; MIPS64R5-NEXT: insert.w $w0[2], $1 833; MIPS64R5-NEXT: lbu $1, 11($sp) 834; MIPS64R5-NEXT: insert.w $w0[3], $1 835; MIPS64R5-NEXT: lbu $1, 13($sp) 836; MIPS64R5-NEXT: lbu $2, 12($sp) 837; MIPS64R5-NEXT: insert.w $w1[0], $2 838; MIPS64R5-NEXT: insert.w $w1[1], $1 839; MIPS64R5-NEXT: lbu $1, 14($sp) 840; MIPS64R5-NEXT: insert.w $w1[2], $1 841; MIPS64R5-NEXT: lbu $1, 15($sp) 842; MIPS64R5-NEXT: insert.w $w1[3], $1 843; MIPS64R5-NEXT: addv.w $w0, $w1, $w0 844; MIPS64R5-NEXT: copy_s.w $1, $w0[0] 845; MIPS64R5-NEXT: copy_s.w $2, $w0[1] 846; MIPS64R5-NEXT: copy_s.w $3, $w0[2] 847; MIPS64R5-NEXT: copy_s.w $4, $w0[3] 848; MIPS64R5-NEXT: sb $4, 7($sp) 849; MIPS64R5-NEXT: sb $3, 6($sp) 850; MIPS64R5-NEXT: sb $2, 5($sp) 851; MIPS64R5-NEXT: sb $1, 4($sp) 852; MIPS64R5-NEXT: lw $2, 4($sp) 853; MIPS64R5-NEXT: daddiu $sp, $sp, 16 854; MIPS64R5-NEXT: jr $ra 855; MIPS64R5-NEXT: nop 856 %1 = add <4 x i8> %a, %b 857 ret <4 x i8> %1 858} 859 860define <8 x i8> @i8_8(<8 x i8> %a, <8 x i8> %b) { 861; MIPS32-LABEL: i8_8: 862; MIPS32: # %bb.0: 863; MIPS32-NEXT: srl $1, $6, 24 864; MIPS32-NEXT: srl $2, $4, 24 865; MIPS32-NEXT: addu $1, $2, $1 866; MIPS32-NEXT: sll $1, $1, 8 867; MIPS32-NEXT: srl $2, $6, 16 868; MIPS32-NEXT: srl $3, $4, 16 869; MIPS32-NEXT: addu $2, $3, $2 870; MIPS32-NEXT: andi $2, $2, 255 871; MIPS32-NEXT: srl $3, $7, 24 872; MIPS32-NEXT: srl $8, $5, 24 873; MIPS32-NEXT: or $1, $2, $1 874; MIPS32-NEXT: addu $2, $8, $3 875; MIPS32-NEXT: addu $3, $4, $6 876; MIPS32-NEXT: sll $2, $2, 8 877; MIPS32-NEXT: srl $8, $7, 16 878; MIPS32-NEXT: srl $9, $5, 16 879; MIPS32-NEXT: addu $8, $9, $8 880; MIPS32-NEXT: andi $8, $8, 255 881; MIPS32-NEXT: or $8, $8, $2 882; MIPS32-NEXT: sll $1, $1, 16 883; MIPS32-NEXT: andi $2, $3, 255 884; MIPS32-NEXT: srl $3, $6, 8 885; MIPS32-NEXT: srl $4, $4, 8 886; MIPS32-NEXT: addu $3, $4, $3 887; MIPS32-NEXT: sll $3, $3, 8 888; MIPS32-NEXT: or $2, $2, $3 889; MIPS32-NEXT: andi $2, $2, 65535 890; MIPS32-NEXT: addu $3, $5, $7 891; MIPS32-NEXT: or $2, $2, $1 892; MIPS32-NEXT: sll $1, $8, 16 893; MIPS32-NEXT: andi $3, $3, 255 894; MIPS32-NEXT: srl $4, $7, 8 895; MIPS32-NEXT: srl $5, $5, 8 896; MIPS32-NEXT: addu $4, $5, $4 897; MIPS32-NEXT: sll $4, $4, 8 898; MIPS32-NEXT: or $3, $3, $4 899; MIPS32-NEXT: andi $3, $3, 65535 900; MIPS32-NEXT: or $3, $3, $1 901; MIPS32-NEXT: jr $ra 902; MIPS32-NEXT: nop 903; 904; MIPS64-LABEL: i8_8: 905; MIPS64: # %bb.0: 906; MIPS64-NEXT: dsrl $1, $5, 56 907; MIPS64-NEXT: sll $1, $1, 0 908; MIPS64-NEXT: dsrl $2, $4, 56 909; MIPS64-NEXT: sll $2, $2, 0 910; MIPS64-NEXT: addu $1, $2, $1 911; MIPS64-NEXT: dsrl $2, $5, 48 912; MIPS64-NEXT: sll $1, $1, 8 913; MIPS64-NEXT: sll $2, $2, 0 914; MIPS64-NEXT: dsrl $3, $4, 48 915; MIPS64-NEXT: sll $3, $3, 0 916; MIPS64-NEXT: addu $2, $3, $2 917; MIPS64-NEXT: andi $2, $2, 255 918; MIPS64-NEXT: dsrl $3, $5, 40 919; MIPS64-NEXT: or $1, $2, $1 920; MIPS64-NEXT: sll $2, $5, 0 921; MIPS64-NEXT: sll $3, $3, 0 922; MIPS64-NEXT: dsrl $6, $4, 40 923; MIPS64-NEXT: sll $6, $6, 0 924; MIPS64-NEXT: addu $3, $6, $3 925; MIPS64-NEXT: dsrl $5, $5, 32 926; MIPS64-NEXT: srl $6, $2, 24 927; MIPS64-NEXT: sll $7, $4, 0 928; MIPS64-NEXT: srl $8, $7, 24 929; MIPS64-NEXT: addu $6, $8, $6 930; MIPS64-NEXT: sll $1, $1, 16 931; MIPS64-NEXT: sll $3, $3, 8 932; MIPS64-NEXT: sll $5, $5, 0 933; MIPS64-NEXT: dsrl $4, $4, 32 934; MIPS64-NEXT: sll $4, $4, 0 935; MIPS64-NEXT: addu $4, $4, $5 936; MIPS64-NEXT: andi $4, $4, 255 937; MIPS64-NEXT: or $3, $4, $3 938; MIPS64-NEXT: andi $3, $3, 65535 939; MIPS64-NEXT: or $1, $3, $1 940; MIPS64-NEXT: sll $3, $6, 8 941; MIPS64-NEXT: srl $4, $2, 16 942; MIPS64-NEXT: srl $5, $7, 16 943; MIPS64-NEXT: addu $4, $5, $4 944; MIPS64-NEXT: andi $4, $4, 255 945; MIPS64-NEXT: or $3, $4, $3 946; MIPS64-NEXT: addu $4, $7, $2 947; MIPS64-NEXT: dsll $1, $1, 32 948; MIPS64-NEXT: sll $3, $3, 16 949; MIPS64-NEXT: andi $4, $4, 255 950; MIPS64-NEXT: srl $2, $2, 8 951; MIPS64-NEXT: srl $5, $7, 8 952; MIPS64-NEXT: addu $2, $5, $2 953; MIPS64-NEXT: sll $2, $2, 8 954; MIPS64-NEXT: or $2, $4, $2 955; MIPS64-NEXT: andi $2, $2, 65535 956; MIPS64-NEXT: or $2, $2, $3 957; MIPS64-NEXT: dsll $2, $2, 32 958; MIPS64-NEXT: dsrl $2, $2, 32 959; MIPS64-NEXT: or $2, $2, $1 960; MIPS64-NEXT: jr $ra 961; MIPS64-NEXT: nop 962; 963; MIPS32R5EB-LABEL: i8_8: 964; MIPS32R5EB: # %bb.0: 965; MIPS32R5EB-NEXT: addiu $sp, $sp, -48 966; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 48 967; MIPS32R5EB-NEXT: sw $ra, 44($sp) # 4-byte Folded Spill 968; MIPS32R5EB-NEXT: sw $fp, 40($sp) # 4-byte Folded Spill 969; MIPS32R5EB-NEXT: .cfi_offset 31, -4 970; MIPS32R5EB-NEXT: .cfi_offset 30, -8 971; MIPS32R5EB-NEXT: move $fp, $sp 972; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 973; MIPS32R5EB-NEXT: addiu $1, $zero, -16 974; MIPS32R5EB-NEXT: and $sp, $sp, $1 975; MIPS32R5EB-NEXT: sw $6, 24($sp) 976; MIPS32R5EB-NEXT: lbu $1, 25($sp) 977; MIPS32R5EB-NEXT: lbu $2, 24($sp) 978; MIPS32R5EB-NEXT: sw $7, 28($sp) 979; MIPS32R5EB-NEXT: insert.h $w0[0], $2 980; MIPS32R5EB-NEXT: insert.h $w0[1], $1 981; MIPS32R5EB-NEXT: lbu $1, 26($sp) 982; MIPS32R5EB-NEXT: sw $4, 32($sp) 983; MIPS32R5EB-NEXT: insert.h $w0[2], $1 984; MIPS32R5EB-NEXT: lbu $1, 27($sp) 985; MIPS32R5EB-NEXT: insert.h $w0[3], $1 986; MIPS32R5EB-NEXT: lbu $1, 28($sp) 987; MIPS32R5EB-NEXT: sw $5, 36($sp) 988; MIPS32R5EB-NEXT: insert.h $w0[4], $1 989; MIPS32R5EB-NEXT: lbu $1, 33($sp) 990; MIPS32R5EB-NEXT: lbu $2, 32($sp) 991; MIPS32R5EB-NEXT: insert.h $w1[0], $2 992; MIPS32R5EB-NEXT: insert.h $w1[1], $1 993; MIPS32R5EB-NEXT: lbu $1, 29($sp) 994; MIPS32R5EB-NEXT: lbu $2, 34($sp) 995; MIPS32R5EB-NEXT: insert.h $w1[2], $2 996; MIPS32R5EB-NEXT: insert.h $w0[5], $1 997; MIPS32R5EB-NEXT: lbu $1, 35($sp) 998; MIPS32R5EB-NEXT: lbu $2, 31($sp) 999; MIPS32R5EB-NEXT: lbu $3, 30($sp) 1000; MIPS32R5EB-NEXT: lbu $4, 39($sp) 1001; MIPS32R5EB-NEXT: insert.h $w0[6], $3 1002; MIPS32R5EB-NEXT: insert.h $w0[7], $2 1003; MIPS32R5EB-NEXT: insert.h $w1[3], $1 1004; MIPS32R5EB-NEXT: lbu $1, 36($sp) 1005; MIPS32R5EB-NEXT: insert.h $w1[4], $1 1006; MIPS32R5EB-NEXT: lbu $1, 37($sp) 1007; MIPS32R5EB-NEXT: insert.h $w1[5], $1 1008; MIPS32R5EB-NEXT: lbu $1, 38($sp) 1009; MIPS32R5EB-NEXT: insert.h $w1[6], $1 1010; MIPS32R5EB-NEXT: insert.h $w1[7], $4 1011; MIPS32R5EB-NEXT: addv.h $w0, $w1, $w0 1012; MIPS32R5EB-NEXT: copy_s.h $1, $w0[0] 1013; MIPS32R5EB-NEXT: copy_s.h $2, $w0[1] 1014; MIPS32R5EB-NEXT: copy_s.h $3, $w0[2] 1015; MIPS32R5EB-NEXT: copy_s.h $4, $w0[3] 1016; MIPS32R5EB-NEXT: copy_s.h $5, $w0[4] 1017; MIPS32R5EB-NEXT: copy_s.h $6, $w0[5] 1018; MIPS32R5EB-NEXT: copy_s.h $7, $w0[6] 1019; MIPS32R5EB-NEXT: copy_s.h $8, $w0[7] 1020; MIPS32R5EB-NEXT: sb $8, 23($sp) 1021; MIPS32R5EB-NEXT: sb $7, 22($sp) 1022; MIPS32R5EB-NEXT: sb $6, 21($sp) 1023; MIPS32R5EB-NEXT: sb $5, 20($sp) 1024; MIPS32R5EB-NEXT: sb $4, 19($sp) 1025; MIPS32R5EB-NEXT: sb $3, 18($sp) 1026; MIPS32R5EB-NEXT: sb $2, 17($sp) 1027; MIPS32R5EB-NEXT: sb $1, 16($sp) 1028; MIPS32R5EB-NEXT: lw $1, 20($sp) 1029; MIPS32R5EB-NEXT: sw $1, 12($sp) 1030; MIPS32R5EB-NEXT: lw $1, 16($sp) 1031; MIPS32R5EB-NEXT: sw $1, 4($sp) 1032; MIPS32R5EB-NEXT: ld.w $w0, 0($sp) 1033; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] 1034; MIPS32R5EB-NEXT: copy_s.w $3, $w0[3] 1035; MIPS32R5EB-NEXT: move $sp, $fp 1036; MIPS32R5EB-NEXT: lw $fp, 40($sp) # 4-byte Folded Reload 1037; MIPS32R5EB-NEXT: lw $ra, 44($sp) # 4-byte Folded Reload 1038; MIPS32R5EB-NEXT: addiu $sp, $sp, 48 1039; MIPS32R5EB-NEXT: jr $ra 1040; MIPS32R5EB-NEXT: nop 1041; 1042; MIPS64R5-LABEL: i8_8: 1043; MIPS64R5: # %bb.0: 1044; MIPS64R5-NEXT: daddiu $sp, $sp, -32 1045; MIPS64R5-NEXT: .cfi_def_cfa_offset 32 1046; MIPS64R5-NEXT: sd $5, 16($sp) 1047; MIPS64R5-NEXT: lbu $1, 17($sp) 1048; MIPS64R5-NEXT: lbu $2, 16($sp) 1049; MIPS64R5-NEXT: sd $4, 24($sp) 1050; MIPS64R5-NEXT: insert.h $w0[0], $2 1051; MIPS64R5-NEXT: insert.h $w0[1], $1 1052; MIPS64R5-NEXT: lbu $1, 18($sp) 1053; MIPS64R5-NEXT: insert.h $w0[2], $1 1054; MIPS64R5-NEXT: lbu $1, 19($sp) 1055; MIPS64R5-NEXT: insert.h $w0[3], $1 1056; MIPS64R5-NEXT: lbu $1, 20($sp) 1057; MIPS64R5-NEXT: insert.h $w0[4], $1 1058; MIPS64R5-NEXT: lbu $1, 25($sp) 1059; MIPS64R5-NEXT: lbu $2, 24($sp) 1060; MIPS64R5-NEXT: insert.h $w1[0], $2 1061; MIPS64R5-NEXT: insert.h $w1[1], $1 1062; MIPS64R5-NEXT: lbu $1, 21($sp) 1063; MIPS64R5-NEXT: lbu $2, 26($sp) 1064; MIPS64R5-NEXT: insert.h $w1[2], $2 1065; MIPS64R5-NEXT: insert.h $w0[5], $1 1066; MIPS64R5-NEXT: lbu $1, 27($sp) 1067; MIPS64R5-NEXT: lbu $2, 23($sp) 1068; MIPS64R5-NEXT: lbu $3, 22($sp) 1069; MIPS64R5-NEXT: lbu $4, 31($sp) 1070; MIPS64R5-NEXT: insert.h $w0[6], $3 1071; MIPS64R5-NEXT: insert.h $w0[7], $2 1072; MIPS64R5-NEXT: insert.h $w1[3], $1 1073; MIPS64R5-NEXT: lbu $1, 28($sp) 1074; MIPS64R5-NEXT: insert.h $w1[4], $1 1075; MIPS64R5-NEXT: lbu $1, 29($sp) 1076; MIPS64R5-NEXT: insert.h $w1[5], $1 1077; MIPS64R5-NEXT: lbu $1, 30($sp) 1078; MIPS64R5-NEXT: insert.h $w1[6], $1 1079; MIPS64R5-NEXT: insert.h $w1[7], $4 1080; MIPS64R5-NEXT: addv.h $w0, $w1, $w0 1081; MIPS64R5-NEXT: copy_s.h $1, $w0[0] 1082; MIPS64R5-NEXT: copy_s.h $2, $w0[1] 1083; MIPS64R5-NEXT: copy_s.h $3, $w0[2] 1084; MIPS64R5-NEXT: copy_s.h $4, $w0[3] 1085; MIPS64R5-NEXT: copy_s.h $5, $w0[4] 1086; MIPS64R5-NEXT: copy_s.h $6, $w0[5] 1087; MIPS64R5-NEXT: copy_s.h $7, $w0[6] 1088; MIPS64R5-NEXT: copy_s.h $8, $w0[7] 1089; MIPS64R5-NEXT: sb $8, 15($sp) 1090; MIPS64R5-NEXT: sb $7, 14($sp) 1091; MIPS64R5-NEXT: sb $6, 13($sp) 1092; MIPS64R5-NEXT: sb $5, 12($sp) 1093; MIPS64R5-NEXT: sb $4, 11($sp) 1094; MIPS64R5-NEXT: sb $3, 10($sp) 1095; MIPS64R5-NEXT: sb $2, 9($sp) 1096; MIPS64R5-NEXT: sb $1, 8($sp) 1097; MIPS64R5-NEXT: ld $2, 8($sp) 1098; MIPS64R5-NEXT: daddiu $sp, $sp, 32 1099; MIPS64R5-NEXT: jr $ra 1100; MIPS64R5-NEXT: nop 1101; 1102; MIPS32R5EL-LABEL: i8_8: 1103; MIPS32R5EL: # %bb.0: 1104; MIPS32R5EL-NEXT: addiu $sp, $sp, -48 1105; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 48 1106; MIPS32R5EL-NEXT: sw $ra, 44($sp) # 4-byte Folded Spill 1107; MIPS32R5EL-NEXT: sw $fp, 40($sp) # 4-byte Folded Spill 1108; MIPS32R5EL-NEXT: .cfi_offset 31, -4 1109; MIPS32R5EL-NEXT: .cfi_offset 30, -8 1110; MIPS32R5EL-NEXT: move $fp, $sp 1111; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 1112; MIPS32R5EL-NEXT: addiu $1, $zero, -16 1113; MIPS32R5EL-NEXT: and $sp, $sp, $1 1114; MIPS32R5EL-NEXT: sw $6, 24($sp) 1115; MIPS32R5EL-NEXT: lbu $1, 25($sp) 1116; MIPS32R5EL-NEXT: lbu $2, 24($sp) 1117; MIPS32R5EL-NEXT: sw $7, 28($sp) 1118; MIPS32R5EL-NEXT: insert.h $w0[0], $2 1119; MIPS32R5EL-NEXT: insert.h $w0[1], $1 1120; MIPS32R5EL-NEXT: lbu $1, 26($sp) 1121; MIPS32R5EL-NEXT: sw $4, 32($sp) 1122; MIPS32R5EL-NEXT: insert.h $w0[2], $1 1123; MIPS32R5EL-NEXT: lbu $1, 27($sp) 1124; MIPS32R5EL-NEXT: insert.h $w0[3], $1 1125; MIPS32R5EL-NEXT: lbu $1, 28($sp) 1126; MIPS32R5EL-NEXT: sw $5, 36($sp) 1127; MIPS32R5EL-NEXT: insert.h $w0[4], $1 1128; MIPS32R5EL-NEXT: lbu $1, 33($sp) 1129; MIPS32R5EL-NEXT: lbu $2, 32($sp) 1130; MIPS32R5EL-NEXT: insert.h $w1[0], $2 1131; MIPS32R5EL-NEXT: insert.h $w1[1], $1 1132; MIPS32R5EL-NEXT: lbu $1, 29($sp) 1133; MIPS32R5EL-NEXT: lbu $2, 34($sp) 1134; MIPS32R5EL-NEXT: insert.h $w1[2], $2 1135; MIPS32R5EL-NEXT: insert.h $w0[5], $1 1136; MIPS32R5EL-NEXT: lbu $1, 35($sp) 1137; MIPS32R5EL-NEXT: lbu $2, 31($sp) 1138; MIPS32R5EL-NEXT: lbu $3, 30($sp) 1139; MIPS32R5EL-NEXT: lbu $4, 39($sp) 1140; MIPS32R5EL-NEXT: insert.h $w0[6], $3 1141; MIPS32R5EL-NEXT: insert.h $w0[7], $2 1142; MIPS32R5EL-NEXT: insert.h $w1[3], $1 1143; MIPS32R5EL-NEXT: lbu $1, 36($sp) 1144; MIPS32R5EL-NEXT: insert.h $w1[4], $1 1145; MIPS32R5EL-NEXT: lbu $1, 37($sp) 1146; MIPS32R5EL-NEXT: insert.h $w1[5], $1 1147; MIPS32R5EL-NEXT: lbu $1, 38($sp) 1148; MIPS32R5EL-NEXT: insert.h $w1[6], $1 1149; MIPS32R5EL-NEXT: insert.h $w1[7], $4 1150; MIPS32R5EL-NEXT: addv.h $w0, $w1, $w0 1151; MIPS32R5EL-NEXT: copy_s.h $1, $w0[0] 1152; MIPS32R5EL-NEXT: copy_s.h $2, $w0[1] 1153; MIPS32R5EL-NEXT: copy_s.h $3, $w0[2] 1154; MIPS32R5EL-NEXT: copy_s.h $4, $w0[3] 1155; MIPS32R5EL-NEXT: copy_s.h $5, $w0[4] 1156; MIPS32R5EL-NEXT: copy_s.h $6, $w0[5] 1157; MIPS32R5EL-NEXT: copy_s.h $7, $w0[6] 1158; MIPS32R5EL-NEXT: copy_s.h $8, $w0[7] 1159; MIPS32R5EL-NEXT: sb $8, 23($sp) 1160; MIPS32R5EL-NEXT: sb $7, 22($sp) 1161; MIPS32R5EL-NEXT: sb $6, 21($sp) 1162; MIPS32R5EL-NEXT: sb $5, 20($sp) 1163; MIPS32R5EL-NEXT: sb $4, 19($sp) 1164; MIPS32R5EL-NEXT: sb $3, 18($sp) 1165; MIPS32R5EL-NEXT: sb $2, 17($sp) 1166; MIPS32R5EL-NEXT: sb $1, 16($sp) 1167; MIPS32R5EL-NEXT: lw $1, 20($sp) 1168; MIPS32R5EL-NEXT: sw $1, 8($sp) 1169; MIPS32R5EL-NEXT: lw $1, 16($sp) 1170; MIPS32R5EL-NEXT: sw $1, 0($sp) 1171; MIPS32R5EL-NEXT: ld.w $w0, 0($sp) 1172; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] 1173; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] 1174; MIPS32R5EL-NEXT: move $sp, $fp 1175; MIPS32R5EL-NEXT: lw $fp, 40($sp) # 4-byte Folded Reload 1176; MIPS32R5EL-NEXT: lw $ra, 44($sp) # 4-byte Folded Reload 1177; MIPS32R5EL-NEXT: addiu $sp, $sp, 48 1178; MIPS32R5EL-NEXT: jr $ra 1179; MIPS32R5EL-NEXT: nop 1180 %1 = add <8 x i8> %a, %b 1181 ret <8 x i8> %1 1182} 1183 1184define <16 x i8> @i8_16(<16 x i8> %a, <16 x i8> %b) { 1185; MIPS32-LABEL: i8_16: 1186; MIPS32: # %bb.0: 1187; MIPS32-NEXT: lw $1, 24($sp) 1188; MIPS32-NEXT: srl $2, $1, 24 1189; MIPS32-NEXT: srl $3, $6, 24 1190; MIPS32-NEXT: srl $8, $1, 16 1191; MIPS32-NEXT: srl $9, $6, 16 1192; MIPS32-NEXT: srl $10, $1, 8 1193; MIPS32-NEXT: srl $11, $6, 8 1194; MIPS32-NEXT: lw $12, 20($sp) 1195; MIPS32-NEXT: srl $13, $12, 8 1196; MIPS32-NEXT: srl $14, $5, 8 1197; MIPS32-NEXT: addu $13, $14, $13 1198; MIPS32-NEXT: addu $14, $5, $12 1199; MIPS32-NEXT: addu $10, $11, $10 1200; MIPS32-NEXT: addu $1, $6, $1 1201; MIPS32-NEXT: addu $6, $9, $8 1202; MIPS32-NEXT: addu $2, $3, $2 1203; MIPS32-NEXT: srl $3, $12, 24 1204; MIPS32-NEXT: srl $8, $5, 24 1205; MIPS32-NEXT: srl $9, $12, 16 1206; MIPS32-NEXT: srl $5, $5, 16 1207; MIPS32-NEXT: addu $5, $5, $9 1208; MIPS32-NEXT: addu $3, $8, $3 1209; MIPS32-NEXT: sll $2, $2, 8 1210; MIPS32-NEXT: andi $6, $6, 255 1211; MIPS32-NEXT: andi $1, $1, 255 1212; MIPS32-NEXT: sll $8, $10, 8 1213; MIPS32-NEXT: andi $9, $14, 255 1214; MIPS32-NEXT: sll $10, $13, 8 1215; MIPS32-NEXT: lw $11, 28($sp) 1216; MIPS32-NEXT: lw $12, 16($sp) 1217; MIPS32-NEXT: srl $13, $12, 24 1218; MIPS32-NEXT: srl $14, $4, 24 1219; MIPS32-NEXT: srl $15, $11, 24 1220; MIPS32-NEXT: srl $24, $7, 24 1221; MIPS32-NEXT: or $9, $9, $10 1222; MIPS32-NEXT: or $1, $1, $8 1223; MIPS32-NEXT: or $2, $6, $2 1224; MIPS32-NEXT: addu $6, $24, $15 1225; MIPS32-NEXT: sll $3, $3, 8 1226; MIPS32-NEXT: andi $5, $5, 255 1227; MIPS32-NEXT: addu $8, $14, $13 1228; MIPS32-NEXT: sll $8, $8, 8 1229; MIPS32-NEXT: srl $10, $12, 16 1230; MIPS32-NEXT: srl $13, $4, 16 1231; MIPS32-NEXT: addu $10, $13, $10 1232; MIPS32-NEXT: andi $10, $10, 255 1233; MIPS32-NEXT: or $8, $10, $8 1234; MIPS32-NEXT: or $3, $5, $3 1235; MIPS32-NEXT: addu $5, $4, $12 1236; MIPS32-NEXT: sll $6, $6, 8 1237; MIPS32-NEXT: srl $10, $11, 16 1238; MIPS32-NEXT: srl $13, $7, 16 1239; MIPS32-NEXT: addu $10, $13, $10 1240; MIPS32-NEXT: andi $10, $10, 255 1241; MIPS32-NEXT: or $6, $10, $6 1242; MIPS32-NEXT: sll $10, $2, 16 1243; MIPS32-NEXT: andi $1, $1, 65535 1244; MIPS32-NEXT: sll $3, $3, 16 1245; MIPS32-NEXT: andi $9, $9, 65535 1246; MIPS32-NEXT: sll $2, $8, 16 1247; MIPS32-NEXT: andi $5, $5, 255 1248; MIPS32-NEXT: srl $8, $12, 8 1249; MIPS32-NEXT: srl $4, $4, 8 1250; MIPS32-NEXT: addu $4, $4, $8 1251; MIPS32-NEXT: sll $4, $4, 8 1252; MIPS32-NEXT: or $4, $5, $4 1253; MIPS32-NEXT: andi $4, $4, 65535 1254; MIPS32-NEXT: addu $5, $7, $11 1255; MIPS32-NEXT: or $2, $4, $2 1256; MIPS32-NEXT: or $3, $9, $3 1257; MIPS32-NEXT: or $4, $1, $10 1258; MIPS32-NEXT: sll $1, $6, 16 1259; MIPS32-NEXT: andi $5, $5, 255 1260; MIPS32-NEXT: srl $6, $11, 8 1261; MIPS32-NEXT: srl $7, $7, 8 1262; MIPS32-NEXT: addu $6, $7, $6 1263; MIPS32-NEXT: sll $6, $6, 8 1264; MIPS32-NEXT: or $5, $5, $6 1265; MIPS32-NEXT: andi $5, $5, 65535 1266; MIPS32-NEXT: or $5, $5, $1 1267; MIPS32-NEXT: jr $ra 1268; MIPS32-NEXT: nop 1269; 1270; MIPS64-LABEL: i8_16: 1271; MIPS64: # %bb.0: 1272; MIPS64-NEXT: dsrl $1, $7, 56 1273; MIPS64-NEXT: dsrl $2, $5, 56 1274; MIPS64-NEXT: dsrl $3, $7, 48 1275; MIPS64-NEXT: dsrl $8, $5, 48 1276; MIPS64-NEXT: dsrl $9, $6, 56 1277; MIPS64-NEXT: dsrl $10, $4, 56 1278; MIPS64-NEXT: dsrl $11, $7, 32 1279; MIPS64-NEXT: sll $1, $1, 0 1280; MIPS64-NEXT: sll $2, $2, 0 1281; MIPS64-NEXT: sll $3, $3, 0 1282; MIPS64-NEXT: sll $8, $8, 0 1283; MIPS64-NEXT: dsrl $12, $7, 40 1284; MIPS64-NEXT: sll $12, $12, 0 1285; MIPS64-NEXT: dsrl $13, $5, 40 1286; MIPS64-NEXT: sll $13, $13, 0 1287; MIPS64-NEXT: addu $12, $13, $12 1288; MIPS64-NEXT: addu $3, $8, $3 1289; MIPS64-NEXT: addu $1, $2, $1 1290; MIPS64-NEXT: sll $2, $9, 0 1291; MIPS64-NEXT: sll $8, $10, 0 1292; MIPS64-NEXT: dsrl $9, $6, 48 1293; MIPS64-NEXT: sll $9, $9, 0 1294; MIPS64-NEXT: dsrl $10, $4, 48 1295; MIPS64-NEXT: sll $10, $10, 0 1296; MIPS64-NEXT: addu $9, $10, $9 1297; MIPS64-NEXT: addu $2, $8, $2 1298; MIPS64-NEXT: sll $1, $1, 8 1299; MIPS64-NEXT: andi $3, $3, 255 1300; MIPS64-NEXT: sll $8, $12, 8 1301; MIPS64-NEXT: sll $10, $11, 0 1302; MIPS64-NEXT: dsrl $11, $5, 32 1303; MIPS64-NEXT: sll $11, $11, 0 1304; MIPS64-NEXT: addu $10, $11, $10 1305; MIPS64-NEXT: andi $10, $10, 255 1306; MIPS64-NEXT: or $8, $10, $8 1307; MIPS64-NEXT: sll $10, $6, 0 1308; MIPS64-NEXT: or $1, $3, $1 1309; MIPS64-NEXT: sll $2, $2, 8 1310; MIPS64-NEXT: andi $3, $9, 255 1311; MIPS64-NEXT: dsrl $9, $6, 40 1312; MIPS64-NEXT: srl $11, $10, 24 1313; MIPS64-NEXT: sll $12, $4, 0 1314; MIPS64-NEXT: srl $13, $12, 24 1315; MIPS64-NEXT: srl $14, $10, 16 1316; MIPS64-NEXT: srl $15, $12, 16 1317; MIPS64-NEXT: andi $8, $8, 65535 1318; MIPS64-NEXT: addu $14, $15, $14 1319; MIPS64-NEXT: addu $11, $13, $11 1320; MIPS64-NEXT: sll $7, $7, 0 1321; MIPS64-NEXT: or $2, $3, $2 1322; MIPS64-NEXT: sll $1, $1, 16 1323; MIPS64-NEXT: sll $3, $9, 0 1324; MIPS64-NEXT: dsrl $9, $4, 40 1325; MIPS64-NEXT: sll $9, $9, 0 1326; MIPS64-NEXT: addu $3, $9, $3 1327; MIPS64-NEXT: dsrl $6, $6, 32 1328; MIPS64-NEXT: srl $9, $7, 24 1329; MIPS64-NEXT: sll $5, $5, 0 1330; MIPS64-NEXT: srl $13, $5, 24 1331; MIPS64-NEXT: or $1, $8, $1 1332; MIPS64-NEXT: addu $8, $13, $9 1333; MIPS64-NEXT: sll $9, $11, 8 1334; MIPS64-NEXT: andi $11, $14, 255 1335; MIPS64-NEXT: sll $2, $2, 16 1336; MIPS64-NEXT: sll $3, $3, 8 1337; MIPS64-NEXT: sll $6, $6, 0 1338; MIPS64-NEXT: dsrl $4, $4, 32 1339; MIPS64-NEXT: sll $4, $4, 0 1340; MIPS64-NEXT: addu $4, $4, $6 1341; MIPS64-NEXT: andi $4, $4, 255 1342; MIPS64-NEXT: or $3, $4, $3 1343; MIPS64-NEXT: andi $3, $3, 65535 1344; MIPS64-NEXT: or $2, $3, $2 1345; MIPS64-NEXT: or $3, $11, $9 1346; MIPS64-NEXT: addu $4, $12, $10 1347; MIPS64-NEXT: sll $6, $8, 8 1348; MIPS64-NEXT: srl $8, $7, 16 1349; MIPS64-NEXT: srl $9, $5, 16 1350; MIPS64-NEXT: addu $8, $9, $8 1351; MIPS64-NEXT: andi $8, $8, 255 1352; MIPS64-NEXT: or $6, $8, $6 1353; MIPS64-NEXT: addu $8, $5, $7 1354; MIPS64-NEXT: dsll $2, $2, 32 1355; MIPS64-NEXT: sll $3, $3, 16 1356; MIPS64-NEXT: andi $4, $4, 255 1357; MIPS64-NEXT: srl $9, $10, 8 1358; MIPS64-NEXT: srl $10, $12, 8 1359; MIPS64-NEXT: addu $9, $10, $9 1360; MIPS64-NEXT: sll $9, $9, 8 1361; MIPS64-NEXT: or $4, $4, $9 1362; MIPS64-NEXT: andi $4, $4, 65535 1363; MIPS64-NEXT: or $3, $4, $3 1364; MIPS64-NEXT: dsll $3, $3, 32 1365; MIPS64-NEXT: dsrl $3, $3, 32 1366; MIPS64-NEXT: or $2, $3, $2 1367; MIPS64-NEXT: dsll $1, $1, 32 1368; MIPS64-NEXT: sll $3, $6, 16 1369; MIPS64-NEXT: andi $4, $8, 255 1370; MIPS64-NEXT: srl $6, $7, 8 1371; MIPS64-NEXT: srl $5, $5, 8 1372; MIPS64-NEXT: addu $5, $5, $6 1373; MIPS64-NEXT: sll $5, $5, 8 1374; MIPS64-NEXT: or $4, $4, $5 1375; MIPS64-NEXT: andi $4, $4, 65535 1376; MIPS64-NEXT: or $3, $4, $3 1377; MIPS64-NEXT: dsll $3, $3, 32 1378; MIPS64-NEXT: dsrl $3, $3, 32 1379; MIPS64-NEXT: or $3, $3, $1 1380; MIPS64-NEXT: jr $ra 1381; MIPS64-NEXT: nop 1382; 1383; MIPS32R5EB-LABEL: i8_16: 1384; MIPS32R5EB: # %bb.0: 1385; MIPS32R5EB-NEXT: lw $1, 20($sp) 1386; MIPS32R5EB-NEXT: lw $2, 16($sp) 1387; MIPS32R5EB-NEXT: insert.w $w0[0], $2 1388; MIPS32R5EB-NEXT: insert.w $w0[1], $1 1389; MIPS32R5EB-NEXT: lw $1, 24($sp) 1390; MIPS32R5EB-NEXT: insert.w $w0[2], $1 1391; MIPS32R5EB-NEXT: lw $1, 28($sp) 1392; MIPS32R5EB-NEXT: insert.w $w0[3], $1 1393; MIPS32R5EB-NEXT: shf.b $w0, $w0, 27 1394; MIPS32R5EB-NEXT: insert.w $w1[0], $4 1395; MIPS32R5EB-NEXT: insert.w $w1[1], $5 1396; MIPS32R5EB-NEXT: insert.w $w1[2], $6 1397; MIPS32R5EB-NEXT: insert.w $w1[3], $7 1398; MIPS32R5EB-NEXT: shf.b $w1, $w1, 27 1399; MIPS32R5EB-NEXT: addv.b $w0, $w1, $w0 1400; MIPS32R5EB-NEXT: shf.b $w0, $w0, 27 1401; MIPS32R5EB-NEXT: copy_s.w $2, $w0[0] 1402; MIPS32R5EB-NEXT: copy_s.w $3, $w0[1] 1403; MIPS32R5EB-NEXT: copy_s.w $4, $w0[2] 1404; MIPS32R5EB-NEXT: copy_s.w $5, $w0[3] 1405; MIPS32R5EB-NEXT: jr $ra 1406; MIPS32R5EB-NEXT: nop 1407; 1408; MIPS64R5EB-LABEL: i8_16: 1409; MIPS64R5EB: # %bb.0: 1410; MIPS64R5EB-NEXT: insert.d $w0[0], $6 1411; MIPS64R5EB-NEXT: insert.d $w0[1], $7 1412; MIPS64R5EB-NEXT: shf.b $w0, $w0, 27 1413; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 1414; MIPS64R5EB-NEXT: insert.d $w1[0], $4 1415; MIPS64R5EB-NEXT: insert.d $w1[1], $5 1416; MIPS64R5EB-NEXT: shf.b $w1, $w1, 27 1417; MIPS64R5EB-NEXT: shf.w $w1, $w1, 177 1418; MIPS64R5EB-NEXT: addv.b $w0, $w1, $w0 1419; MIPS64R5EB-NEXT: shf.b $w0, $w0, 27 1420; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 1421; MIPS64R5EB-NEXT: copy_s.d $2, $w0[0] 1422; MIPS64R5EB-NEXT: copy_s.d $3, $w0[1] 1423; MIPS64R5EB-NEXT: jr $ra 1424; MIPS64R5EB-NEXT: nop 1425; 1426; MIPS32R5EL-LABEL: i8_16: 1427; MIPS32R5EL: # %bb.0: 1428; MIPS32R5EL-NEXT: lw $1, 20($sp) 1429; MIPS32R5EL-NEXT: lw $2, 16($sp) 1430; MIPS32R5EL-NEXT: insert.w $w0[0], $2 1431; MIPS32R5EL-NEXT: insert.w $w0[1], $1 1432; MIPS32R5EL-NEXT: lw $1, 24($sp) 1433; MIPS32R5EL-NEXT: insert.w $w0[2], $1 1434; MIPS32R5EL-NEXT: lw $1, 28($sp) 1435; MIPS32R5EL-NEXT: insert.w $w0[3], $1 1436; MIPS32R5EL-NEXT: insert.w $w1[0], $4 1437; MIPS32R5EL-NEXT: insert.w $w1[1], $5 1438; MIPS32R5EL-NEXT: insert.w $w1[2], $6 1439; MIPS32R5EL-NEXT: insert.w $w1[3], $7 1440; MIPS32R5EL-NEXT: addv.b $w0, $w1, $w0 1441; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] 1442; MIPS32R5EL-NEXT: copy_s.w $3, $w0[1] 1443; MIPS32R5EL-NEXT: copy_s.w $4, $w0[2] 1444; MIPS32R5EL-NEXT: copy_s.w $5, $w0[3] 1445; MIPS32R5EL-NEXT: jr $ra 1446; MIPS32R5EL-NEXT: nop 1447; 1448; MIPS64R5EL-LABEL: i8_16: 1449; MIPS64R5EL: # %bb.0: 1450; MIPS64R5EL-NEXT: insert.d $w0[0], $6 1451; MIPS64R5EL-NEXT: insert.d $w0[1], $7 1452; MIPS64R5EL-NEXT: insert.d $w1[0], $4 1453; MIPS64R5EL-NEXT: insert.d $w1[1], $5 1454; MIPS64R5EL-NEXT: addv.b $w0, $w1, $w0 1455; MIPS64R5EL-NEXT: copy_s.d $2, $w0[0] 1456; MIPS64R5EL-NEXT: copy_s.d $3, $w0[1] 1457; MIPS64R5EL-NEXT: jr $ra 1458; MIPS64R5EL-NEXT: nop 1459 %1 = add <16 x i8> %a, %b 1460 ret <16 x i8> %1 1461} 1462 1463define <2 x i16> @i16_2(<2 x i16> %a, <2 x i16> %b) { 1464; MIPS32-LABEL: i16_2: 1465; MIPS32: # %bb.0: 1466; MIPS32-NEXT: addu $1, $4, $5 1467; MIPS32-NEXT: andi $1, $1, 65535 1468; MIPS32-NEXT: srl $2, $5, 16 1469; MIPS32-NEXT: srl $3, $4, 16 1470; MIPS32-NEXT: addu $2, $3, $2 1471; MIPS32-NEXT: sll $2, $2, 16 1472; MIPS32-NEXT: or $2, $1, $2 1473; MIPS32-NEXT: jr $ra 1474; MIPS32-NEXT: nop 1475; 1476; MIPS64-LABEL: i16_2: 1477; MIPS64: # %bb.0: 1478; MIPS64-NEXT: sll $1, $5, 0 1479; MIPS64-NEXT: sll $2, $4, 0 1480; MIPS64-NEXT: addu $3, $2, $1 1481; MIPS64-NEXT: andi $3, $3, 65535 1482; MIPS64-NEXT: srl $1, $1, 16 1483; MIPS64-NEXT: srl $2, $2, 16 1484; MIPS64-NEXT: addu $1, $2, $1 1485; MIPS64-NEXT: sll $1, $1, 16 1486; MIPS64-NEXT: or $2, $3, $1 1487; MIPS64-NEXT: jr $ra 1488; MIPS64-NEXT: nop 1489; 1490; MIPS32R5EB-LABEL: i16_2: 1491; MIPS32R5EB: # %bb.0: 1492; MIPS32R5EB-NEXT: addiu $sp, $sp, -64 1493; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 64 1494; MIPS32R5EB-NEXT: sw $ra, 60($sp) # 4-byte Folded Spill 1495; MIPS32R5EB-NEXT: sw $fp, 56($sp) # 4-byte Folded Spill 1496; MIPS32R5EB-NEXT: .cfi_offset 31, -4 1497; MIPS32R5EB-NEXT: .cfi_offset 30, -8 1498; MIPS32R5EB-NEXT: move $fp, $sp 1499; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 1500; MIPS32R5EB-NEXT: addiu $1, $zero, -16 1501; MIPS32R5EB-NEXT: and $sp, $sp, $1 1502; MIPS32R5EB-NEXT: sw $5, 48($sp) 1503; MIPS32R5EB-NEXT: sw $4, 52($sp) 1504; MIPS32R5EB-NEXT: lhu $1, 50($sp) 1505; MIPS32R5EB-NEXT: sw $1, 28($sp) 1506; MIPS32R5EB-NEXT: lhu $1, 48($sp) 1507; MIPS32R5EB-NEXT: sw $1, 20($sp) 1508; MIPS32R5EB-NEXT: lhu $1, 54($sp) 1509; MIPS32R5EB-NEXT: sw $1, 12($sp) 1510; MIPS32R5EB-NEXT: lhu $1, 52($sp) 1511; MIPS32R5EB-NEXT: sw $1, 4($sp) 1512; MIPS32R5EB-NEXT: ld.d $w0, 16($sp) 1513; MIPS32R5EB-NEXT: ld.d $w1, 0($sp) 1514; MIPS32R5EB-NEXT: addv.d $w0, $w1, $w0 1515; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 1516; MIPS32R5EB-NEXT: copy_s.w $1, $w0[1] 1517; MIPS32R5EB-NEXT: copy_s.w $2, $w0[3] 1518; MIPS32R5EB-NEXT: sh $2, 46($sp) 1519; MIPS32R5EB-NEXT: sh $1, 44($sp) 1520; MIPS32R5EB-NEXT: lw $2, 44($sp) 1521; MIPS32R5EB-NEXT: move $sp, $fp 1522; MIPS32R5EB-NEXT: lw $fp, 56($sp) # 4-byte Folded Reload 1523; MIPS32R5EB-NEXT: lw $ra, 60($sp) # 4-byte Folded Reload 1524; MIPS32R5EB-NEXT: addiu $sp, $sp, 64 1525; MIPS32R5EB-NEXT: jr $ra 1526; MIPS32R5EB-NEXT: nop 1527; 1528; MIPS64R5-LABEL: i16_2: 1529; MIPS64R5: # %bb.0: 1530; MIPS64R5-NEXT: daddiu $sp, $sp, -16 1531; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 1532; MIPS64R5-NEXT: sll $1, $5, 0 1533; MIPS64R5-NEXT: sw $1, 8($sp) 1534; MIPS64R5-NEXT: sll $1, $4, 0 1535; MIPS64R5-NEXT: sw $1, 12($sp) 1536; MIPS64R5-NEXT: lh $1, 10($sp) 1537; MIPS64R5-NEXT: lh $2, 8($sp) 1538; MIPS64R5-NEXT: insert.d $w0[0], $2 1539; MIPS64R5-NEXT: insert.d $w0[1], $1 1540; MIPS64R5-NEXT: lh $1, 14($sp) 1541; MIPS64R5-NEXT: lh $2, 12($sp) 1542; MIPS64R5-NEXT: insert.d $w1[0], $2 1543; MIPS64R5-NEXT: insert.d $w1[1], $1 1544; MIPS64R5-NEXT: addv.d $w0, $w1, $w0 1545; MIPS64R5-NEXT: copy_s.d $1, $w0[0] 1546; MIPS64R5-NEXT: copy_s.d $2, $w0[1] 1547; MIPS64R5-NEXT: sh $2, 6($sp) 1548; MIPS64R5-NEXT: sh $1, 4($sp) 1549; MIPS64R5-NEXT: lw $2, 4($sp) 1550; MIPS64R5-NEXT: daddiu $sp, $sp, 16 1551; MIPS64R5-NEXT: jr $ra 1552; MIPS64R5-NEXT: nop 1553; 1554; MIPS32R5EL-LABEL: i16_2: 1555; MIPS32R5EL: # %bb.0: 1556; MIPS32R5EL-NEXT: addiu $sp, $sp, -64 1557; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 64 1558; MIPS32R5EL-NEXT: sw $ra, 60($sp) # 4-byte Folded Spill 1559; MIPS32R5EL-NEXT: sw $fp, 56($sp) # 4-byte Folded Spill 1560; MIPS32R5EL-NEXT: .cfi_offset 31, -4 1561; MIPS32R5EL-NEXT: .cfi_offset 30, -8 1562; MIPS32R5EL-NEXT: move $fp, $sp 1563; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 1564; MIPS32R5EL-NEXT: addiu $1, $zero, -16 1565; MIPS32R5EL-NEXT: and $sp, $sp, $1 1566; MIPS32R5EL-NEXT: sw $5, 48($sp) 1567; MIPS32R5EL-NEXT: sw $4, 52($sp) 1568; MIPS32R5EL-NEXT: lhu $1, 50($sp) 1569; MIPS32R5EL-NEXT: sw $1, 24($sp) 1570; MIPS32R5EL-NEXT: lhu $1, 48($sp) 1571; MIPS32R5EL-NEXT: sw $1, 16($sp) 1572; MIPS32R5EL-NEXT: lhu $1, 54($sp) 1573; MIPS32R5EL-NEXT: sw $1, 8($sp) 1574; MIPS32R5EL-NEXT: lhu $1, 52($sp) 1575; MIPS32R5EL-NEXT: sw $1, 0($sp) 1576; MIPS32R5EL-NEXT: ld.d $w0, 16($sp) 1577; MIPS32R5EL-NEXT: ld.d $w1, 0($sp) 1578; MIPS32R5EL-NEXT: addv.d $w0, $w1, $w0 1579; MIPS32R5EL-NEXT: copy_s.w $1, $w0[0] 1580; MIPS32R5EL-NEXT: copy_s.w $2, $w0[2] 1581; MIPS32R5EL-NEXT: sh $2, 46($sp) 1582; MIPS32R5EL-NEXT: sh $1, 44($sp) 1583; MIPS32R5EL-NEXT: lw $2, 44($sp) 1584; MIPS32R5EL-NEXT: move $sp, $fp 1585; MIPS32R5EL-NEXT: lw $fp, 56($sp) # 4-byte Folded Reload 1586; MIPS32R5EL-NEXT: lw $ra, 60($sp) # 4-byte Folded Reload 1587; MIPS32R5EL-NEXT: addiu $sp, $sp, 64 1588; MIPS32R5EL-NEXT: jr $ra 1589; MIPS32R5EL-NEXT: nop 1590 %1 = add <2 x i16> %a, %b 1591 ret <2 x i16> %1 1592} 1593 1594define <4 x i16> @i16_4(<4 x i16> %a, <4 x i16> %b) { 1595; MIPS32-LABEL: i16_4: 1596; MIPS32: # %bb.0: 1597; MIPS32-NEXT: addu $1, $4, $6 1598; MIPS32-NEXT: andi $1, $1, 65535 1599; MIPS32-NEXT: srl $2, $6, 16 1600; MIPS32-NEXT: srl $3, $4, 16 1601; MIPS32-NEXT: addu $2, $3, $2 1602; MIPS32-NEXT: sll $2, $2, 16 1603; MIPS32-NEXT: or $2, $1, $2 1604; MIPS32-NEXT: addu $1, $5, $7 1605; MIPS32-NEXT: andi $1, $1, 65535 1606; MIPS32-NEXT: srl $3, $7, 16 1607; MIPS32-NEXT: srl $4, $5, 16 1608; MIPS32-NEXT: addu $3, $4, $3 1609; MIPS32-NEXT: sll $3, $3, 16 1610; MIPS32-NEXT: or $3, $1, $3 1611; MIPS32-NEXT: jr $ra 1612; MIPS32-NEXT: nop 1613; 1614; MIPS64-LABEL: i16_4: 1615; MIPS64: # %bb.0: 1616; MIPS64-NEXT: dsrl $1, $5, 48 1617; MIPS64-NEXT: sll $1, $1, 0 1618; MIPS64-NEXT: dsrl $2, $4, 48 1619; MIPS64-NEXT: sll $2, $2, 0 1620; MIPS64-NEXT: addu $1, $2, $1 1621; MIPS64-NEXT: dsrl $2, $5, 32 1622; MIPS64-NEXT: sll $1, $1, 16 1623; MIPS64-NEXT: sll $2, $2, 0 1624; MIPS64-NEXT: dsrl $3, $4, 32 1625; MIPS64-NEXT: sll $3, $3, 0 1626; MIPS64-NEXT: addu $2, $3, $2 1627; MIPS64-NEXT: andi $2, $2, 65535 1628; MIPS64-NEXT: or $1, $2, $1 1629; MIPS64-NEXT: sll $2, $5, 0 1630; MIPS64-NEXT: sll $3, $4, 0 1631; MIPS64-NEXT: addu $4, $3, $2 1632; MIPS64-NEXT: dsll $1, $1, 32 1633; MIPS64-NEXT: andi $4, $4, 65535 1634; MIPS64-NEXT: srl $2, $2, 16 1635; MIPS64-NEXT: srl $3, $3, 16 1636; MIPS64-NEXT: addu $2, $3, $2 1637; MIPS64-NEXT: sll $2, $2, 16 1638; MIPS64-NEXT: or $2, $4, $2 1639; MIPS64-NEXT: dsll $2, $2, 32 1640; MIPS64-NEXT: dsrl $2, $2, 32 1641; MIPS64-NEXT: or $2, $2, $1 1642; MIPS64-NEXT: jr $ra 1643; MIPS64-NEXT: nop 1644; 1645; MIPS32R5EB-LABEL: i16_4: 1646; MIPS32R5EB: # %bb.0: 1647; MIPS32R5EB-NEXT: addiu $sp, $sp, -48 1648; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 48 1649; MIPS32R5EB-NEXT: sw $ra, 44($sp) # 4-byte Folded Spill 1650; MIPS32R5EB-NEXT: sw $fp, 40($sp) # 4-byte Folded Spill 1651; MIPS32R5EB-NEXT: .cfi_offset 31, -4 1652; MIPS32R5EB-NEXT: .cfi_offset 30, -8 1653; MIPS32R5EB-NEXT: move $fp, $sp 1654; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 1655; MIPS32R5EB-NEXT: addiu $1, $zero, -16 1656; MIPS32R5EB-NEXT: and $sp, $sp, $1 1657; MIPS32R5EB-NEXT: sw $6, 24($sp) 1658; MIPS32R5EB-NEXT: sw $7, 28($sp) 1659; MIPS32R5EB-NEXT: lhu $1, 26($sp) 1660; MIPS32R5EB-NEXT: lhu $2, 24($sp) 1661; MIPS32R5EB-NEXT: sw $4, 32($sp) 1662; MIPS32R5EB-NEXT: insert.w $w0[0], $2 1663; MIPS32R5EB-NEXT: insert.w $w0[1], $1 1664; MIPS32R5EB-NEXT: lhu $1, 28($sp) 1665; MIPS32R5EB-NEXT: sw $5, 36($sp) 1666; MIPS32R5EB-NEXT: insert.w $w0[2], $1 1667; MIPS32R5EB-NEXT: lhu $1, 30($sp) 1668; MIPS32R5EB-NEXT: insert.w $w0[3], $1 1669; MIPS32R5EB-NEXT: lhu $1, 34($sp) 1670; MIPS32R5EB-NEXT: lhu $2, 32($sp) 1671; MIPS32R5EB-NEXT: insert.w $w1[0], $2 1672; MIPS32R5EB-NEXT: insert.w $w1[1], $1 1673; MIPS32R5EB-NEXT: lhu $1, 36($sp) 1674; MIPS32R5EB-NEXT: insert.w $w1[2], $1 1675; MIPS32R5EB-NEXT: lhu $1, 38($sp) 1676; MIPS32R5EB-NEXT: insert.w $w1[3], $1 1677; MIPS32R5EB-NEXT: addv.w $w0, $w1, $w0 1678; MIPS32R5EB-NEXT: copy_s.w $1, $w0[0] 1679; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] 1680; MIPS32R5EB-NEXT: copy_s.w $3, $w0[2] 1681; MIPS32R5EB-NEXT: copy_s.w $4, $w0[3] 1682; MIPS32R5EB-NEXT: sh $4, 22($sp) 1683; MIPS32R5EB-NEXT: sh $3, 20($sp) 1684; MIPS32R5EB-NEXT: sh $2, 18($sp) 1685; MIPS32R5EB-NEXT: sh $1, 16($sp) 1686; MIPS32R5EB-NEXT: lw $1, 20($sp) 1687; MIPS32R5EB-NEXT: sw $1, 12($sp) 1688; MIPS32R5EB-NEXT: lw $1, 16($sp) 1689; MIPS32R5EB-NEXT: sw $1, 4($sp) 1690; MIPS32R5EB-NEXT: ld.w $w0, 0($sp) 1691; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] 1692; MIPS32R5EB-NEXT: copy_s.w $3, $w0[3] 1693; MIPS32R5EB-NEXT: move $sp, $fp 1694; MIPS32R5EB-NEXT: lw $fp, 40($sp) # 4-byte Folded Reload 1695; MIPS32R5EB-NEXT: lw $ra, 44($sp) # 4-byte Folded Reload 1696; MIPS32R5EB-NEXT: addiu $sp, $sp, 48 1697; MIPS32R5EB-NEXT: jr $ra 1698; MIPS32R5EB-NEXT: nop 1699; 1700; MIPS64R5-LABEL: i16_4: 1701; MIPS64R5: # %bb.0: 1702; MIPS64R5-NEXT: daddiu $sp, $sp, -32 1703; MIPS64R5-NEXT: .cfi_def_cfa_offset 32 1704; MIPS64R5-NEXT: sd $5, 16($sp) 1705; MIPS64R5-NEXT: sd $4, 24($sp) 1706; MIPS64R5-NEXT: lhu $1, 18($sp) 1707; MIPS64R5-NEXT: lhu $2, 16($sp) 1708; MIPS64R5-NEXT: insert.w $w0[0], $2 1709; MIPS64R5-NEXT: insert.w $w0[1], $1 1710; MIPS64R5-NEXT: lhu $1, 20($sp) 1711; MIPS64R5-NEXT: insert.w $w0[2], $1 1712; MIPS64R5-NEXT: lhu $1, 22($sp) 1713; MIPS64R5-NEXT: insert.w $w0[3], $1 1714; MIPS64R5-NEXT: lhu $1, 26($sp) 1715; MIPS64R5-NEXT: lhu $2, 24($sp) 1716; MIPS64R5-NEXT: insert.w $w1[0], $2 1717; MIPS64R5-NEXT: insert.w $w1[1], $1 1718; MIPS64R5-NEXT: lhu $1, 28($sp) 1719; MIPS64R5-NEXT: insert.w $w1[2], $1 1720; MIPS64R5-NEXT: lhu $1, 30($sp) 1721; MIPS64R5-NEXT: insert.w $w1[3], $1 1722; MIPS64R5-NEXT: addv.w $w0, $w1, $w0 1723; MIPS64R5-NEXT: copy_s.w $1, $w0[0] 1724; MIPS64R5-NEXT: copy_s.w $2, $w0[1] 1725; MIPS64R5-NEXT: copy_s.w $3, $w0[2] 1726; MIPS64R5-NEXT: copy_s.w $4, $w0[3] 1727; MIPS64R5-NEXT: sh $4, 14($sp) 1728; MIPS64R5-NEXT: sh $3, 12($sp) 1729; MIPS64R5-NEXT: sh $2, 10($sp) 1730; MIPS64R5-NEXT: sh $1, 8($sp) 1731; MIPS64R5-NEXT: ld $2, 8($sp) 1732; MIPS64R5-NEXT: daddiu $sp, $sp, 32 1733; MIPS64R5-NEXT: jr $ra 1734; MIPS64R5-NEXT: nop 1735; 1736; MIPS32R5EL-LABEL: i16_4: 1737; MIPS32R5EL: # %bb.0: 1738; MIPS32R5EL-NEXT: addiu $sp, $sp, -48 1739; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 48 1740; MIPS32R5EL-NEXT: sw $ra, 44($sp) # 4-byte Folded Spill 1741; MIPS32R5EL-NEXT: sw $fp, 40($sp) # 4-byte Folded Spill 1742; MIPS32R5EL-NEXT: .cfi_offset 31, -4 1743; MIPS32R5EL-NEXT: .cfi_offset 30, -8 1744; MIPS32R5EL-NEXT: move $fp, $sp 1745; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 1746; MIPS32R5EL-NEXT: addiu $1, $zero, -16 1747; MIPS32R5EL-NEXT: and $sp, $sp, $1 1748; MIPS32R5EL-NEXT: sw $6, 24($sp) 1749; MIPS32R5EL-NEXT: sw $7, 28($sp) 1750; MIPS32R5EL-NEXT: lhu $1, 26($sp) 1751; MIPS32R5EL-NEXT: lhu $2, 24($sp) 1752; MIPS32R5EL-NEXT: sw $4, 32($sp) 1753; MIPS32R5EL-NEXT: insert.w $w0[0], $2 1754; MIPS32R5EL-NEXT: insert.w $w0[1], $1 1755; MIPS32R5EL-NEXT: lhu $1, 28($sp) 1756; MIPS32R5EL-NEXT: sw $5, 36($sp) 1757; MIPS32R5EL-NEXT: insert.w $w0[2], $1 1758; MIPS32R5EL-NEXT: lhu $1, 30($sp) 1759; MIPS32R5EL-NEXT: insert.w $w0[3], $1 1760; MIPS32R5EL-NEXT: lhu $1, 34($sp) 1761; MIPS32R5EL-NEXT: lhu $2, 32($sp) 1762; MIPS32R5EL-NEXT: insert.w $w1[0], $2 1763; MIPS32R5EL-NEXT: insert.w $w1[1], $1 1764; MIPS32R5EL-NEXT: lhu $1, 36($sp) 1765; MIPS32R5EL-NEXT: insert.w $w1[2], $1 1766; MIPS32R5EL-NEXT: lhu $1, 38($sp) 1767; MIPS32R5EL-NEXT: insert.w $w1[3], $1 1768; MIPS32R5EL-NEXT: addv.w $w0, $w1, $w0 1769; MIPS32R5EL-NEXT: copy_s.w $1, $w0[0] 1770; MIPS32R5EL-NEXT: copy_s.w $2, $w0[1] 1771; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] 1772; MIPS32R5EL-NEXT: copy_s.w $4, $w0[3] 1773; MIPS32R5EL-NEXT: sh $4, 22($sp) 1774; MIPS32R5EL-NEXT: sh $3, 20($sp) 1775; MIPS32R5EL-NEXT: sh $2, 18($sp) 1776; MIPS32R5EL-NEXT: sh $1, 16($sp) 1777; MIPS32R5EL-NEXT: lw $1, 20($sp) 1778; MIPS32R5EL-NEXT: sw $1, 8($sp) 1779; MIPS32R5EL-NEXT: lw $1, 16($sp) 1780; MIPS32R5EL-NEXT: sw $1, 0($sp) 1781; MIPS32R5EL-NEXT: ld.w $w0, 0($sp) 1782; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] 1783; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] 1784; MIPS32R5EL-NEXT: move $sp, $fp 1785; MIPS32R5EL-NEXT: lw $fp, 40($sp) # 4-byte Folded Reload 1786; MIPS32R5EL-NEXT: lw $ra, 44($sp) # 4-byte Folded Reload 1787; MIPS32R5EL-NEXT: addiu $sp, $sp, 48 1788; MIPS32R5EL-NEXT: jr $ra 1789; MIPS32R5EL-NEXT: nop 1790 %1 = add <4 x i16> %a, %b 1791 ret <4 x i16> %1 1792} 1793 1794define <8 x i16> @i16_8(<8 x i16> %a, <8 x i16> %b) { 1795; MIPS32-LABEL: i16_8: 1796; MIPS32: # %bb.0: 1797; MIPS32-NEXT: lw $1, 24($sp) 1798; MIPS32-NEXT: srl $2, $1, 16 1799; MIPS32-NEXT: srl $3, $6, 16 1800; MIPS32-NEXT: lw $8, 20($sp) 1801; MIPS32-NEXT: srl $9, $8, 16 1802; MIPS32-NEXT: srl $10, $5, 16 1803; MIPS32-NEXT: addu $9, $10, $9 1804; MIPS32-NEXT: addu $5, $5, $8 1805; MIPS32-NEXT: addu $2, $3, $2 1806; MIPS32-NEXT: addu $1, $6, $1 1807; MIPS32-NEXT: lw $3, 16($sp) 1808; MIPS32-NEXT: lw $6, 28($sp) 1809; MIPS32-NEXT: addu $8, $7, $6 1810; MIPS32-NEXT: andi $1, $1, 65535 1811; MIPS32-NEXT: sll $10, $2, 16 1812; MIPS32-NEXT: andi $5, $5, 65535 1813; MIPS32-NEXT: sll $9, $9, 16 1814; MIPS32-NEXT: addu $2, $4, $3 1815; MIPS32-NEXT: andi $2, $2, 65535 1816; MIPS32-NEXT: srl $3, $3, 16 1817; MIPS32-NEXT: srl $4, $4, 16 1818; MIPS32-NEXT: addu $3, $4, $3 1819; MIPS32-NEXT: sll $3, $3, 16 1820; MIPS32-NEXT: or $2, $2, $3 1821; MIPS32-NEXT: or $3, $5, $9 1822; MIPS32-NEXT: or $4, $1, $10 1823; MIPS32-NEXT: andi $1, $8, 65535 1824; MIPS32-NEXT: srl $5, $6, 16 1825; MIPS32-NEXT: srl $6, $7, 16 1826; MIPS32-NEXT: addu $5, $6, $5 1827; MIPS32-NEXT: sll $5, $5, 16 1828; MIPS32-NEXT: or $5, $1, $5 1829; MIPS32-NEXT: jr $ra 1830; MIPS32-NEXT: nop 1831; 1832; MIPS64-LABEL: i16_8: 1833; MIPS64: # %bb.0: 1834; MIPS64-NEXT: dsrl $1, $6, 48 1835; MIPS64-NEXT: dsrl $2, $7, 48 1836; MIPS64-NEXT: sll $1, $1, 0 1837; MIPS64-NEXT: dsrl $3, $4, 48 1838; MIPS64-NEXT: sll $3, $3, 0 1839; MIPS64-NEXT: addu $1, $3, $1 1840; MIPS64-NEXT: dsrl $3, $6, 32 1841; MIPS64-NEXT: sll $2, $2, 0 1842; MIPS64-NEXT: dsrl $8, $5, 48 1843; MIPS64-NEXT: sll $8, $8, 0 1844; MIPS64-NEXT: addu $2, $8, $2 1845; MIPS64-NEXT: sll $1, $1, 16 1846; MIPS64-NEXT: sll $3, $3, 0 1847; MIPS64-NEXT: dsrl $8, $4, 32 1848; MIPS64-NEXT: sll $8, $8, 0 1849; MIPS64-NEXT: addu $3, $8, $3 1850; MIPS64-NEXT: andi $3, $3, 65535 1851; MIPS64-NEXT: dsrl $8, $7, 32 1852; MIPS64-NEXT: or $1, $3, $1 1853; MIPS64-NEXT: sll $2, $2, 16 1854; MIPS64-NEXT: sll $3, $8, 0 1855; MIPS64-NEXT: dsrl $8, $5, 32 1856; MIPS64-NEXT: sll $8, $8, 0 1857; MIPS64-NEXT: addu $3, $8, $3 1858; MIPS64-NEXT: andi $3, $3, 65535 1859; MIPS64-NEXT: or $3, $3, $2 1860; MIPS64-NEXT: sll $2, $6, 0 1861; MIPS64-NEXT: sll $4, $4, 0 1862; MIPS64-NEXT: addu $6, $4, $2 1863; MIPS64-NEXT: andi $6, $6, 65535 1864; MIPS64-NEXT: srl $2, $2, 16 1865; MIPS64-NEXT: srl $4, $4, 16 1866; MIPS64-NEXT: addu $2, $4, $2 1867; MIPS64-NEXT: sll $2, $2, 16 1868; MIPS64-NEXT: dsll $1, $1, 32 1869; MIPS64-NEXT: or $2, $6, $2 1870; MIPS64-NEXT: dsll $2, $2, 32 1871; MIPS64-NEXT: dsrl $2, $2, 32 1872; MIPS64-NEXT: sll $4, $7, 0 1873; MIPS64-NEXT: sll $5, $5, 0 1874; MIPS64-NEXT: addu $6, $5, $4 1875; MIPS64-NEXT: or $2, $2, $1 1876; MIPS64-NEXT: dsll $1, $3, 32 1877; MIPS64-NEXT: andi $3, $6, 65535 1878; MIPS64-NEXT: srl $4, $4, 16 1879; MIPS64-NEXT: srl $5, $5, 16 1880; MIPS64-NEXT: addu $4, $5, $4 1881; MIPS64-NEXT: sll $4, $4, 16 1882; MIPS64-NEXT: or $3, $3, $4 1883; MIPS64-NEXT: dsll $3, $3, 32 1884; MIPS64-NEXT: dsrl $3, $3, 32 1885; MIPS64-NEXT: or $3, $3, $1 1886; MIPS64-NEXT: jr $ra 1887; MIPS64-NEXT: nop 1888; 1889; MIPS32R5EB-LABEL: i16_8: 1890; MIPS32R5EB: # %bb.0: 1891; MIPS32R5EB-NEXT: lw $1, 20($sp) 1892; MIPS32R5EB-NEXT: lw $2, 16($sp) 1893; MIPS32R5EB-NEXT: insert.w $w0[0], $2 1894; MIPS32R5EB-NEXT: insert.w $w0[1], $1 1895; MIPS32R5EB-NEXT: lw $1, 24($sp) 1896; MIPS32R5EB-NEXT: insert.w $w0[2], $1 1897; MIPS32R5EB-NEXT: lw $1, 28($sp) 1898; MIPS32R5EB-NEXT: insert.w $w0[3], $1 1899; MIPS32R5EB-NEXT: shf.h $w0, $w0, 177 1900; MIPS32R5EB-NEXT: insert.w $w1[0], $4 1901; MIPS32R5EB-NEXT: insert.w $w1[1], $5 1902; MIPS32R5EB-NEXT: insert.w $w1[2], $6 1903; MIPS32R5EB-NEXT: insert.w $w1[3], $7 1904; MIPS32R5EB-NEXT: shf.h $w1, $w1, 177 1905; MIPS32R5EB-NEXT: addv.h $w0, $w1, $w0 1906; MIPS32R5EB-NEXT: shf.h $w0, $w0, 177 1907; MIPS32R5EB-NEXT: copy_s.w $2, $w0[0] 1908; MIPS32R5EB-NEXT: copy_s.w $3, $w0[1] 1909; MIPS32R5EB-NEXT: copy_s.w $4, $w0[2] 1910; MIPS32R5EB-NEXT: copy_s.w $5, $w0[3] 1911; MIPS32R5EB-NEXT: jr $ra 1912; MIPS32R5EB-NEXT: nop 1913; 1914; MIPS64R5EB-LABEL: i16_8: 1915; MIPS64R5EB: # %bb.0: 1916; MIPS64R5EB-NEXT: insert.d $w0[0], $6 1917; MIPS64R5EB-NEXT: insert.d $w0[1], $7 1918; MIPS64R5EB-NEXT: shf.h $w0, $w0, 27 1919; MIPS64R5EB-NEXT: insert.d $w1[0], $4 1920; MIPS64R5EB-NEXT: insert.d $w1[1], $5 1921; MIPS64R5EB-NEXT: shf.h $w1, $w1, 27 1922; MIPS64R5EB-NEXT: addv.h $w0, $w1, $w0 1923; MIPS64R5EB-NEXT: shf.h $w0, $w0, 27 1924; MIPS64R5EB-NEXT: copy_s.d $2, $w0[0] 1925; MIPS64R5EB-NEXT: copy_s.d $3, $w0[1] 1926; MIPS64R5EB-NEXT: jr $ra 1927; MIPS64R5EB-NEXT: nop 1928; 1929; MIPS32R5EL-LABEL: i16_8: 1930; MIPS32R5EL: # %bb.0: 1931; MIPS32R5EL-NEXT: lw $1, 20($sp) 1932; MIPS32R5EL-NEXT: lw $2, 16($sp) 1933; MIPS32R5EL-NEXT: insert.w $w0[0], $2 1934; MIPS32R5EL-NEXT: insert.w $w0[1], $1 1935; MIPS32R5EL-NEXT: lw $1, 24($sp) 1936; MIPS32R5EL-NEXT: insert.w $w0[2], $1 1937; MIPS32R5EL-NEXT: lw $1, 28($sp) 1938; MIPS32R5EL-NEXT: insert.w $w0[3], $1 1939; MIPS32R5EL-NEXT: insert.w $w1[0], $4 1940; MIPS32R5EL-NEXT: insert.w $w1[1], $5 1941; MIPS32R5EL-NEXT: insert.w $w1[2], $6 1942; MIPS32R5EL-NEXT: insert.w $w1[3], $7 1943; MIPS32R5EL-NEXT: addv.h $w0, $w1, $w0 1944; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] 1945; MIPS32R5EL-NEXT: copy_s.w $3, $w0[1] 1946; MIPS32R5EL-NEXT: copy_s.w $4, $w0[2] 1947; MIPS32R5EL-NEXT: copy_s.w $5, $w0[3] 1948; MIPS32R5EL-NEXT: jr $ra 1949; MIPS32R5EL-NEXT: nop 1950; 1951; MIPS64R5EL-LABEL: i16_8: 1952; MIPS64R5EL: # %bb.0: 1953; MIPS64R5EL-NEXT: insert.d $w0[0], $6 1954; MIPS64R5EL-NEXT: insert.d $w0[1], $7 1955; MIPS64R5EL-NEXT: insert.d $w1[0], $4 1956; MIPS64R5EL-NEXT: insert.d $w1[1], $5 1957; MIPS64R5EL-NEXT: addv.h $w0, $w1, $w0 1958; MIPS64R5EL-NEXT: copy_s.d $2, $w0[0] 1959; MIPS64R5EL-NEXT: copy_s.d $3, $w0[1] 1960; MIPS64R5EL-NEXT: jr $ra 1961; MIPS64R5EL-NEXT: nop 1962 %1 = add <8 x i16> %a, %b 1963 ret <8 x i16> %1 1964} 1965 1966define <2 x i32> @i32_2(<2 x i32> %a, <2 x i32> %b) { 1967; MIPS32-LABEL: i32_2: 1968; MIPS32: # %bb.0: 1969; MIPS32-NEXT: addu $2, $4, $6 1970; MIPS32-NEXT: addu $3, $5, $7 1971; MIPS32-NEXT: jr $ra 1972; MIPS32-NEXT: nop 1973; 1974; MIPS64-LABEL: i32_2: 1975; MIPS64: # %bb.0: 1976; MIPS64-NEXT: sll $1, $5, 0 1977; MIPS64-NEXT: sll $2, $4, 0 1978; MIPS64-NEXT: addu $1, $2, $1 1979; MIPS64-NEXT: dsll $1, $1, 32 1980; MIPS64-NEXT: dsrl $2, $5, 32 1981; MIPS64-NEXT: dsrl $1, $1, 32 1982; MIPS64-NEXT: sll $2, $2, 0 1983; MIPS64-NEXT: dsrl $3, $4, 32 1984; MIPS64-NEXT: sll $3, $3, 0 1985; MIPS64-NEXT: addu $2, $3, $2 1986; MIPS64-NEXT: dsll $2, $2, 32 1987; MIPS64-NEXT: or $2, $1, $2 1988; MIPS64-NEXT: jr $ra 1989; MIPS64-NEXT: nop 1990; 1991; MIPS32R5EB-LABEL: i32_2: 1992; MIPS32R5EB: # %bb.0: 1993; MIPS32R5EB-NEXT: addiu $sp, $sp, -48 1994; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 48 1995; MIPS32R5EB-NEXT: sw $ra, 44($sp) # 4-byte Folded Spill 1996; MIPS32R5EB-NEXT: sw $fp, 40($sp) # 4-byte Folded Spill 1997; MIPS32R5EB-NEXT: .cfi_offset 31, -4 1998; MIPS32R5EB-NEXT: .cfi_offset 30, -8 1999; MIPS32R5EB-NEXT: move $fp, $sp 2000; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 2001; MIPS32R5EB-NEXT: addiu $1, $zero, -16 2002; MIPS32R5EB-NEXT: and $sp, $sp, $1 2003; MIPS32R5EB-NEXT: sw $7, 28($sp) 2004; MIPS32R5EB-NEXT: sw $6, 20($sp) 2005; MIPS32R5EB-NEXT: sw $5, 12($sp) 2006; MIPS32R5EB-NEXT: sw $4, 4($sp) 2007; MIPS32R5EB-NEXT: ld.d $w0, 16($sp) 2008; MIPS32R5EB-NEXT: ld.d $w1, 0($sp) 2009; MIPS32R5EB-NEXT: addv.d $w0, $w1, $w0 2010; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 2011; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] 2012; MIPS32R5EB-NEXT: copy_s.w $3, $w0[3] 2013; MIPS32R5EB-NEXT: move $sp, $fp 2014; MIPS32R5EB-NEXT: lw $fp, 40($sp) # 4-byte Folded Reload 2015; MIPS32R5EB-NEXT: lw $ra, 44($sp) # 4-byte Folded Reload 2016; MIPS32R5EB-NEXT: addiu $sp, $sp, 48 2017; MIPS32R5EB-NEXT: jr $ra 2018; MIPS32R5EB-NEXT: nop 2019; 2020; MIPS64R5EB-LABEL: i32_2: 2021; MIPS64R5EB: # %bb.0: 2022; MIPS64R5EB-NEXT: daddiu $sp, $sp, -32 2023; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 32 2024; MIPS64R5EB-NEXT: sd $5, 16($sp) 2025; MIPS64R5EB-NEXT: sd $4, 24($sp) 2026; MIPS64R5EB-NEXT: lw $1, 16($sp) 2027; MIPS64R5EB-NEXT: insert.d $w0[0], $1 2028; MIPS64R5EB-NEXT: insert.d $w0[1], $5 2029; MIPS64R5EB-NEXT: lw $1, 24($sp) 2030; MIPS64R5EB-NEXT: insert.d $w1[0], $1 2031; MIPS64R5EB-NEXT: insert.d $w1[1], $4 2032; MIPS64R5EB-NEXT: addv.d $w0, $w1, $w0 2033; MIPS64R5EB-NEXT: copy_s.d $1, $w0[0] 2034; MIPS64R5EB-NEXT: copy_s.d $2, $w0[1] 2035; MIPS64R5EB-NEXT: sw $2, 12($sp) 2036; MIPS64R5EB-NEXT: sw $1, 8($sp) 2037; MIPS64R5EB-NEXT: ld $2, 8($sp) 2038; MIPS64R5EB-NEXT: daddiu $sp, $sp, 32 2039; MIPS64R5EB-NEXT: jr $ra 2040; MIPS64R5EB-NEXT: nop 2041; 2042; MIPS32R5EL-LABEL: i32_2: 2043; MIPS32R5EL: # %bb.0: 2044; MIPS32R5EL-NEXT: addiu $sp, $sp, -48 2045; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 48 2046; MIPS32R5EL-NEXT: sw $ra, 44($sp) # 4-byte Folded Spill 2047; MIPS32R5EL-NEXT: sw $fp, 40($sp) # 4-byte Folded Spill 2048; MIPS32R5EL-NEXT: .cfi_offset 31, -4 2049; MIPS32R5EL-NEXT: .cfi_offset 30, -8 2050; MIPS32R5EL-NEXT: move $fp, $sp 2051; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 2052; MIPS32R5EL-NEXT: addiu $1, $zero, -16 2053; MIPS32R5EL-NEXT: and $sp, $sp, $1 2054; MIPS32R5EL-NEXT: sw $7, 24($sp) 2055; MIPS32R5EL-NEXT: sw $6, 16($sp) 2056; MIPS32R5EL-NEXT: sw $5, 8($sp) 2057; MIPS32R5EL-NEXT: sw $4, 0($sp) 2058; MIPS32R5EL-NEXT: ld.d $w0, 16($sp) 2059; MIPS32R5EL-NEXT: ld.d $w1, 0($sp) 2060; MIPS32R5EL-NEXT: addv.d $w0, $w1, $w0 2061; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] 2062; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] 2063; MIPS32R5EL-NEXT: move $sp, $fp 2064; MIPS32R5EL-NEXT: lw $fp, 40($sp) # 4-byte Folded Reload 2065; MIPS32R5EL-NEXT: lw $ra, 44($sp) # 4-byte Folded Reload 2066; MIPS32R5EL-NEXT: addiu $sp, $sp, 48 2067; MIPS32R5EL-NEXT: jr $ra 2068; MIPS32R5EL-NEXT: nop 2069; 2070; MIPS64R5EL-LABEL: i32_2: 2071; MIPS64R5EL: # %bb.0: 2072; MIPS64R5EL-NEXT: daddiu $sp, $sp, -32 2073; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 32 2074; MIPS64R5EL-NEXT: sd $5, 16($sp) 2075; MIPS64R5EL-NEXT: sd $4, 24($sp) 2076; MIPS64R5EL-NEXT: lw $1, 20($sp) 2077; MIPS64R5EL-NEXT: insert.d $w0[0], $5 2078; MIPS64R5EL-NEXT: insert.d $w0[1], $1 2079; MIPS64R5EL-NEXT: lw $1, 28($sp) 2080; MIPS64R5EL-NEXT: insert.d $w1[0], $4 2081; MIPS64R5EL-NEXT: insert.d $w1[1], $1 2082; MIPS64R5EL-NEXT: addv.d $w0, $w1, $w0 2083; MIPS64R5EL-NEXT: copy_s.d $1, $w0[0] 2084; MIPS64R5EL-NEXT: copy_s.d $2, $w0[1] 2085; MIPS64R5EL-NEXT: sw $2, 12($sp) 2086; MIPS64R5EL-NEXT: sw $1, 8($sp) 2087; MIPS64R5EL-NEXT: ld $2, 8($sp) 2088; MIPS64R5EL-NEXT: daddiu $sp, $sp, 32 2089; MIPS64R5EL-NEXT: jr $ra 2090; MIPS64R5EL-NEXT: nop 2091 %1 = add <2 x i32> %a, %b 2092 ret <2 x i32> %1 2093} 2094 2095define <4 x i32> @i32_4(<4 x i32> %a, <4 x i32> %b) { 2096; MIPS32-LABEL: i32_4: 2097; MIPS32: # %bb.0: 2098; MIPS32-NEXT: lw $1, 20($sp) 2099; MIPS32-NEXT: lw $2, 16($sp) 2100; MIPS32-NEXT: addu $2, $4, $2 2101; MIPS32-NEXT: addu $3, $5, $1 2102; MIPS32-NEXT: lw $1, 24($sp) 2103; MIPS32-NEXT: addu $4, $6, $1 2104; MIPS32-NEXT: lw $1, 28($sp) 2105; MIPS32-NEXT: addu $5, $7, $1 2106; MIPS32-NEXT: jr $ra 2107; MIPS32-NEXT: nop 2108; 2109; MIPS64-LABEL: i32_4: 2110; MIPS64: # %bb.0: 2111; MIPS64-NEXT: sll $1, $6, 0 2112; MIPS64-NEXT: sll $2, $4, 0 2113; MIPS64-NEXT: addu $1, $2, $1 2114; MIPS64-NEXT: dsll $1, $1, 32 2115; MIPS64-NEXT: sll $2, $7, 0 2116; MIPS64-NEXT: sll $3, $5, 0 2117; MIPS64-NEXT: addu $2, $3, $2 2118; MIPS64-NEXT: dsrl $3, $6, 32 2119; MIPS64-NEXT: dsll $6, $2, 32 2120; MIPS64-NEXT: dsrl $1, $1, 32 2121; MIPS64-NEXT: sll $2, $3, 0 2122; MIPS64-NEXT: dsrl $3, $4, 32 2123; MIPS64-NEXT: sll $3, $3, 0 2124; MIPS64-NEXT: addu $2, $3, $2 2125; MIPS64-NEXT: dsll $2, $2, 32 2126; MIPS64-NEXT: dsrl $3, $7, 32 2127; MIPS64-NEXT: or $2, $1, $2 2128; MIPS64-NEXT: dsrl $1, $6, 32 2129; MIPS64-NEXT: sll $3, $3, 0 2130; MIPS64-NEXT: dsrl $4, $5, 32 2131; MIPS64-NEXT: sll $4, $4, 0 2132; MIPS64-NEXT: addu $3, $4, $3 2133; MIPS64-NEXT: dsll $3, $3, 32 2134; MIPS64-NEXT: or $3, $1, $3 2135; MIPS64-NEXT: jr $ra 2136; MIPS64-NEXT: nop 2137; 2138; MIPS32R5-LABEL: i32_4: 2139; MIPS32R5: # %bb.0: 2140; MIPS32R5-NEXT: lw $1, 20($sp) 2141; MIPS32R5-NEXT: lw $2, 16($sp) 2142; MIPS32R5-NEXT: insert.w $w0[0], $2 2143; MIPS32R5-NEXT: insert.w $w0[1], $1 2144; MIPS32R5-NEXT: lw $1, 24($sp) 2145; MIPS32R5-NEXT: insert.w $w0[2], $1 2146; MIPS32R5-NEXT: lw $1, 28($sp) 2147; MIPS32R5-NEXT: insert.w $w0[3], $1 2148; MIPS32R5-NEXT: insert.w $w1[0], $4 2149; MIPS32R5-NEXT: insert.w $w1[1], $5 2150; MIPS32R5-NEXT: insert.w $w1[2], $6 2151; MIPS32R5-NEXT: insert.w $w1[3], $7 2152; MIPS32R5-NEXT: addv.w $w0, $w1, $w0 2153; MIPS32R5-NEXT: copy_s.w $2, $w0[0] 2154; MIPS32R5-NEXT: copy_s.w $3, $w0[1] 2155; MIPS32R5-NEXT: copy_s.w $4, $w0[2] 2156; MIPS32R5-NEXT: copy_s.w $5, $w0[3] 2157; MIPS32R5-NEXT: jr $ra 2158; MIPS32R5-NEXT: nop 2159; 2160; MIPS64R5EB-LABEL: i32_4: 2161; MIPS64R5EB: # %bb.0: 2162; MIPS64R5EB-NEXT: insert.d $w0[0], $6 2163; MIPS64R5EB-NEXT: insert.d $w0[1], $7 2164; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 2165; MIPS64R5EB-NEXT: insert.d $w1[0], $4 2166; MIPS64R5EB-NEXT: insert.d $w1[1], $5 2167; MIPS64R5EB-NEXT: shf.w $w1, $w1, 177 2168; MIPS64R5EB-NEXT: addv.w $w0, $w1, $w0 2169; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 2170; MIPS64R5EB-NEXT: copy_s.d $2, $w0[0] 2171; MIPS64R5EB-NEXT: copy_s.d $3, $w0[1] 2172; MIPS64R5EB-NEXT: jr $ra 2173; MIPS64R5EB-NEXT: nop 2174; 2175; MIPS64R5EL-LABEL: i32_4: 2176; MIPS64R5EL: # %bb.0: 2177; MIPS64R5EL-NEXT: insert.d $w0[0], $6 2178; MIPS64R5EL-NEXT: insert.d $w0[1], $7 2179; MIPS64R5EL-NEXT: insert.d $w1[0], $4 2180; MIPS64R5EL-NEXT: insert.d $w1[1], $5 2181; MIPS64R5EL-NEXT: addv.w $w0, $w1, $w0 2182; MIPS64R5EL-NEXT: copy_s.d $2, $w0[0] 2183; MIPS64R5EL-NEXT: copy_s.d $3, $w0[1] 2184; MIPS64R5EL-NEXT: jr $ra 2185; MIPS64R5EL-NEXT: nop 2186 %1 = add <4 x i32> %a, %b 2187 ret <4 x i32> %1 2188} 2189 2190define <2 x i64> @i64_2(<2 x i64> %a, <2 x i64> %b) { 2191; MIPS32EB-LABEL: i64_2: 2192; MIPS32EB: # %bb.0: 2193; MIPS32EB-NEXT: lw $1, 16($sp) 2194; MIPS32EB-NEXT: addu $1, $4, $1 2195; MIPS32EB-NEXT: lw $2, 20($sp) 2196; MIPS32EB-NEXT: addu $3, $5, $2 2197; MIPS32EB-NEXT: sltu $2, $3, $5 2198; MIPS32EB-NEXT: lw $4, 24($sp) 2199; MIPS32EB-NEXT: addu $2, $1, $2 2200; MIPS32EB-NEXT: addu $1, $6, $4 2201; MIPS32EB-NEXT: lw $4, 28($sp) 2202; MIPS32EB-NEXT: addu $5, $7, $4 2203; MIPS32EB-NEXT: sltu $4, $5, $7 2204; MIPS32EB-NEXT: addu $4, $1, $4 2205; MIPS32EB-NEXT: jr $ra 2206; MIPS32EB-NEXT: nop 2207; 2208; MIPS64-LABEL: i64_2: 2209; MIPS64: # %bb.0: 2210; MIPS64-NEXT: daddu $2, $4, $6 2211; MIPS64-NEXT: daddu $3, $5, $7 2212; MIPS64-NEXT: jr $ra 2213; MIPS64-NEXT: nop 2214; 2215; MIPS32R5EB-LABEL: i64_2: 2216; MIPS32R5EB: # %bb.0: 2217; MIPS32R5EB-NEXT: lw $1, 20($sp) 2218; MIPS32R5EB-NEXT: lw $2, 16($sp) 2219; MIPS32R5EB-NEXT: insert.w $w0[0], $2 2220; MIPS32R5EB-NEXT: insert.w $w0[1], $1 2221; MIPS32R5EB-NEXT: lw $1, 24($sp) 2222; MIPS32R5EB-NEXT: insert.w $w0[2], $1 2223; MIPS32R5EB-NEXT: lw $1, 28($sp) 2224; MIPS32R5EB-NEXT: insert.w $w0[3], $1 2225; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 2226; MIPS32R5EB-NEXT: insert.w $w1[0], $4 2227; MIPS32R5EB-NEXT: insert.w $w1[1], $5 2228; MIPS32R5EB-NEXT: insert.w $w1[2], $6 2229; MIPS32R5EB-NEXT: insert.w $w1[3], $7 2230; MIPS32R5EB-NEXT: shf.w $w1, $w1, 177 2231; MIPS32R5EB-NEXT: addv.d $w0, $w1, $w0 2232; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 2233; MIPS32R5EB-NEXT: copy_s.w $2, $w0[0] 2234; MIPS32R5EB-NEXT: copy_s.w $3, $w0[1] 2235; MIPS32R5EB-NEXT: copy_s.w $4, $w0[2] 2236; MIPS32R5EB-NEXT: copy_s.w $5, $w0[3] 2237; MIPS32R5EB-NEXT: jr $ra 2238; MIPS32R5EB-NEXT: nop 2239; 2240; MIPS64R5-LABEL: i64_2: 2241; MIPS64R5: # %bb.0: 2242; MIPS64R5-NEXT: insert.d $w0[0], $6 2243; MIPS64R5-NEXT: insert.d $w0[1], $7 2244; MIPS64R5-NEXT: insert.d $w1[0], $4 2245; MIPS64R5-NEXT: insert.d $w1[1], $5 2246; MIPS64R5-NEXT: addv.d $w0, $w1, $w0 2247; MIPS64R5-NEXT: copy_s.d $2, $w0[0] 2248; MIPS64R5-NEXT: copy_s.d $3, $w0[1] 2249; MIPS64R5-NEXT: jr $ra 2250; MIPS64R5-NEXT: nop 2251; 2252; MIPS32EL-LABEL: i64_2: 2253; MIPS32EL: # %bb.0: 2254; MIPS32EL-NEXT: lw $1, 20($sp) 2255; MIPS32EL-NEXT: addu $1, $5, $1 2256; MIPS32EL-NEXT: lw $2, 16($sp) 2257; MIPS32EL-NEXT: addu $2, $4, $2 2258; MIPS32EL-NEXT: sltu $3, $2, $4 2259; MIPS32EL-NEXT: lw $4, 28($sp) 2260; MIPS32EL-NEXT: addu $3, $1, $3 2261; MIPS32EL-NEXT: addu $1, $7, $4 2262; MIPS32EL-NEXT: lw $4, 24($sp) 2263; MIPS32EL-NEXT: addu $4, $6, $4 2264; MIPS32EL-NEXT: sltu $5, $4, $6 2265; MIPS32EL-NEXT: addu $5, $1, $5 2266; MIPS32EL-NEXT: jr $ra 2267; MIPS32EL-NEXT: nop 2268; 2269; MIPS32R5EL-LABEL: i64_2: 2270; MIPS32R5EL: # %bb.0: 2271; MIPS32R5EL-NEXT: lw $1, 20($sp) 2272; MIPS32R5EL-NEXT: lw $2, 16($sp) 2273; MIPS32R5EL-NEXT: insert.w $w0[0], $2 2274; MIPS32R5EL-NEXT: insert.w $w0[1], $1 2275; MIPS32R5EL-NEXT: lw $1, 24($sp) 2276; MIPS32R5EL-NEXT: insert.w $w0[2], $1 2277; MIPS32R5EL-NEXT: lw $1, 28($sp) 2278; MIPS32R5EL-NEXT: insert.w $w0[3], $1 2279; MIPS32R5EL-NEXT: insert.w $w1[0], $4 2280; MIPS32R5EL-NEXT: insert.w $w1[1], $5 2281; MIPS32R5EL-NEXT: insert.w $w1[2], $6 2282; MIPS32R5EL-NEXT: insert.w $w1[3], $7 2283; MIPS32R5EL-NEXT: addv.d $w0, $w1, $w0 2284; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] 2285; MIPS32R5EL-NEXT: copy_s.w $3, $w0[1] 2286; MIPS32R5EL-NEXT: copy_s.w $4, $w0[2] 2287; MIPS32R5EL-NEXT: copy_s.w $5, $w0[3] 2288; MIPS32R5EL-NEXT: jr $ra 2289; MIPS32R5EL-NEXT: nop 2290 %1 = add <2 x i64> %a, %b 2291 ret <2 x i64> %1 2292} 2293 2294; The MIPS vector ABI treats vectors of floats differently to vectors of 2295; integers. 2296 2297; For arguments floating pointer vectors are bitcasted to integer vectors whose 2298; elements are of GPR width and where the element count is deduced from 2299; the length of the floating point vector divided by the size of the GPRs. 2300 2301; For returns, integer vectors are passed via the GPR register set, but 2302; floating point vectors are returned via a hidden sret pointer. 2303 2304; For testing purposes we skip returning values here and test them below 2305; instead. 2306@float_res_v2f32 = external global <2 x float> 2307 2308define void @float_2(<2 x float> %a, <2 x float> %b) { 2309; MIPS32-LABEL: float_2: 2310; MIPS32: # %bb.0: 2311; MIPS32-NEXT: mtc1 $7, $f0 2312; MIPS32-NEXT: mtc1 $5, $f1 2313; MIPS32-NEXT: add.s $f0, $f1, $f0 2314; MIPS32-NEXT: lui $1, %hi(float_res_v2f32) 2315; MIPS32-NEXT: addiu $2, $1, %lo(float_res_v2f32) 2316; MIPS32-NEXT: swc1 $f0, 4($2) 2317; MIPS32-NEXT: mtc1 $6, $f0 2318; MIPS32-NEXT: mtc1 $4, $f1 2319; MIPS32-NEXT: add.s $f0, $f1, $f0 2320; MIPS32-NEXT: swc1 $f0, %lo(float_res_v2f32)($1) 2321; MIPS32-NEXT: jr $ra 2322; MIPS32-NEXT: nop 2323; 2324; MIPS64EB-LABEL: float_2: 2325; MIPS64EB: # %bb.0: 2326; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(float_2))) 2327; MIPS64EB-NEXT: daddu $1, $1, $25 2328; MIPS64EB-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_2))) 2329; MIPS64EB-NEXT: sll $2, $5, 0 2330; MIPS64EB-NEXT: mtc1 $2, $f0 2331; MIPS64EB-NEXT: sll $2, $4, 0 2332; MIPS64EB-NEXT: mtc1 $2, $f1 2333; MIPS64EB-NEXT: add.s $f0, $f1, $f0 2334; MIPS64EB-NEXT: dsrl $2, $5, 32 2335; MIPS64EB-NEXT: sll $2, $2, 0 2336; MIPS64EB-NEXT: ld $1, %got_disp(float_res_v2f32)($1) 2337; MIPS64EB-NEXT: swc1 $f0, 4($1) 2338; MIPS64EB-NEXT: mtc1 $2, $f0 2339; MIPS64EB-NEXT: dsrl $2, $4, 32 2340; MIPS64EB-NEXT: sll $2, $2, 0 2341; MIPS64EB-NEXT: mtc1 $2, $f1 2342; MIPS64EB-NEXT: add.s $f0, $f1, $f0 2343; MIPS64EB-NEXT: swc1 $f0, 0($1) 2344; MIPS64EB-NEXT: jr $ra 2345; MIPS64EB-NEXT: nop 2346; 2347; MIPS32R5-LABEL: float_2: 2348; MIPS32R5: # %bb.0: 2349; MIPS32R5-NEXT: addiu $sp, $sp, -48 2350; MIPS32R5-NEXT: .cfi_def_cfa_offset 48 2351; MIPS32R5-NEXT: sw $ra, 44($sp) # 4-byte Folded Spill 2352; MIPS32R5-NEXT: sw $fp, 40($sp) # 4-byte Folded Spill 2353; MIPS32R5-NEXT: .cfi_offset 31, -4 2354; MIPS32R5-NEXT: .cfi_offset 30, -8 2355; MIPS32R5-NEXT: move $fp, $sp 2356; MIPS32R5-NEXT: .cfi_def_cfa_register 30 2357; MIPS32R5-NEXT: addiu $1, $zero, -16 2358; MIPS32R5-NEXT: and $sp, $sp, $1 2359; MIPS32R5-NEXT: sw $7, 20($sp) 2360; MIPS32R5-NEXT: sw $6, 16($sp) 2361; MIPS32R5-NEXT: sw $5, 4($sp) 2362; MIPS32R5-NEXT: sw $4, 0($sp) 2363; MIPS32R5-NEXT: ld.w $w0, 16($sp) 2364; MIPS32R5-NEXT: ld.w $w1, 0($sp) 2365; MIPS32R5-NEXT: fadd.w $w0, $w1, $w0 2366; MIPS32R5-NEXT: lui $1, %hi(float_res_v2f32) 2367; MIPS32R5-NEXT: addiu $2, $1, %lo(float_res_v2f32) 2368; MIPS32R5-NEXT: splati.w $w1, $w0[1] 2369; MIPS32R5-NEXT: swc1 $f1, 4($2) 2370; MIPS32R5-NEXT: swc1 $f0, %lo(float_res_v2f32)($1) 2371; MIPS32R5-NEXT: move $sp, $fp 2372; MIPS32R5-NEXT: lw $fp, 40($sp) # 4-byte Folded Reload 2373; MIPS32R5-NEXT: lw $ra, 44($sp) # 4-byte Folded Reload 2374; MIPS32R5-NEXT: addiu $sp, $sp, 48 2375; MIPS32R5-NEXT: jr $ra 2376; MIPS32R5-NEXT: nop 2377; 2378; MIPS64R5EB-LABEL: float_2: 2379; MIPS64R5EB: # %bb.0: 2380; MIPS64R5EB-NEXT: daddiu $sp, $sp, -32 2381; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 32 2382; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(float_2))) 2383; MIPS64R5EB-NEXT: daddu $1, $1, $25 2384; MIPS64R5EB-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_2))) 2385; MIPS64R5EB-NEXT: sd $5, 16($sp) 2386; MIPS64R5EB-NEXT: sd $4, 0($sp) 2387; MIPS64R5EB-NEXT: ld.w $w0, 16($sp) 2388; MIPS64R5EB-NEXT: ld.w $w1, 0($sp) 2389; MIPS64R5EB-NEXT: fadd.w $w0, $w1, $w0 2390; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 2391; MIPS64R5EB-NEXT: copy_s.d $2, $w0[0] 2392; MIPS64R5EB-NEXT: ld $1, %got_disp(float_res_v2f32)($1) 2393; MIPS64R5EB-NEXT: sd $2, 0($1) 2394; MIPS64R5EB-NEXT: daddiu $sp, $sp, 32 2395; MIPS64R5EB-NEXT: jr $ra 2396; MIPS64R5EB-NEXT: nop 2397; 2398; MIPS64EL-LABEL: float_2: 2399; MIPS64EL: # %bb.0: 2400; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(float_2))) 2401; MIPS64EL-NEXT: daddu $1, $1, $25 2402; MIPS64EL-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_2))) 2403; MIPS64EL-NEXT: sll $2, $5, 0 2404; MIPS64EL-NEXT: mtc1 $2, $f0 2405; MIPS64EL-NEXT: sll $2, $4, 0 2406; MIPS64EL-NEXT: mtc1 $2, $f1 2407; MIPS64EL-NEXT: add.s $f0, $f1, $f0 2408; MIPS64EL-NEXT: dsrl $2, $5, 32 2409; MIPS64EL-NEXT: sll $2, $2, 0 2410; MIPS64EL-NEXT: ld $1, %got_disp(float_res_v2f32)($1) 2411; MIPS64EL-NEXT: swc1 $f0, 0($1) 2412; MIPS64EL-NEXT: mtc1 $2, $f0 2413; MIPS64EL-NEXT: dsrl $2, $4, 32 2414; MIPS64EL-NEXT: sll $2, $2, 0 2415; MIPS64EL-NEXT: mtc1 $2, $f1 2416; MIPS64EL-NEXT: add.s $f0, $f1, $f0 2417; MIPS64EL-NEXT: swc1 $f0, 4($1) 2418; MIPS64EL-NEXT: jr $ra 2419; MIPS64EL-NEXT: nop 2420; 2421; MIPS64R5EL-LABEL: float_2: 2422; MIPS64R5EL: # %bb.0: 2423; MIPS64R5EL-NEXT: daddiu $sp, $sp, -32 2424; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 32 2425; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(float_2))) 2426; MIPS64R5EL-NEXT: daddu $1, $1, $25 2427; MIPS64R5EL-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_2))) 2428; MIPS64R5EL-NEXT: sd $5, 16($sp) 2429; MIPS64R5EL-NEXT: sd $4, 0($sp) 2430; MIPS64R5EL-NEXT: ld.w $w0, 16($sp) 2431; MIPS64R5EL-NEXT: ld.w $w1, 0($sp) 2432; MIPS64R5EL-NEXT: fadd.w $w0, $w1, $w0 2433; MIPS64R5EL-NEXT: copy_s.d $2, $w0[0] 2434; MIPS64R5EL-NEXT: ld $1, %got_disp(float_res_v2f32)($1) 2435; MIPS64R5EL-NEXT: sd $2, 0($1) 2436; MIPS64R5EL-NEXT: daddiu $sp, $sp, 32 2437; MIPS64R5EL-NEXT: jr $ra 2438; MIPS64R5EL-NEXT: nop 2439 %1 = fadd <2 x float> %a, %b 2440 store <2 x float> %1, <2 x float> * @float_res_v2f32 2441 ret void 2442} 2443 2444@float_res_v4f32 = external global <4 x float> 2445 2446; For MSA this case is suboptimal, the 4 loads can be combined into a single 2447; ld.w. 2448 2449define void @float_4(<4 x float> %a, <4 x float> %b) { 2450; MIPS32-LABEL: float_4: 2451; MIPS32: # %bb.0: 2452; MIPS32-NEXT: mtc1 $7, $f0 2453; MIPS32-NEXT: mtc1 $6, $f1 2454; MIPS32-NEXT: lwc1 $f2, 28($sp) 2455; MIPS32-NEXT: lwc1 $f3, 24($sp) 2456; MIPS32-NEXT: add.s $f1, $f1, $f3 2457; MIPS32-NEXT: add.s $f0, $f0, $f2 2458; MIPS32-NEXT: mtc1 $5, $f2 2459; MIPS32-NEXT: lui $1, %hi(float_res_v4f32) 2460; MIPS32-NEXT: addiu $2, $1, %lo(float_res_v4f32) 2461; MIPS32-NEXT: lwc1 $f3, 20($sp) 2462; MIPS32-NEXT: swc1 $f0, 12($2) 2463; MIPS32-NEXT: swc1 $f1, 8($2) 2464; MIPS32-NEXT: add.s $f0, $f2, $f3 2465; MIPS32-NEXT: swc1 $f0, 4($2) 2466; MIPS32-NEXT: mtc1 $4, $f0 2467; MIPS32-NEXT: lwc1 $f1, 16($sp) 2468; MIPS32-NEXT: add.s $f0, $f0, $f1 2469; MIPS32-NEXT: swc1 $f0, %lo(float_res_v4f32)($1) 2470; MIPS32-NEXT: jr $ra 2471; MIPS32-NEXT: nop 2472; 2473; MIPS64EB-LABEL: float_4: 2474; MIPS64EB: # %bb.0: 2475; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(float_4))) 2476; MIPS64EB-NEXT: daddu $1, $1, $25 2477; MIPS64EB-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_4))) 2478; MIPS64EB-NEXT: dsrl $2, $7, 32 2479; MIPS64EB-NEXT: sll $2, $2, 0 2480; MIPS64EB-NEXT: sll $3, $4, 0 2481; MIPS64EB-NEXT: sll $8, $6, 0 2482; MIPS64EB-NEXT: sll $7, $7, 0 2483; MIPS64EB-NEXT: mtc1 $8, $f0 2484; MIPS64EB-NEXT: mtc1 $3, $f1 2485; MIPS64EB-NEXT: mtc1 $2, $f2 2486; MIPS64EB-NEXT: dsrl $2, $5, 32 2487; MIPS64EB-NEXT: sll $2, $2, 0 2488; MIPS64EB-NEXT: mtc1 $2, $f3 2489; MIPS64EB-NEXT: add.s $f2, $f3, $f2 2490; MIPS64EB-NEXT: add.s $f0, $f1, $f0 2491; MIPS64EB-NEXT: mtc1 $7, $f1 2492; MIPS64EB-NEXT: sll $2, $5, 0 2493; MIPS64EB-NEXT: mtc1 $2, $f3 2494; MIPS64EB-NEXT: add.s $f1, $f3, $f1 2495; MIPS64EB-NEXT: dsrl $2, $6, 32 2496; MIPS64EB-NEXT: sll $2, $2, 0 2497; MIPS64EB-NEXT: ld $1, %got_disp(float_res_v4f32)($1) 2498; MIPS64EB-NEXT: swc1 $f1, 12($1) 2499; MIPS64EB-NEXT: swc1 $f0, 4($1) 2500; MIPS64EB-NEXT: swc1 $f2, 8($1) 2501; MIPS64EB-NEXT: mtc1 $2, $f0 2502; MIPS64EB-NEXT: dsrl $2, $4, 32 2503; MIPS64EB-NEXT: sll $2, $2, 0 2504; MIPS64EB-NEXT: mtc1 $2, $f1 2505; MIPS64EB-NEXT: add.s $f0, $f1, $f0 2506; MIPS64EB-NEXT: swc1 $f0, 0($1) 2507; MIPS64EB-NEXT: jr $ra 2508; MIPS64EB-NEXT: nop 2509; 2510; MIPS32R5-LABEL: float_4: 2511; MIPS32R5: # %bb.0: 2512; MIPS32R5-NEXT: lw $1, 20($sp) 2513; MIPS32R5-NEXT: lw $2, 16($sp) 2514; MIPS32R5-NEXT: insert.w $w0[0], $2 2515; MIPS32R5-NEXT: insert.w $w0[1], $1 2516; MIPS32R5-NEXT: lw $1, 24($sp) 2517; MIPS32R5-NEXT: insert.w $w0[2], $1 2518; MIPS32R5-NEXT: lw $1, 28($sp) 2519; MIPS32R5-NEXT: insert.w $w0[3], $1 2520; MIPS32R5-NEXT: insert.w $w1[0], $4 2521; MIPS32R5-NEXT: insert.w $w1[1], $5 2522; MIPS32R5-NEXT: insert.w $w1[2], $6 2523; MIPS32R5-NEXT: insert.w $w1[3], $7 2524; MIPS32R5-NEXT: fadd.w $w0, $w1, $w0 2525; MIPS32R5-NEXT: lui $1, %hi(float_res_v4f32) 2526; MIPS32R5-NEXT: addiu $1, $1, %lo(float_res_v4f32) 2527; MIPS32R5-NEXT: st.w $w0, 0($1) 2528; MIPS32R5-NEXT: jr $ra 2529; MIPS32R5-NEXT: nop 2530; 2531; MIPS64R5EB-LABEL: float_4: 2532; MIPS64R5EB: # %bb.0: 2533; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(float_4))) 2534; MIPS64R5EB-NEXT: daddu $1, $1, $25 2535; MIPS64R5EB-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_4))) 2536; MIPS64R5EB-NEXT: insert.d $w0[0], $6 2537; MIPS64R5EB-NEXT: insert.d $w0[1], $7 2538; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 2539; MIPS64R5EB-NEXT: insert.d $w1[0], $4 2540; MIPS64R5EB-NEXT: insert.d $w1[1], $5 2541; MIPS64R5EB-NEXT: shf.w $w1, $w1, 177 2542; MIPS64R5EB-NEXT: fadd.w $w0, $w1, $w0 2543; MIPS64R5EB-NEXT: ld $1, %got_disp(float_res_v4f32)($1) 2544; MIPS64R5EB-NEXT: st.w $w0, 0($1) 2545; MIPS64R5EB-NEXT: jr $ra 2546; MIPS64R5EB-NEXT: nop 2547; 2548; MIPS64EL-LABEL: float_4: 2549; MIPS64EL: # %bb.0: 2550; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(float_4))) 2551; MIPS64EL-NEXT: daddu $1, $1, $25 2552; MIPS64EL-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_4))) 2553; MIPS64EL-NEXT: dsrl $2, $7, 32 2554; MIPS64EL-NEXT: sll $2, $2, 0 2555; MIPS64EL-NEXT: sll $3, $4, 0 2556; MIPS64EL-NEXT: sll $8, $6, 0 2557; MIPS64EL-NEXT: sll $7, $7, 0 2558; MIPS64EL-NEXT: mtc1 $8, $f0 2559; MIPS64EL-NEXT: mtc1 $3, $f1 2560; MIPS64EL-NEXT: mtc1 $2, $f2 2561; MIPS64EL-NEXT: dsrl $2, $5, 32 2562; MIPS64EL-NEXT: sll $2, $2, 0 2563; MIPS64EL-NEXT: mtc1 $2, $f3 2564; MIPS64EL-NEXT: add.s $f2, $f3, $f2 2565; MIPS64EL-NEXT: add.s $f0, $f1, $f0 2566; MIPS64EL-NEXT: mtc1 $7, $f1 2567; MIPS64EL-NEXT: sll $2, $5, 0 2568; MIPS64EL-NEXT: mtc1 $2, $f3 2569; MIPS64EL-NEXT: add.s $f1, $f3, $f1 2570; MIPS64EL-NEXT: dsrl $2, $6, 32 2571; MIPS64EL-NEXT: sll $2, $2, 0 2572; MIPS64EL-NEXT: ld $1, %got_disp(float_res_v4f32)($1) 2573; MIPS64EL-NEXT: swc1 $f1, 8($1) 2574; MIPS64EL-NEXT: swc1 $f0, 0($1) 2575; MIPS64EL-NEXT: swc1 $f2, 12($1) 2576; MIPS64EL-NEXT: mtc1 $2, $f0 2577; MIPS64EL-NEXT: dsrl $2, $4, 32 2578; MIPS64EL-NEXT: sll $2, $2, 0 2579; MIPS64EL-NEXT: mtc1 $2, $f1 2580; MIPS64EL-NEXT: add.s $f0, $f1, $f0 2581; MIPS64EL-NEXT: swc1 $f0, 4($1) 2582; MIPS64EL-NEXT: jr $ra 2583; MIPS64EL-NEXT: nop 2584; 2585; MIPS64R5EL-LABEL: float_4: 2586; MIPS64R5EL: # %bb.0: 2587; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(float_4))) 2588; MIPS64R5EL-NEXT: daddu $1, $1, $25 2589; MIPS64R5EL-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(float_4))) 2590; MIPS64R5EL-NEXT: insert.d $w0[0], $6 2591; MIPS64R5EL-NEXT: insert.d $w0[1], $7 2592; MIPS64R5EL-NEXT: insert.d $w1[0], $4 2593; MIPS64R5EL-NEXT: insert.d $w1[1], $5 2594; MIPS64R5EL-NEXT: fadd.w $w0, $w1, $w0 2595; MIPS64R5EL-NEXT: ld $1, %got_disp(float_res_v4f32)($1) 2596; MIPS64R5EL-NEXT: st.w $w0, 0($1) 2597; MIPS64R5EL-NEXT: jr $ra 2598; MIPS64R5EL-NEXT: nop 2599 %1 = fadd <4 x float> %a, %b 2600 store <4 x float> %1, <4 x float> * @float_res_v4f32 2601 ret void 2602} 2603 2604@double_v2f64 = external global <2 x double> 2605 2606define void @double_2(<2 x double> %a, <2 x double> %b) { 2607; MIPS32-LABEL: double_2: 2608; MIPS32: # %bb.0: 2609; MIPS32-NEXT: addiu $sp, $sp, -32 2610; MIPS32-NEXT: .cfi_def_cfa_offset 32 2611; MIPS32-NEXT: lw $1, 60($sp) 2612; MIPS32-NEXT: sw $1, 12($sp) 2613; MIPS32-NEXT: lw $1, 56($sp) 2614; MIPS32-NEXT: sw $1, 8($sp) 2615; MIPS32-NEXT: sw $7, 28($sp) 2616; MIPS32-NEXT: sw $6, 24($sp) 2617; MIPS32-NEXT: ldc1 $f0, 8($sp) 2618; MIPS32-NEXT: ldc1 $f2, 24($sp) 2619; MIPS32-NEXT: add.d $f0, $f2, $f0 2620; MIPS32-NEXT: lui $1, %hi(double_v2f64) 2621; MIPS32-NEXT: addiu $2, $1, %lo(double_v2f64) 2622; MIPS32-NEXT: lw $3, 52($sp) 2623; MIPS32-NEXT: sdc1 $f0, 8($2) 2624; MIPS32-NEXT: sw $3, 4($sp) 2625; MIPS32-NEXT: lw $2, 48($sp) 2626; MIPS32-NEXT: sw $2, 0($sp) 2627; MIPS32-NEXT: sw $5, 20($sp) 2628; MIPS32-NEXT: sw $4, 16($sp) 2629; MIPS32-NEXT: ldc1 $f0, 0($sp) 2630; MIPS32-NEXT: ldc1 $f2, 16($sp) 2631; MIPS32-NEXT: add.d $f0, $f2, $f0 2632; MIPS32-NEXT: sdc1 $f0, %lo(double_v2f64)($1) 2633; MIPS32-NEXT: addiu $sp, $sp, 32 2634; MIPS32-NEXT: jr $ra 2635; MIPS32-NEXT: nop 2636; 2637; MIPS64-LABEL: double_2: 2638; MIPS64: # %bb.0: 2639; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(double_2))) 2640; MIPS64-NEXT: daddu $1, $1, $25 2641; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(double_2))) 2642; MIPS64-NEXT: dmtc1 $7, $f0 2643; MIPS64-NEXT: dmtc1 $5, $f1 2644; MIPS64-NEXT: add.d $f0, $f1, $f0 2645; MIPS64-NEXT: ld $1, %got_disp(double_v2f64)($1) 2646; MIPS64-NEXT: sdc1 $f0, 8($1) 2647; MIPS64-NEXT: dmtc1 $6, $f0 2648; MIPS64-NEXT: dmtc1 $4, $f1 2649; MIPS64-NEXT: add.d $f0, $f1, $f0 2650; MIPS64-NEXT: sdc1 $f0, 0($1) 2651; MIPS64-NEXT: jr $ra 2652; MIPS64-NEXT: nop 2653; 2654; MIPS32R5EB-LABEL: double_2: 2655; MIPS32R5EB: # %bb.0: 2656; MIPS32R5EB-NEXT: lw $1, 20($sp) 2657; MIPS32R5EB-NEXT: lw $2, 16($sp) 2658; MIPS32R5EB-NEXT: insert.w $w0[0], $2 2659; MIPS32R5EB-NEXT: insert.w $w0[1], $1 2660; MIPS32R5EB-NEXT: lw $1, 24($sp) 2661; MIPS32R5EB-NEXT: insert.w $w0[2], $1 2662; MIPS32R5EB-NEXT: lw $1, 28($sp) 2663; MIPS32R5EB-NEXT: insert.w $w0[3], $1 2664; MIPS32R5EB-NEXT: shf.w $w0, $w0, 177 2665; MIPS32R5EB-NEXT: insert.w $w1[0], $4 2666; MIPS32R5EB-NEXT: insert.w $w1[1], $5 2667; MIPS32R5EB-NEXT: insert.w $w1[2], $6 2668; MIPS32R5EB-NEXT: insert.w $w1[3], $7 2669; MIPS32R5EB-NEXT: shf.w $w1, $w1, 177 2670; MIPS32R5EB-NEXT: fadd.d $w0, $w1, $w0 2671; MIPS32R5EB-NEXT: lui $1, %hi(double_v2f64) 2672; MIPS32R5EB-NEXT: addiu $1, $1, %lo(double_v2f64) 2673; MIPS32R5EB-NEXT: st.d $w0, 0($1) 2674; MIPS32R5EB-NEXT: jr $ra 2675; MIPS32R5EB-NEXT: nop 2676; 2677; MIPS64R5-LABEL: double_2: 2678; MIPS64R5: # %bb.0: 2679; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(double_2))) 2680; MIPS64R5-NEXT: daddu $1, $1, $25 2681; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(double_2))) 2682; MIPS64R5-NEXT: insert.d $w0[0], $6 2683; MIPS64R5-NEXT: insert.d $w0[1], $7 2684; MIPS64R5-NEXT: insert.d $w1[0], $4 2685; MIPS64R5-NEXT: insert.d $w1[1], $5 2686; MIPS64R5-NEXT: fadd.d $w0, $w1, $w0 2687; MIPS64R5-NEXT: ld $1, %got_disp(double_v2f64)($1) 2688; MIPS64R5-NEXT: st.d $w0, 0($1) 2689; MIPS64R5-NEXT: jr $ra 2690; MIPS64R5-NEXT: nop 2691; 2692; MIPS32R5EL-LABEL: double_2: 2693; MIPS32R5EL: # %bb.0: 2694; MIPS32R5EL-NEXT: lw $1, 20($sp) 2695; MIPS32R5EL-NEXT: lw $2, 16($sp) 2696; MIPS32R5EL-NEXT: insert.w $w0[0], $2 2697; MIPS32R5EL-NEXT: insert.w $w0[1], $1 2698; MIPS32R5EL-NEXT: lw $1, 24($sp) 2699; MIPS32R5EL-NEXT: insert.w $w0[2], $1 2700; MIPS32R5EL-NEXT: lw $1, 28($sp) 2701; MIPS32R5EL-NEXT: insert.w $w0[3], $1 2702; MIPS32R5EL-NEXT: insert.w $w1[0], $4 2703; MIPS32R5EL-NEXT: insert.w $w1[1], $5 2704; MIPS32R5EL-NEXT: insert.w $w1[2], $6 2705; MIPS32R5EL-NEXT: insert.w $w1[3], $7 2706; MIPS32R5EL-NEXT: fadd.d $w0, $w1, $w0 2707; MIPS32R5EL-NEXT: lui $1, %hi(double_v2f64) 2708; MIPS32R5EL-NEXT: addiu $1, $1, %lo(double_v2f64) 2709; MIPS32R5EL-NEXT: st.d $w0, 0($1) 2710; MIPS32R5EL-NEXT: jr $ra 2711; MIPS32R5EL-NEXT: nop 2712 %1 = fadd <2 x double> %a, %b 2713 store <2 x double> %1, <2 x double> * @double_v2f64 2714 ret void 2715} 2716 2717; Return value testing. 2718; Integer vectors are returned in $2, $3, $4, $5 for O32, $2, $3 for N32/N64 2719; Floating point vectors are returned through a hidden sret pointer. 2720 2721@gv2i8 = global <2 x i8> <i8 1, i8 2> 2722@gv4i8 = global <4 x i8> <i8 0, i8 1, i8 2, i8 3> 2723@gv8i8 = global <8 x i8> <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7> 2724@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> 2725 2726@gv2i16 = global <2 x i16> <i16 1, i16 2> 2727@gv4i16 = global <4 x i16> <i16 0, i16 1, i16 2, i16 3> 2728@gv8i16 = global <8 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7> 2729 2730@gv2i32 = global <2 x i32> <i32 0, i32 1> 2731@gv4i32 = global <4 x i32> <i32 0, i32 1, i32 2, i32 3> 2732 2733@gv2i64 = global <2 x i64> <i64 0, i64 1> 2734 2735; FIXME: why is this lh instead of lhu on mips64? 2736define <2 x i8> @ret_2_i8() { 2737; MIPS32-LABEL: ret_2_i8: 2738; MIPS32: # %bb.0: 2739; MIPS32-NEXT: lui $1, %hi(gv2i8) 2740; MIPS32-NEXT: lhu $2, %lo(gv2i8)($1) 2741; MIPS32-NEXT: jr $ra 2742; MIPS32-NEXT: nop 2743; 2744; MIPS64-LABEL: ret_2_i8: 2745; MIPS64: # %bb.0: 2746; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i8))) 2747; MIPS64-NEXT: daddu $1, $1, $25 2748; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i8))) 2749; MIPS64-NEXT: ld $1, %got_disp(gv2i8)($1) 2750; MIPS64-NEXT: lh $2, 0($1) 2751; MIPS64-NEXT: jr $ra 2752; MIPS64-NEXT: nop 2753; 2754; MIPS32R5-LABEL: ret_2_i8: 2755; MIPS32R5: # %bb.0: 2756; MIPS32R5-NEXT: lui $1, %hi(gv2i8) 2757; MIPS32R5-NEXT: lhu $2, %lo(gv2i8)($1) 2758; MIPS32R5-NEXT: jr $ra 2759; MIPS32R5-NEXT: nop 2760; 2761; MIPS64R5-LABEL: ret_2_i8: 2762; MIPS64R5: # %bb.0: 2763; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i8))) 2764; MIPS64R5-NEXT: daddu $1, $1, $25 2765; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i8))) 2766; MIPS64R5-NEXT: ld $1, %got_disp(gv2i8)($1) 2767; MIPS64R5-NEXT: lh $2, 0($1) 2768; MIPS64R5-NEXT: jr $ra 2769; MIPS64R5-NEXT: nop 2770 %1 = load <2 x i8>, <2 x i8> * @gv2i8 2771 ret <2 x i8> %1 2772} 2773 2774define <4 x i8> @ret_4_i8() { 2775; MIPS32-LABEL: ret_4_i8: 2776; MIPS32: # %bb.0: 2777; MIPS32-NEXT: lui $1, %hi(gv4i8) 2778; MIPS32-NEXT: lw $2, %lo(gv4i8)($1) 2779; MIPS32-NEXT: jr $ra 2780; MIPS32-NEXT: nop 2781; 2782; MIPS64-LABEL: ret_4_i8: 2783; MIPS64: # %bb.0: 2784; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_4_i8))) 2785; MIPS64-NEXT: daddu $1, $1, $25 2786; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_4_i8))) 2787; MIPS64-NEXT: ld $1, %got_disp(gv4i8)($1) 2788; MIPS64-NEXT: lw $2, 0($1) 2789; MIPS64-NEXT: jr $ra 2790; MIPS64-NEXT: nop 2791; 2792; MIPS32R5-LABEL: ret_4_i8: 2793; MIPS32R5: # %bb.0: 2794; MIPS32R5-NEXT: lui $1, %hi(gv4i8) 2795; MIPS32R5-NEXT: lw $2, %lo(gv4i8)($1) 2796; MIPS32R5-NEXT: jr $ra 2797; MIPS32R5-NEXT: nop 2798; 2799; MIPS64R5-LABEL: ret_4_i8: 2800; MIPS64R5: # %bb.0: 2801; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_4_i8))) 2802; MIPS64R5-NEXT: daddu $1, $1, $25 2803; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_4_i8))) 2804; MIPS64R5-NEXT: ld $1, %got_disp(gv4i8)($1) 2805; MIPS64R5-NEXT: lw $2, 0($1) 2806; MIPS64R5-NEXT: jr $ra 2807; MIPS64R5-NEXT: nop 2808 %1 = load <4 x i8>, <4 x i8> * @gv4i8 2809 ret <4 x i8> %1 2810} 2811 2812define <8 x i8> @ret_8_i8() { 2813; MIPS32-LABEL: ret_8_i8: 2814; MIPS32: # %bb.0: 2815; MIPS32-NEXT: lui $1, %hi(gv8i8) 2816; MIPS32-NEXT: lw $2, %lo(gv8i8)($1) 2817; MIPS32-NEXT: addiu $1, $1, %lo(gv8i8) 2818; MIPS32-NEXT: lw $3, 4($1) 2819; MIPS32-NEXT: jr $ra 2820; MIPS32-NEXT: nop 2821; 2822; MIPS64-LABEL: ret_8_i8: 2823; MIPS64: # %bb.0: 2824; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_8_i8))) 2825; MIPS64-NEXT: daddu $1, $1, $25 2826; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_8_i8))) 2827; MIPS64-NEXT: ld $1, %got_disp(gv8i8)($1) 2828; MIPS64-NEXT: ld $2, 0($1) 2829; MIPS64-NEXT: jr $ra 2830; MIPS64-NEXT: nop 2831; 2832; MIPS32R5EB-LABEL: ret_8_i8: 2833; MIPS32R5EB: # %bb.0: 2834; MIPS32R5EB-NEXT: addiu $sp, $sp, -32 2835; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 32 2836; MIPS32R5EB-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill 2837; MIPS32R5EB-NEXT: sw $fp, 24($sp) # 4-byte Folded Spill 2838; MIPS32R5EB-NEXT: .cfi_offset 31, -4 2839; MIPS32R5EB-NEXT: .cfi_offset 30, -8 2840; MIPS32R5EB-NEXT: move $fp, $sp 2841; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 2842; MIPS32R5EB-NEXT: addiu $1, $zero, -16 2843; MIPS32R5EB-NEXT: and $sp, $sp, $1 2844; MIPS32R5EB-NEXT: lui $1, %hi(gv8i8) 2845; MIPS32R5EB-NEXT: lw $2, %lo(gv8i8)($1) 2846; MIPS32R5EB-NEXT: sw $2, 4($sp) 2847; MIPS32R5EB-NEXT: addiu $1, $1, %lo(gv8i8) 2848; MIPS32R5EB-NEXT: lw $1, 4($1) 2849; MIPS32R5EB-NEXT: sw $1, 12($sp) 2850; MIPS32R5EB-NEXT: ld.w $w0, 0($sp) 2851; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] 2852; MIPS32R5EB-NEXT: copy_s.w $3, $w0[3] 2853; MIPS32R5EB-NEXT: move $sp, $fp 2854; MIPS32R5EB-NEXT: lw $fp, 24($sp) # 4-byte Folded Reload 2855; MIPS32R5EB-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload 2856; MIPS32R5EB-NEXT: addiu $sp, $sp, 32 2857; MIPS32R5EB-NEXT: jr $ra 2858; MIPS32R5EB-NEXT: nop 2859; 2860; MIPS64R5-LABEL: ret_8_i8: 2861; MIPS64R5: # %bb.0: 2862; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_8_i8))) 2863; MIPS64R5-NEXT: daddu $1, $1, $25 2864; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_8_i8))) 2865; MIPS64R5-NEXT: ld $1, %got_disp(gv8i8)($1) 2866; MIPS64R5-NEXT: ld $2, 0($1) 2867; MIPS64R5-NEXT: jr $ra 2868; MIPS64R5-NEXT: nop 2869; 2870; MIPS32R5EL-LABEL: ret_8_i8: 2871; MIPS32R5EL: # %bb.0: 2872; MIPS32R5EL-NEXT: addiu $sp, $sp, -32 2873; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 32 2874; MIPS32R5EL-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill 2875; MIPS32R5EL-NEXT: sw $fp, 24($sp) # 4-byte Folded Spill 2876; MIPS32R5EL-NEXT: .cfi_offset 31, -4 2877; MIPS32R5EL-NEXT: .cfi_offset 30, -8 2878; MIPS32R5EL-NEXT: move $fp, $sp 2879; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 2880; MIPS32R5EL-NEXT: addiu $1, $zero, -16 2881; MIPS32R5EL-NEXT: and $sp, $sp, $1 2882; MIPS32R5EL-NEXT: lui $1, %hi(gv8i8) 2883; MIPS32R5EL-NEXT: lw $2, %lo(gv8i8)($1) 2884; MIPS32R5EL-NEXT: sw $2, 0($sp) 2885; MIPS32R5EL-NEXT: addiu $1, $1, %lo(gv8i8) 2886; MIPS32R5EL-NEXT: lw $1, 4($1) 2887; MIPS32R5EL-NEXT: sw $1, 8($sp) 2888; MIPS32R5EL-NEXT: ld.w $w0, 0($sp) 2889; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] 2890; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] 2891; MIPS32R5EL-NEXT: move $sp, $fp 2892; MIPS32R5EL-NEXT: lw $fp, 24($sp) # 4-byte Folded Reload 2893; MIPS32R5EL-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload 2894; MIPS32R5EL-NEXT: addiu $sp, $sp, 32 2895; MIPS32R5EL-NEXT: jr $ra 2896; MIPS32R5EL-NEXT: nop 2897 %1 = load <8 x i8>, <8 x i8> * @gv8i8 2898 ret <8 x i8> %1 2899} 2900 2901define <16 x i8> @ret_16_i8() { 2902; MIPS32-LABEL: ret_16_i8: 2903; MIPS32: # %bb.0: 2904; MIPS32-NEXT: lui $1, %hi(gv16i8) 2905; MIPS32-NEXT: lw $2, %lo(gv16i8)($1) 2906; MIPS32-NEXT: addiu $1, $1, %lo(gv16i8) 2907; MIPS32-NEXT: lw $3, 4($1) 2908; MIPS32-NEXT: lw $4, 8($1) 2909; MIPS32-NEXT: lw $5, 12($1) 2910; MIPS32-NEXT: jr $ra 2911; MIPS32-NEXT: nop 2912; 2913; MIPS64-LABEL: ret_16_i8: 2914; MIPS64: # %bb.0: 2915; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_16_i8))) 2916; MIPS64-NEXT: daddu $1, $1, $25 2917; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_16_i8))) 2918; MIPS64-NEXT: ld $1, %got_disp(gv16i8)($1) 2919; MIPS64-NEXT: ld $2, 0($1) 2920; MIPS64-NEXT: ld $3, 8($1) 2921; MIPS64-NEXT: jr $ra 2922; MIPS64-NEXT: nop 2923; 2924; MIPS32R5-LABEL: ret_16_i8: 2925; MIPS32R5: # %bb.0: 2926; MIPS32R5-NEXT: lui $1, %hi(gv16i8) 2927; MIPS32R5-NEXT: addiu $1, $1, %lo(gv16i8) 2928; MIPS32R5-NEXT: ld.w $w0, 0($1) 2929; MIPS32R5-NEXT: copy_s.w $2, $w0[0] 2930; MIPS32R5-NEXT: copy_s.w $3, $w0[1] 2931; MIPS32R5-NEXT: copy_s.w $4, $w0[2] 2932; MIPS32R5-NEXT: copy_s.w $5, $w0[3] 2933; MIPS32R5-NEXT: jr $ra 2934; MIPS32R5-NEXT: nop 2935; 2936; MIPS64R5-LABEL: ret_16_i8: 2937; MIPS64R5: # %bb.0: 2938; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_16_i8))) 2939; MIPS64R5-NEXT: daddu $1, $1, $25 2940; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_16_i8))) 2941; MIPS64R5-NEXT: ld $1, %got_disp(gv16i8)($1) 2942; MIPS64R5-NEXT: ld.d $w0, 0($1) 2943; MIPS64R5-NEXT: copy_s.d $2, $w0[0] 2944; MIPS64R5-NEXT: copy_s.d $3, $w0[1] 2945; MIPS64R5-NEXT: jr $ra 2946; MIPS64R5-NEXT: nop 2947 %1 = load <16 x i8>, <16 x i8> * @gv16i8 2948 ret <16 x i8> %1 2949} 2950 2951define <2 x i16> @ret_2_i16() { 2952; MIPS32-LABEL: ret_2_i16: 2953; MIPS32: # %bb.0: 2954; MIPS32-NEXT: lui $1, %hi(gv2i16) 2955; MIPS32-NEXT: lw $2, %lo(gv2i16)($1) 2956; MIPS32-NEXT: jr $ra 2957; MIPS32-NEXT: nop 2958; 2959; MIPS64-LABEL: ret_2_i16: 2960; MIPS64: # %bb.0: 2961; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i16))) 2962; MIPS64-NEXT: daddu $1, $1, $25 2963; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i16))) 2964; MIPS64-NEXT: ld $1, %got_disp(gv2i16)($1) 2965; MIPS64-NEXT: lw $2, 0($1) 2966; MIPS64-NEXT: jr $ra 2967; MIPS64-NEXT: nop 2968; 2969; MIPS32R5-LABEL: ret_2_i16: 2970; MIPS32R5: # %bb.0: 2971; MIPS32R5-NEXT: lui $1, %hi(gv2i16) 2972; MIPS32R5-NEXT: lw $2, %lo(gv2i16)($1) 2973; MIPS32R5-NEXT: jr $ra 2974; MIPS32R5-NEXT: nop 2975; 2976; MIPS64R5-LABEL: ret_2_i16: 2977; MIPS64R5: # %bb.0: 2978; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i16))) 2979; MIPS64R5-NEXT: daddu $1, $1, $25 2980; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i16))) 2981; MIPS64R5-NEXT: ld $1, %got_disp(gv2i16)($1) 2982; MIPS64R5-NEXT: lw $2, 0($1) 2983; MIPS64R5-NEXT: jr $ra 2984; MIPS64R5-NEXT: nop 2985 %1 = load <2 x i16>, <2 x i16> * @gv2i16 2986 ret <2 x i16> %1 2987} 2988 2989define <4 x i16> @ret_4_i16() { 2990; MIPS32-LABEL: ret_4_i16: 2991; MIPS32: # %bb.0: 2992; MIPS32-NEXT: lui $1, %hi(gv4i16) 2993; MIPS32-NEXT: lw $2, %lo(gv4i16)($1) 2994; MIPS32-NEXT: addiu $1, $1, %lo(gv4i16) 2995; MIPS32-NEXT: lw $3, 4($1) 2996; MIPS32-NEXT: jr $ra 2997; MIPS32-NEXT: nop 2998; 2999; MIPS64-LABEL: ret_4_i16: 3000; MIPS64: # %bb.0: 3001; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_4_i16))) 3002; MIPS64-NEXT: daddu $1, $1, $25 3003; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_4_i16))) 3004; MIPS64-NEXT: ld $1, %got_disp(gv4i16)($1) 3005; MIPS64-NEXT: ld $2, 0($1) 3006; MIPS64-NEXT: jr $ra 3007; MIPS64-NEXT: nop 3008; 3009; MIPS32R5EB-LABEL: ret_4_i16: 3010; MIPS32R5EB: # %bb.0: 3011; MIPS32R5EB-NEXT: addiu $sp, $sp, -32 3012; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 32 3013; MIPS32R5EB-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill 3014; MIPS32R5EB-NEXT: sw $fp, 24($sp) # 4-byte Folded Spill 3015; MIPS32R5EB-NEXT: .cfi_offset 31, -4 3016; MIPS32R5EB-NEXT: .cfi_offset 30, -8 3017; MIPS32R5EB-NEXT: move $fp, $sp 3018; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 3019; MIPS32R5EB-NEXT: addiu $1, $zero, -16 3020; MIPS32R5EB-NEXT: and $sp, $sp, $1 3021; MIPS32R5EB-NEXT: lui $1, %hi(gv4i16) 3022; MIPS32R5EB-NEXT: lw $2, %lo(gv4i16)($1) 3023; MIPS32R5EB-NEXT: sw $2, 4($sp) 3024; MIPS32R5EB-NEXT: addiu $1, $1, %lo(gv4i16) 3025; MIPS32R5EB-NEXT: lw $1, 4($1) 3026; MIPS32R5EB-NEXT: sw $1, 12($sp) 3027; MIPS32R5EB-NEXT: ld.w $w0, 0($sp) 3028; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] 3029; MIPS32R5EB-NEXT: copy_s.w $3, $w0[3] 3030; MIPS32R5EB-NEXT: move $sp, $fp 3031; MIPS32R5EB-NEXT: lw $fp, 24($sp) # 4-byte Folded Reload 3032; MIPS32R5EB-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload 3033; MIPS32R5EB-NEXT: addiu $sp, $sp, 32 3034; MIPS32R5EB-NEXT: jr $ra 3035; MIPS32R5EB-NEXT: nop 3036; 3037; MIPS64R5-LABEL: ret_4_i16: 3038; MIPS64R5: # %bb.0: 3039; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_4_i16))) 3040; MIPS64R5-NEXT: daddu $1, $1, $25 3041; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_4_i16))) 3042; MIPS64R5-NEXT: ld $1, %got_disp(gv4i16)($1) 3043; MIPS64R5-NEXT: ld $2, 0($1) 3044; MIPS64R5-NEXT: jr $ra 3045; MIPS64R5-NEXT: nop 3046; 3047; MIPS32R5EL-LABEL: ret_4_i16: 3048; MIPS32R5EL: # %bb.0: 3049; MIPS32R5EL-NEXT: addiu $sp, $sp, -32 3050; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 32 3051; MIPS32R5EL-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill 3052; MIPS32R5EL-NEXT: sw $fp, 24($sp) # 4-byte Folded Spill 3053; MIPS32R5EL-NEXT: .cfi_offset 31, -4 3054; MIPS32R5EL-NEXT: .cfi_offset 30, -8 3055; MIPS32R5EL-NEXT: move $fp, $sp 3056; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 3057; MIPS32R5EL-NEXT: addiu $1, $zero, -16 3058; MIPS32R5EL-NEXT: and $sp, $sp, $1 3059; MIPS32R5EL-NEXT: lui $1, %hi(gv4i16) 3060; MIPS32R5EL-NEXT: lw $2, %lo(gv4i16)($1) 3061; MIPS32R5EL-NEXT: sw $2, 0($sp) 3062; MIPS32R5EL-NEXT: addiu $1, $1, %lo(gv4i16) 3063; MIPS32R5EL-NEXT: lw $1, 4($1) 3064; MIPS32R5EL-NEXT: sw $1, 8($sp) 3065; MIPS32R5EL-NEXT: ld.w $w0, 0($sp) 3066; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] 3067; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] 3068; MIPS32R5EL-NEXT: move $sp, $fp 3069; MIPS32R5EL-NEXT: lw $fp, 24($sp) # 4-byte Folded Reload 3070; MIPS32R5EL-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload 3071; MIPS32R5EL-NEXT: addiu $sp, $sp, 32 3072; MIPS32R5EL-NEXT: jr $ra 3073; MIPS32R5EL-NEXT: nop 3074 %1 = load <4 x i16>, <4 x i16> * @gv4i16 3075 ret <4 x i16> %1 3076} 3077 3078define <8 x i16> @ret_8_i16() { 3079; MIPS32-LABEL: ret_8_i16: 3080; MIPS32: # %bb.0: 3081; MIPS32-NEXT: lui $1, %hi(gv8i16) 3082; MIPS32-NEXT: lw $2, %lo(gv8i16)($1) 3083; MIPS32-NEXT: addiu $1, $1, %lo(gv8i16) 3084; MIPS32-NEXT: lw $3, 4($1) 3085; MIPS32-NEXT: lw $4, 8($1) 3086; MIPS32-NEXT: lw $5, 12($1) 3087; MIPS32-NEXT: jr $ra 3088; MIPS32-NEXT: nop 3089; 3090; MIPS64-LABEL: ret_8_i16: 3091; MIPS64: # %bb.0: 3092; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_8_i16))) 3093; MIPS64-NEXT: daddu $1, $1, $25 3094; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_8_i16))) 3095; MIPS64-NEXT: ld $1, %got_disp(gv8i16)($1) 3096; MIPS64-NEXT: ld $2, 0($1) 3097; MIPS64-NEXT: ld $3, 8($1) 3098; MIPS64-NEXT: jr $ra 3099; MIPS64-NEXT: nop 3100; 3101; MIPS32R5-LABEL: ret_8_i16: 3102; MIPS32R5: # %bb.0: 3103; MIPS32R5-NEXT: lui $1, %hi(gv8i16) 3104; MIPS32R5-NEXT: addiu $1, $1, %lo(gv8i16) 3105; MIPS32R5-NEXT: ld.w $w0, 0($1) 3106; MIPS32R5-NEXT: copy_s.w $2, $w0[0] 3107; MIPS32R5-NEXT: copy_s.w $3, $w0[1] 3108; MIPS32R5-NEXT: copy_s.w $4, $w0[2] 3109; MIPS32R5-NEXT: copy_s.w $5, $w0[3] 3110; MIPS32R5-NEXT: jr $ra 3111; MIPS32R5-NEXT: nop 3112; 3113; MIPS64R5-LABEL: ret_8_i16: 3114; MIPS64R5: # %bb.0: 3115; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_8_i16))) 3116; MIPS64R5-NEXT: daddu $1, $1, $25 3117; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_8_i16))) 3118; MIPS64R5-NEXT: ld $1, %got_disp(gv8i16)($1) 3119; MIPS64R5-NEXT: ld.d $w0, 0($1) 3120; MIPS64R5-NEXT: copy_s.d $2, $w0[0] 3121; MIPS64R5-NEXT: copy_s.d $3, $w0[1] 3122; MIPS64R5-NEXT: jr $ra 3123; MIPS64R5-NEXT: nop 3124 %1 = load <8 x i16>, <8 x i16> * @gv8i16 3125 ret <8 x i16> %1 3126} 3127 3128define <2 x i32> @ret_2_i32() { 3129; MIPS32-LABEL: ret_2_i32: 3130; MIPS32: # %bb.0: 3131; MIPS32-NEXT: lui $1, %hi(gv2i32) 3132; MIPS32-NEXT: lw $2, %lo(gv2i32)($1) 3133; MIPS32-NEXT: addiu $1, $1, %lo(gv2i32) 3134; MIPS32-NEXT: lw $3, 4($1) 3135; MIPS32-NEXT: jr $ra 3136; MIPS32-NEXT: nop 3137; 3138; MIPS64-LABEL: ret_2_i32: 3139; MIPS64: # %bb.0: 3140; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i32))) 3141; MIPS64-NEXT: daddu $1, $1, $25 3142; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i32))) 3143; MIPS64-NEXT: ld $1, %got_disp(gv2i32)($1) 3144; MIPS64-NEXT: ld $2, 0($1) 3145; MIPS64-NEXT: jr $ra 3146; MIPS64-NEXT: nop 3147; 3148; MIPS32R5EB-LABEL: ret_2_i32: 3149; MIPS32R5EB: # %bb.0: 3150; MIPS32R5EB-NEXT: addiu $sp, $sp, -32 3151; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 32 3152; MIPS32R5EB-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill 3153; MIPS32R5EB-NEXT: sw $fp, 24($sp) # 4-byte Folded Spill 3154; MIPS32R5EB-NEXT: .cfi_offset 31, -4 3155; MIPS32R5EB-NEXT: .cfi_offset 30, -8 3156; MIPS32R5EB-NEXT: move $fp, $sp 3157; MIPS32R5EB-NEXT: .cfi_def_cfa_register 30 3158; MIPS32R5EB-NEXT: addiu $1, $zero, -16 3159; MIPS32R5EB-NEXT: and $sp, $sp, $1 3160; MIPS32R5EB-NEXT: lui $1, %hi(gv2i32) 3161; MIPS32R5EB-NEXT: lw $2, %lo(gv2i32)($1) 3162; MIPS32R5EB-NEXT: sw $2, 4($sp) 3163; MIPS32R5EB-NEXT: addiu $1, $1, %lo(gv2i32) 3164; MIPS32R5EB-NEXT: lw $1, 4($1) 3165; MIPS32R5EB-NEXT: sw $1, 12($sp) 3166; MIPS32R5EB-NEXT: ld.w $w0, 0($sp) 3167; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] 3168; MIPS32R5EB-NEXT: copy_s.w $3, $w0[3] 3169; MIPS32R5EB-NEXT: move $sp, $fp 3170; MIPS32R5EB-NEXT: lw $fp, 24($sp) # 4-byte Folded Reload 3171; MIPS32R5EB-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload 3172; MIPS32R5EB-NEXT: addiu $sp, $sp, 32 3173; MIPS32R5EB-NEXT: jr $ra 3174; MIPS32R5EB-NEXT: nop 3175; 3176; MIPS64R5-LABEL: ret_2_i32: 3177; MIPS64R5: # %bb.0: 3178; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i32))) 3179; MIPS64R5-NEXT: daddu $1, $1, $25 3180; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i32))) 3181; MIPS64R5-NEXT: ld $1, %got_disp(gv2i32)($1) 3182; MIPS64R5-NEXT: ld $2, 0($1) 3183; MIPS64R5-NEXT: jr $ra 3184; MIPS64R5-NEXT: nop 3185; 3186; MIPS32R5EL-LABEL: ret_2_i32: 3187; MIPS32R5EL: # %bb.0: 3188; MIPS32R5EL-NEXT: addiu $sp, $sp, -32 3189; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 32 3190; MIPS32R5EL-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill 3191; MIPS32R5EL-NEXT: sw $fp, 24($sp) # 4-byte Folded Spill 3192; MIPS32R5EL-NEXT: .cfi_offset 31, -4 3193; MIPS32R5EL-NEXT: .cfi_offset 30, -8 3194; MIPS32R5EL-NEXT: move $fp, $sp 3195; MIPS32R5EL-NEXT: .cfi_def_cfa_register 30 3196; MIPS32R5EL-NEXT: addiu $1, $zero, -16 3197; MIPS32R5EL-NEXT: and $sp, $sp, $1 3198; MIPS32R5EL-NEXT: lui $1, %hi(gv2i32) 3199; MIPS32R5EL-NEXT: lw $2, %lo(gv2i32)($1) 3200; MIPS32R5EL-NEXT: sw $2, 0($sp) 3201; MIPS32R5EL-NEXT: addiu $1, $1, %lo(gv2i32) 3202; MIPS32R5EL-NEXT: lw $1, 4($1) 3203; MIPS32R5EL-NEXT: sw $1, 8($sp) 3204; MIPS32R5EL-NEXT: ld.w $w0, 0($sp) 3205; MIPS32R5EL-NEXT: copy_s.w $2, $w0[0] 3206; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] 3207; MIPS32R5EL-NEXT: move $sp, $fp 3208; MIPS32R5EL-NEXT: lw $fp, 24($sp) # 4-byte Folded Reload 3209; MIPS32R5EL-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload 3210; MIPS32R5EL-NEXT: addiu $sp, $sp, 32 3211; MIPS32R5EL-NEXT: jr $ra 3212; MIPS32R5EL-NEXT: nop 3213 %1 = load <2 x i32>, <2 x i32> * @gv2i32 3214 ret <2 x i32> %1 3215} 3216 3217define <4 x i32> @ret_4_i32() { 3218; MIPS32-LABEL: ret_4_i32: 3219; MIPS32: # %bb.0: 3220; MIPS32-NEXT: lui $1, %hi(gv4i32) 3221; MIPS32-NEXT: lw $2, %lo(gv4i32)($1) 3222; MIPS32-NEXT: addiu $1, $1, %lo(gv4i32) 3223; MIPS32-NEXT: lw $3, 4($1) 3224; MIPS32-NEXT: lw $4, 8($1) 3225; MIPS32-NEXT: lw $5, 12($1) 3226; MIPS32-NEXT: jr $ra 3227; MIPS32-NEXT: nop 3228; 3229; MIPS64-LABEL: ret_4_i32: 3230; MIPS64: # %bb.0: 3231; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_4_i32))) 3232; MIPS64-NEXT: daddu $1, $1, $25 3233; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_4_i32))) 3234; MIPS64-NEXT: ld $1, %got_disp(gv4i32)($1) 3235; MIPS64-NEXT: ld $2, 0($1) 3236; MIPS64-NEXT: ld $3, 8($1) 3237; MIPS64-NEXT: jr $ra 3238; MIPS64-NEXT: nop 3239; 3240; MIPS32R5-LABEL: ret_4_i32: 3241; MIPS32R5: # %bb.0: 3242; MIPS32R5-NEXT: lui $1, %hi(gv4i32) 3243; MIPS32R5-NEXT: addiu $1, $1, %lo(gv4i32) 3244; MIPS32R5-NEXT: ld.w $w0, 0($1) 3245; MIPS32R5-NEXT: copy_s.w $2, $w0[0] 3246; MIPS32R5-NEXT: copy_s.w $3, $w0[1] 3247; MIPS32R5-NEXT: copy_s.w $4, $w0[2] 3248; MIPS32R5-NEXT: copy_s.w $5, $w0[3] 3249; MIPS32R5-NEXT: jr $ra 3250; MIPS32R5-NEXT: nop 3251; 3252; MIPS64R5-LABEL: ret_4_i32: 3253; MIPS64R5: # %bb.0: 3254; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_4_i32))) 3255; MIPS64R5-NEXT: daddu $1, $1, $25 3256; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_4_i32))) 3257; MIPS64R5-NEXT: ld $1, %got_disp(gv4i32)($1) 3258; MIPS64R5-NEXT: ld.d $w0, 0($1) 3259; MIPS64R5-NEXT: copy_s.d $2, $w0[0] 3260; MIPS64R5-NEXT: copy_s.d $3, $w0[1] 3261; MIPS64R5-NEXT: jr $ra 3262; MIPS64R5-NEXT: nop 3263 %1 = load <4 x i32>, <4 x i32> * @gv4i32 3264 ret <4 x i32> %1 3265} 3266 3267define <2 x i64> @ret_2_i64() { 3268; MIPS32-LABEL: ret_2_i64: 3269; MIPS32: # %bb.0: 3270; MIPS32-NEXT: lui $1, %hi(gv2i64) 3271; MIPS32-NEXT: lw $2, %lo(gv2i64)($1) 3272; MIPS32-NEXT: addiu $1, $1, %lo(gv2i64) 3273; MIPS32-NEXT: lw $3, 4($1) 3274; MIPS32-NEXT: lw $4, 8($1) 3275; MIPS32-NEXT: lw $5, 12($1) 3276; MIPS32-NEXT: jr $ra 3277; MIPS32-NEXT: nop 3278; 3279; MIPS64-LABEL: ret_2_i64: 3280; MIPS64: # %bb.0: 3281; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i64))) 3282; MIPS64-NEXT: daddu $1, $1, $25 3283; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i64))) 3284; MIPS64-NEXT: ld $1, %got_disp(gv2i64)($1) 3285; MIPS64-NEXT: ld $2, 0($1) 3286; MIPS64-NEXT: ld $3, 8($1) 3287; MIPS64-NEXT: jr $ra 3288; MIPS64-NEXT: nop 3289; 3290; MIPS32R5-LABEL: ret_2_i64: 3291; MIPS32R5: # %bb.0: 3292; MIPS32R5-NEXT: lui $1, %hi(gv2i64) 3293; MIPS32R5-NEXT: addiu $1, $1, %lo(gv2i64) 3294; MIPS32R5-NEXT: ld.w $w0, 0($1) 3295; MIPS32R5-NEXT: copy_s.w $2, $w0[0] 3296; MIPS32R5-NEXT: copy_s.w $3, $w0[1] 3297; MIPS32R5-NEXT: copy_s.w $4, $w0[2] 3298; MIPS32R5-NEXT: copy_s.w $5, $w0[3] 3299; MIPS32R5-NEXT: jr $ra 3300; MIPS32R5-NEXT: nop 3301; 3302; MIPS64R5-LABEL: ret_2_i64: 3303; MIPS64R5: # %bb.0: 3304; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_2_i64))) 3305; MIPS64R5-NEXT: daddu $1, $1, $25 3306; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_2_i64))) 3307; MIPS64R5-NEXT: ld $1, %got_disp(gv2i64)($1) 3308; MIPS64R5-NEXT: ld.d $w0, 0($1) 3309; MIPS64R5-NEXT: copy_s.d $2, $w0[0] 3310; MIPS64R5-NEXT: copy_s.d $3, $w0[1] 3311; MIPS64R5-NEXT: jr $ra 3312; MIPS64R5-NEXT: nop 3313 %1 = load <2 x i64>, <2 x i64> * @gv2i64 3314 ret <2 x i64> %1 3315} 3316 3317@gv2f32 = global <2 x float> <float 0.0, float 0.0> 3318@gv4f32 = global <4 x float> <float 0.0, float 0.0, float 0.0, float 0.0> 3319 3320define <2 x float> @ret_float_2() { 3321; MIPS32-LABEL: ret_float_2: 3322; MIPS32: # %bb.0: # %entry 3323; MIPS32-NEXT: lui $1, %hi(gv2f32) 3324; MIPS32-NEXT: addiu $2, $1, %lo(gv2f32) 3325; MIPS32-NEXT: lwc1 $f0, 4($2) 3326; MIPS32-NEXT: swc1 $f0, 4($4) 3327; MIPS32-NEXT: lwc1 $f0, %lo(gv2f32)($1) 3328; MIPS32-NEXT: swc1 $f0, 0($4) 3329; MIPS32-NEXT: jr $ra 3330; MIPS32-NEXT: nop 3331; 3332; MIPS64-LABEL: ret_float_2: 3333; MIPS64: # %bb.0: # %entry 3334; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_float_2))) 3335; MIPS64-NEXT: daddu $1, $1, $25 3336; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_float_2))) 3337; MIPS64-NEXT: ld $1, %got_disp(gv2f32)($1) 3338; MIPS64-NEXT: ld $2, 0($1) 3339; MIPS64-NEXT: jr $ra 3340; MIPS64-NEXT: nop 3341; 3342; MIPS32R5-LABEL: ret_float_2: 3343; MIPS32R5: # %bb.0: # %entry 3344; MIPS32R5-NEXT: lui $1, %hi(gv2f32) 3345; MIPS32R5-NEXT: addiu $2, $1, %lo(gv2f32) 3346; MIPS32R5-NEXT: lwc1 $f0, 4($2) 3347; MIPS32R5-NEXT: swc1 $f0, 4($4) 3348; MIPS32R5-NEXT: lwc1 $f0, %lo(gv2f32)($1) 3349; MIPS32R5-NEXT: swc1 $f0, 0($4) 3350; MIPS32R5-NEXT: jr $ra 3351; MIPS32R5-NEXT: nop 3352; 3353; MIPS64R5-LABEL: ret_float_2: 3354; MIPS64R5: # %bb.0: # %entry 3355; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_float_2))) 3356; MIPS64R5-NEXT: daddu $1, $1, $25 3357; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_float_2))) 3358; MIPS64R5-NEXT: ld $1, %got_disp(gv2f32)($1) 3359; MIPS64R5-NEXT: ld $2, 0($1) 3360; MIPS64R5-NEXT: jr $ra 3361; MIPS64R5-NEXT: nop 3362entry: 3363 %0 = load <2 x float>, <2 x float> * @gv2f32 3364 ret <2 x float> %0 3365} 3366 3367define <4 x float> @ret_float_4() { 3368; MIPS32-LABEL: ret_float_4: 3369; MIPS32: # %bb.0: # %entry 3370; MIPS32-NEXT: lui $1, %hi(gv4f32) 3371; MIPS32-NEXT: addiu $2, $1, %lo(gv4f32) 3372; MIPS32-NEXT: lwc1 $f0, 12($2) 3373; MIPS32-NEXT: swc1 $f0, 12($4) 3374; MIPS32-NEXT: lwc1 $f0, 8($2) 3375; MIPS32-NEXT: swc1 $f0, 8($4) 3376; MIPS32-NEXT: lwc1 $f0, 4($2) 3377; MIPS32-NEXT: swc1 $f0, 4($4) 3378; MIPS32-NEXT: lwc1 $f0, %lo(gv4f32)($1) 3379; MIPS32-NEXT: swc1 $f0, 0($4) 3380; MIPS32-NEXT: jr $ra 3381; MIPS32-NEXT: nop 3382; 3383; MIPS64-LABEL: ret_float_4: 3384; MIPS64: # %bb.0: # %entry 3385; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_float_4))) 3386; MIPS64-NEXT: daddu $1, $1, $25 3387; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_float_4))) 3388; MIPS64-NEXT: ld $1, %got_disp(gv4f32)($1) 3389; MIPS64-NEXT: ld $2, 0($1) 3390; MIPS64-NEXT: ld $3, 8($1) 3391; MIPS64-NEXT: jr $ra 3392; MIPS64-NEXT: nop 3393; 3394; MIPS32R5-LABEL: ret_float_4: 3395; MIPS32R5: # %bb.0: # %entry 3396; MIPS32R5-NEXT: lui $1, %hi(gv4f32) 3397; MIPS32R5-NEXT: addiu $1, $1, %lo(gv4f32) 3398; MIPS32R5-NEXT: ld.w $w0, 0($1) 3399; MIPS32R5-NEXT: st.w $w0, 0($4) 3400; MIPS32R5-NEXT: jr $ra 3401; MIPS32R5-NEXT: nop 3402; 3403; MIPS64R5-LABEL: ret_float_4: 3404; MIPS64R5: # %bb.0: # %entry 3405; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_float_4))) 3406; MIPS64R5-NEXT: daddu $1, $1, $25 3407; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_float_4))) 3408; MIPS64R5-NEXT: ld $1, %got_disp(gv4f32)($1) 3409; MIPS64R5-NEXT: ld.d $w0, 0($1) 3410; MIPS64R5-NEXT: copy_s.d $2, $w0[0] 3411; MIPS64R5-NEXT: copy_s.d $3, $w0[1] 3412; MIPS64R5-NEXT: jr $ra 3413; MIPS64R5-NEXT: nop 3414entry: 3415 %0 = load <4 x float>, <4 x float> * @gv4f32 3416 ret <4 x float> %0 3417} 3418 3419@gv2f64 = global <2 x double> <double 0.0, double 0.0> 3420 3421define <2 x double> @ret_double_2() { 3422; MIPS32-LABEL: ret_double_2: 3423; MIPS32: # %bb.0: # %entry 3424; MIPS32-NEXT: lui $1, %hi(gv2f64) 3425; MIPS32-NEXT: addiu $2, $1, %lo(gv2f64) 3426; MIPS32-NEXT: ldc1 $f0, 8($2) 3427; MIPS32-NEXT: sdc1 $f0, 8($4) 3428; MIPS32-NEXT: ldc1 $f0, %lo(gv2f64)($1) 3429; MIPS32-NEXT: sdc1 $f0, 0($4) 3430; MIPS32-NEXT: jr $ra 3431; MIPS32-NEXT: nop 3432; 3433; MIPS64-LABEL: ret_double_2: 3434; MIPS64: # %bb.0: # %entry 3435; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(ret_double_2))) 3436; MIPS64-NEXT: daddu $1, $1, $25 3437; MIPS64-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_double_2))) 3438; MIPS64-NEXT: ld $1, %got_disp(gv2f64)($1) 3439; MIPS64-NEXT: ld $2, 0($1) 3440; MIPS64-NEXT: ld $3, 8($1) 3441; MIPS64-NEXT: jr $ra 3442; MIPS64-NEXT: nop 3443; 3444; MIPS32R5-LABEL: ret_double_2: 3445; MIPS32R5: # %bb.0: # %entry 3446; MIPS32R5-NEXT: lui $1, %hi(gv2f64) 3447; MIPS32R5-NEXT: addiu $1, $1, %lo(gv2f64) 3448; MIPS32R5-NEXT: ld.d $w0, 0($1) 3449; MIPS32R5-NEXT: st.d $w0, 0($4) 3450; MIPS32R5-NEXT: jr $ra 3451; MIPS32R5-NEXT: nop 3452; 3453; MIPS64R5-LABEL: ret_double_2: 3454; MIPS64R5: # %bb.0: # %entry 3455; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(ret_double_2))) 3456; MIPS64R5-NEXT: daddu $1, $1, $25 3457; MIPS64R5-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(ret_double_2))) 3458; MIPS64R5-NEXT: ld $1, %got_disp(gv2f64)($1) 3459; MIPS64R5-NEXT: ld.d $w0, 0($1) 3460; MIPS64R5-NEXT: copy_s.d $2, $w0[0] 3461; MIPS64R5-NEXT: copy_s.d $3, $w0[1] 3462; MIPS64R5-NEXT: jr $ra 3463; MIPS64R5-NEXT: nop 3464entry: 3465 %0 = load <2 x double>, <2 x double> * @gv2f64 3466 ret <2 x double> %0 3467} 3468 3469; Test argument lowering and call result lowering. 3470 3471define void @call_i8_2() { 3472; MIPS32EB-LABEL: call_i8_2: 3473; MIPS32EB: # %bb.0: # %entry 3474; MIPS32EB-NEXT: addiu $sp, $sp, -24 3475; MIPS32EB-NEXT: .cfi_def_cfa_offset 24 3476; MIPS32EB-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 3477; MIPS32EB-NEXT: .cfi_offset 31, -4 3478; MIPS32EB-NEXT: addiu $4, $zero, 1543 3479; MIPS32EB-NEXT: addiu $5, $zero, 3080 3480; MIPS32EB-NEXT: jal i8_2 3481; MIPS32EB-NEXT: nop 3482; MIPS32EB-NEXT: srl $1, $2, 16 3483; MIPS32EB-NEXT: lui $3, %hi(gv2i8) 3484; MIPS32EB-NEXT: addiu $4, $3, %lo(gv2i8) 3485; MIPS32EB-NEXT: sb $1, 1($4) 3486; MIPS32EB-NEXT: srl $1, $2, 24 3487; MIPS32EB-NEXT: sb $1, %lo(gv2i8)($3) 3488; MIPS32EB-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 3489; MIPS32EB-NEXT: addiu $sp, $sp, 24 3490; MIPS32EB-NEXT: jr $ra 3491; MIPS32EB-NEXT: nop 3492; 3493; MIPS64EB-LABEL: call_i8_2: 3494; MIPS64EB: # %bb.0: # %entry 3495; MIPS64EB-NEXT: daddiu $sp, $sp, -16 3496; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 3497; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 3498; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 3499; MIPS64EB-NEXT: .cfi_offset 31, -8 3500; MIPS64EB-NEXT: .cfi_offset 28, -16 3501; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_2))) 3502; MIPS64EB-NEXT: daddu $1, $1, $25 3503; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_2))) 3504; MIPS64EB-NEXT: ld $25, %call16(i8_2)($gp) 3505; MIPS64EB-NEXT: daddiu $4, $zero, 1543 3506; MIPS64EB-NEXT: daddiu $5, $zero, 3080 3507; MIPS64EB-NEXT: jalr $25 3508; MIPS64EB-NEXT: nop 3509; MIPS64EB-NEXT: dsrl $1, $2, 48 3510; MIPS64EB-NEXT: ld $3, %got_disp(gv2i8)($gp) 3511; MIPS64EB-NEXT: sb $1, 1($3) 3512; MIPS64EB-NEXT: dsrl $1, $2, 56 3513; MIPS64EB-NEXT: sb $1, 0($3) 3514; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 3515; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 3516; MIPS64EB-NEXT: daddiu $sp, $sp, 16 3517; MIPS64EB-NEXT: jr $ra 3518; MIPS64EB-NEXT: nop 3519; 3520; MIPS32R5EB-LABEL: call_i8_2: 3521; MIPS32R5EB: # %bb.0: # %entry 3522; MIPS32R5EB-NEXT: addiu $sp, $sp, -32 3523; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 32 3524; MIPS32R5EB-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill 3525; MIPS32R5EB-NEXT: .cfi_offset 31, -4 3526; MIPS32R5EB-NEXT: addiu $4, $zero, 1543 3527; MIPS32R5EB-NEXT: addiu $5, $zero, 3080 3528; MIPS32R5EB-NEXT: jal i8_2 3529; MIPS32R5EB-NEXT: nop 3530; MIPS32R5EB-NEXT: sw $2, 16($sp) 3531; MIPS32R5EB-NEXT: lui $1, %hi(gv2i8) 3532; MIPS32R5EB-NEXT: lhu $2, 16($sp) 3533; MIPS32R5EB-NEXT: sh $2, %lo(gv2i8)($1) 3534; MIPS32R5EB-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload 3535; MIPS32R5EB-NEXT: addiu $sp, $sp, 32 3536; MIPS32R5EB-NEXT: jr $ra 3537; MIPS32R5EB-NEXT: nop 3538; 3539; MIPS64R5EB-LABEL: call_i8_2: 3540; MIPS64R5EB: # %bb.0: # %entry 3541; MIPS64R5EB-NEXT: daddiu $sp, $sp, -64 3542; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 64 3543; MIPS64R5EB-NEXT: sd $ra, 56($sp) # 8-byte Folded Spill 3544; MIPS64R5EB-NEXT: sd $gp, 48($sp) # 8-byte Folded Spill 3545; MIPS64R5EB-NEXT: .cfi_offset 31, -8 3546; MIPS64R5EB-NEXT: .cfi_offset 28, -16 3547; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_2))) 3548; MIPS64R5EB-NEXT: daddu $1, $1, $25 3549; MIPS64R5EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_2))) 3550; MIPS64R5EB-NEXT: addiu $1, $zero, 1543 3551; MIPS64R5EB-NEXT: sh $1, 40($sp) 3552; MIPS64R5EB-NEXT: addiu $1, $zero, 3080 3553; MIPS64R5EB-NEXT: sh $1, 44($sp) 3554; MIPS64R5EB-NEXT: ld $25, %call16(i8_2)($gp) 3555; MIPS64R5EB-NEXT: lh $4, 40($sp) 3556; MIPS64R5EB-NEXT: lh $5, 44($sp) 3557; MIPS64R5EB-NEXT: jalr $25 3558; MIPS64R5EB-NEXT: nop 3559; MIPS64R5EB-NEXT: sd $2, 32($sp) 3560; MIPS64R5EB-NEXT: lbu $1, 33($sp) 3561; MIPS64R5EB-NEXT: sh $1, 2($sp) 3562; MIPS64R5EB-NEXT: lbu $1, 32($sp) 3563; MIPS64R5EB-NEXT: sh $1, 0($sp) 3564; MIPS64R5EB-NEXT: ld.h $w0, 0($sp) 3565; MIPS64R5EB-NEXT: copy_s.h $1, $w0[0] 3566; MIPS64R5EB-NEXT: copy_s.h $2, $w0[1] 3567; MIPS64R5EB-NEXT: sw $2, 28($sp) 3568; MIPS64R5EB-NEXT: sw $1, 20($sp) 3569; MIPS64R5EB-NEXT: ld.d $w0, 16($sp) 3570; MIPS64R5EB-NEXT: copy_s.d $1, $w0[0] 3571; MIPS64R5EB-NEXT: copy_s.d $2, $w0[1] 3572; MIPS64R5EB-NEXT: ld $3, %got_disp(gv2i8)($gp) 3573; MIPS64R5EB-NEXT: sb $2, 1($3) 3574; MIPS64R5EB-NEXT: sb $1, 0($3) 3575; MIPS64R5EB-NEXT: ld $gp, 48($sp) # 8-byte Folded Reload 3576; MIPS64R5EB-NEXT: ld $ra, 56($sp) # 8-byte Folded Reload 3577; MIPS64R5EB-NEXT: daddiu $sp, $sp, 64 3578; MIPS64R5EB-NEXT: jr $ra 3579; MIPS64R5EB-NEXT: nop 3580; 3581; MIPS32EL-LABEL: call_i8_2: 3582; MIPS32EL: # %bb.0: # %entry 3583; MIPS32EL-NEXT: addiu $sp, $sp, -24 3584; MIPS32EL-NEXT: .cfi_def_cfa_offset 24 3585; MIPS32EL-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 3586; MIPS32EL-NEXT: .cfi_offset 31, -4 3587; MIPS32EL-NEXT: addiu $4, $zero, 1798 3588; MIPS32EL-NEXT: addiu $5, $zero, 2060 3589; MIPS32EL-NEXT: jal i8_2 3590; MIPS32EL-NEXT: nop 3591; MIPS32EL-NEXT: lui $1, %hi(gv2i8) 3592; MIPS32EL-NEXT: sb $2, %lo(gv2i8)($1) 3593; MIPS32EL-NEXT: srl $2, $2, 8 3594; MIPS32EL-NEXT: addiu $1, $1, %lo(gv2i8) 3595; MIPS32EL-NEXT: sb $2, 1($1) 3596; MIPS32EL-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 3597; MIPS32EL-NEXT: addiu $sp, $sp, 24 3598; MIPS32EL-NEXT: jr $ra 3599; MIPS32EL-NEXT: nop 3600; 3601; MIPS64EL-LABEL: call_i8_2: 3602; MIPS64EL: # %bb.0: # %entry 3603; MIPS64EL-NEXT: daddiu $sp, $sp, -16 3604; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 3605; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 3606; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 3607; MIPS64EL-NEXT: .cfi_offset 31, -8 3608; MIPS64EL-NEXT: .cfi_offset 28, -16 3609; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_2))) 3610; MIPS64EL-NEXT: daddu $1, $1, $25 3611; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_2))) 3612; MIPS64EL-NEXT: ld $25, %call16(i8_2)($gp) 3613; MIPS64EL-NEXT: daddiu $4, $zero, 1798 3614; MIPS64EL-NEXT: daddiu $5, $zero, 2060 3615; MIPS64EL-NEXT: jalr $25 3616; MIPS64EL-NEXT: nop 3617; MIPS64EL-NEXT: sll $1, $2, 0 3618; MIPS64EL-NEXT: ld $2, %got_disp(gv2i8)($gp) 3619; MIPS64EL-NEXT: sb $1, 0($2) 3620; MIPS64EL-NEXT: srl $1, $1, 8 3621; MIPS64EL-NEXT: sb $1, 1($2) 3622; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 3623; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 3624; MIPS64EL-NEXT: daddiu $sp, $sp, 16 3625; MIPS64EL-NEXT: jr $ra 3626; MIPS64EL-NEXT: nop 3627; 3628; MIPS32R5EL-LABEL: call_i8_2: 3629; MIPS32R5EL: # %bb.0: # %entry 3630; MIPS32R5EL-NEXT: addiu $sp, $sp, -32 3631; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 32 3632; MIPS32R5EL-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill 3633; MIPS32R5EL-NEXT: .cfi_offset 31, -4 3634; MIPS32R5EL-NEXT: addiu $4, $zero, 1798 3635; MIPS32R5EL-NEXT: addiu $5, $zero, 2060 3636; MIPS32R5EL-NEXT: jal i8_2 3637; MIPS32R5EL-NEXT: nop 3638; MIPS32R5EL-NEXT: sw $2, 16($sp) 3639; MIPS32R5EL-NEXT: lui $1, %hi(gv2i8) 3640; MIPS32R5EL-NEXT: lhu $2, 16($sp) 3641; MIPS32R5EL-NEXT: sh $2, %lo(gv2i8)($1) 3642; MIPS32R5EL-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload 3643; MIPS32R5EL-NEXT: addiu $sp, $sp, 32 3644; MIPS32R5EL-NEXT: jr $ra 3645; MIPS32R5EL-NEXT: nop 3646; 3647; MIPS64R5EL-LABEL: call_i8_2: 3648; MIPS64R5EL: # %bb.0: # %entry 3649; MIPS64R5EL-NEXT: daddiu $sp, $sp, -64 3650; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 64 3651; MIPS64R5EL-NEXT: sd $ra, 56($sp) # 8-byte Folded Spill 3652; MIPS64R5EL-NEXT: sd $gp, 48($sp) # 8-byte Folded Spill 3653; MIPS64R5EL-NEXT: .cfi_offset 31, -8 3654; MIPS64R5EL-NEXT: .cfi_offset 28, -16 3655; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_2))) 3656; MIPS64R5EL-NEXT: daddu $1, $1, $25 3657; MIPS64R5EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_2))) 3658; MIPS64R5EL-NEXT: addiu $1, $zero, 1798 3659; MIPS64R5EL-NEXT: sh $1, 40($sp) 3660; MIPS64R5EL-NEXT: addiu $1, $zero, 2060 3661; MIPS64R5EL-NEXT: sh $1, 44($sp) 3662; MIPS64R5EL-NEXT: ld $25, %call16(i8_2)($gp) 3663; MIPS64R5EL-NEXT: lh $4, 40($sp) 3664; MIPS64R5EL-NEXT: lh $5, 44($sp) 3665; MIPS64R5EL-NEXT: jalr $25 3666; MIPS64R5EL-NEXT: nop 3667; MIPS64R5EL-NEXT: sd $2, 32($sp) 3668; MIPS64R5EL-NEXT: lbu $1, 33($sp) 3669; MIPS64R5EL-NEXT: sh $1, 2($sp) 3670; MIPS64R5EL-NEXT: lbu $1, 32($sp) 3671; MIPS64R5EL-NEXT: sh $1, 0($sp) 3672; MIPS64R5EL-NEXT: ld.h $w0, 0($sp) 3673; MIPS64R5EL-NEXT: copy_s.h $1, $w0[0] 3674; MIPS64R5EL-NEXT: copy_s.h $2, $w0[1] 3675; MIPS64R5EL-NEXT: sw $2, 24($sp) 3676; MIPS64R5EL-NEXT: sw $1, 16($sp) 3677; MIPS64R5EL-NEXT: ld.d $w0, 16($sp) 3678; MIPS64R5EL-NEXT: copy_s.d $1, $w0[0] 3679; MIPS64R5EL-NEXT: copy_s.d $2, $w0[1] 3680; MIPS64R5EL-NEXT: ld $3, %got_disp(gv2i8)($gp) 3681; MIPS64R5EL-NEXT: sb $2, 1($3) 3682; MIPS64R5EL-NEXT: sb $1, 0($3) 3683; MIPS64R5EL-NEXT: ld $gp, 48($sp) # 8-byte Folded Reload 3684; MIPS64R5EL-NEXT: ld $ra, 56($sp) # 8-byte Folded Reload 3685; MIPS64R5EL-NEXT: daddiu $sp, $sp, 64 3686; MIPS64R5EL-NEXT: jr $ra 3687; MIPS64R5EL-NEXT: nop 3688entry: 3689 %0 = call <2 x i8> @i8_2(<2 x i8> <i8 6, i8 7>, <2 x i8> <i8 12, i8 8>) 3690 store <2 x i8> %0, <2 x i8> * @gv2i8 3691 ret void 3692} 3693 3694define void @call_i8_4() { 3695; MIPS32EB-LABEL: call_i8_4: 3696; MIPS32EB: # %bb.0: # %entry 3697; MIPS32EB-NEXT: addiu $sp, $sp, -24 3698; MIPS32EB-NEXT: .cfi_def_cfa_offset 24 3699; MIPS32EB-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 3700; MIPS32EB-NEXT: .cfi_offset 31, -4 3701; MIPS32EB-NEXT: lui $1, 1543 3702; MIPS32EB-NEXT: ori $4, $1, 2314 3703; MIPS32EB-NEXT: lui $1, 3080 3704; MIPS32EB-NEXT: ori $5, $1, 2314 3705; MIPS32EB-NEXT: jal i8_4 3706; MIPS32EB-NEXT: nop 3707; MIPS32EB-NEXT: lui $1, %hi(gv4i8) 3708; MIPS32EB-NEXT: sw $2, %lo(gv4i8)($1) 3709; MIPS32EB-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 3710; MIPS32EB-NEXT: addiu $sp, $sp, 24 3711; MIPS32EB-NEXT: jr $ra 3712; MIPS32EB-NEXT: nop 3713; 3714; MIPS64EB-LABEL: call_i8_4: 3715; MIPS64EB: # %bb.0: # %entry 3716; MIPS64EB-NEXT: daddiu $sp, $sp, -16 3717; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 3718; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 3719; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 3720; MIPS64EB-NEXT: .cfi_offset 31, -8 3721; MIPS64EB-NEXT: .cfi_offset 28, -16 3722; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_4))) 3723; MIPS64EB-NEXT: daddu $1, $1, $25 3724; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_4))) 3725; MIPS64EB-NEXT: lui $1, 1543 3726; MIPS64EB-NEXT: ori $4, $1, 2314 3727; MIPS64EB-NEXT: lui $1, 3080 3728; MIPS64EB-NEXT: ori $5, $1, 2314 3729; MIPS64EB-NEXT: ld $25, %call16(i8_4)($gp) 3730; MIPS64EB-NEXT: jalr $25 3731; MIPS64EB-NEXT: nop 3732; MIPS64EB-NEXT: ld $1, %got_disp(gv4i8)($gp) 3733; MIPS64EB-NEXT: sw $2, 0($1) 3734; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 3735; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 3736; MIPS64EB-NEXT: daddiu $sp, $sp, 16 3737; MIPS64EB-NEXT: jr $ra 3738; MIPS64EB-NEXT: nop 3739; 3740; MIPS32R5EB-LABEL: call_i8_4: 3741; MIPS32R5EB: # %bb.0: # %entry 3742; MIPS32R5EB-NEXT: addiu $sp, $sp, -32 3743; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 32 3744; MIPS32R5EB-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill 3745; MIPS32R5EB-NEXT: .cfi_offset 31, -4 3746; MIPS32R5EB-NEXT: lui $1, 1543 3747; MIPS32R5EB-NEXT: ori $4, $1, 2314 3748; MIPS32R5EB-NEXT: lui $1, 3080 3749; MIPS32R5EB-NEXT: ori $5, $1, 2314 3750; MIPS32R5EB-NEXT: jal i8_4 3751; MIPS32R5EB-NEXT: nop 3752; MIPS32R5EB-NEXT: lui $1, %hi(gv4i8) 3753; MIPS32R5EB-NEXT: sw $2, %lo(gv4i8)($1) 3754; MIPS32R5EB-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload 3755; MIPS32R5EB-NEXT: addiu $sp, $sp, 32 3756; MIPS32R5EB-NEXT: jr $ra 3757; MIPS32R5EB-NEXT: nop 3758; 3759; MIPS64R5EB-LABEL: call_i8_4: 3760; MIPS64R5EB: # %bb.0: # %entry 3761; MIPS64R5EB-NEXT: daddiu $sp, $sp, -32 3762; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 32 3763; MIPS64R5EB-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill 3764; MIPS64R5EB-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill 3765; MIPS64R5EB-NEXT: .cfi_offset 31, -8 3766; MIPS64R5EB-NEXT: .cfi_offset 28, -16 3767; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_4))) 3768; MIPS64R5EB-NEXT: daddu $1, $1, $25 3769; MIPS64R5EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_4))) 3770; MIPS64R5EB-NEXT: lui $1, 1543 3771; MIPS64R5EB-NEXT: ori $4, $1, 2314 3772; MIPS64R5EB-NEXT: lui $1, 3080 3773; MIPS64R5EB-NEXT: ori $5, $1, 2314 3774; MIPS64R5EB-NEXT: ld $25, %call16(i8_4)($gp) 3775; MIPS64R5EB-NEXT: jalr $25 3776; MIPS64R5EB-NEXT: nop 3777; MIPS64R5EB-NEXT: ld $1, %got_disp(gv4i8)($gp) 3778; MIPS64R5EB-NEXT: sw $2, 0($1) 3779; MIPS64R5EB-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload 3780; MIPS64R5EB-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload 3781; MIPS64R5EB-NEXT: daddiu $sp, $sp, 32 3782; MIPS64R5EB-NEXT: jr $ra 3783; MIPS64R5EB-NEXT: nop 3784; 3785; MIPS32EL-LABEL: call_i8_4: 3786; MIPS32EL: # %bb.0: # %entry 3787; MIPS32EL-NEXT: addiu $sp, $sp, -24 3788; MIPS32EL-NEXT: .cfi_def_cfa_offset 24 3789; MIPS32EL-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 3790; MIPS32EL-NEXT: .cfi_offset 31, -4 3791; MIPS32EL-NEXT: lui $1, 2569 3792; MIPS32EL-NEXT: ori $4, $1, 1798 3793; MIPS32EL-NEXT: ori $5, $1, 2060 3794; MIPS32EL-NEXT: jal i8_4 3795; MIPS32EL-NEXT: nop 3796; MIPS32EL-NEXT: lui $1, %hi(gv4i8) 3797; MIPS32EL-NEXT: sw $2, %lo(gv4i8)($1) 3798; MIPS32EL-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 3799; MIPS32EL-NEXT: addiu $sp, $sp, 24 3800; MIPS32EL-NEXT: jr $ra 3801; MIPS32EL-NEXT: nop 3802; 3803; MIPS64EL-LABEL: call_i8_4: 3804; MIPS64EL: # %bb.0: # %entry 3805; MIPS64EL-NEXT: daddiu $sp, $sp, -16 3806; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 3807; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 3808; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 3809; MIPS64EL-NEXT: .cfi_offset 31, -8 3810; MIPS64EL-NEXT: .cfi_offset 28, -16 3811; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_4))) 3812; MIPS64EL-NEXT: daddu $1, $1, $25 3813; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_4))) 3814; MIPS64EL-NEXT: lui $1, 2569 3815; MIPS64EL-NEXT: ori $4, $1, 1798 3816; MIPS64EL-NEXT: ori $5, $1, 2060 3817; MIPS64EL-NEXT: ld $25, %call16(i8_4)($gp) 3818; MIPS64EL-NEXT: jalr $25 3819; MIPS64EL-NEXT: nop 3820; MIPS64EL-NEXT: ld $1, %got_disp(gv4i8)($gp) 3821; MIPS64EL-NEXT: sw $2, 0($1) 3822; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 3823; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 3824; MIPS64EL-NEXT: daddiu $sp, $sp, 16 3825; MIPS64EL-NEXT: jr $ra 3826; MIPS64EL-NEXT: nop 3827; 3828; MIPS32R5EL-LABEL: call_i8_4: 3829; MIPS32R5EL: # %bb.0: # %entry 3830; MIPS32R5EL-NEXT: addiu $sp, $sp, -32 3831; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 32 3832; MIPS32R5EL-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill 3833; MIPS32R5EL-NEXT: .cfi_offset 31, -4 3834; MIPS32R5EL-NEXT: lui $1, 2569 3835; MIPS32R5EL-NEXT: ori $4, $1, 1798 3836; MIPS32R5EL-NEXT: ori $5, $1, 2060 3837; MIPS32R5EL-NEXT: jal i8_4 3838; MIPS32R5EL-NEXT: nop 3839; MIPS32R5EL-NEXT: lui $1, %hi(gv4i8) 3840; MIPS32R5EL-NEXT: sw $2, %lo(gv4i8)($1) 3841; MIPS32R5EL-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload 3842; MIPS32R5EL-NEXT: addiu $sp, $sp, 32 3843; MIPS32R5EL-NEXT: jr $ra 3844; MIPS32R5EL-NEXT: nop 3845; 3846; MIPS64R5EL-LABEL: call_i8_4: 3847; MIPS64R5EL: # %bb.0: # %entry 3848; MIPS64R5EL-NEXT: daddiu $sp, $sp, -32 3849; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 32 3850; MIPS64R5EL-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill 3851; MIPS64R5EL-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill 3852; MIPS64R5EL-NEXT: .cfi_offset 31, -8 3853; MIPS64R5EL-NEXT: .cfi_offset 28, -16 3854; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_4))) 3855; MIPS64R5EL-NEXT: daddu $1, $1, $25 3856; MIPS64R5EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_4))) 3857; MIPS64R5EL-NEXT: lui $1, 2569 3858; MIPS64R5EL-NEXT: ori $4, $1, 1798 3859; MIPS64R5EL-NEXT: ori $5, $1, 2060 3860; MIPS64R5EL-NEXT: ld $25, %call16(i8_4)($gp) 3861; MIPS64R5EL-NEXT: jalr $25 3862; MIPS64R5EL-NEXT: nop 3863; MIPS64R5EL-NEXT: ld $1, %got_disp(gv4i8)($gp) 3864; MIPS64R5EL-NEXT: sw $2, 0($1) 3865; MIPS64R5EL-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload 3866; MIPS64R5EL-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload 3867; MIPS64R5EL-NEXT: daddiu $sp, $sp, 32 3868; MIPS64R5EL-NEXT: jr $ra 3869; MIPS64R5EL-NEXT: nop 3870entry: 3871 %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>) 3872 store <4 x i8> %0, <4 x i8> * @gv4i8 3873 ret void 3874} 3875 3876define void @call_i8_8() { 3877; MIPS32EB-LABEL: call_i8_8: 3878; MIPS32EB: # %bb.0: # %entry 3879; MIPS32EB-NEXT: addiu $sp, $sp, -24 3880; MIPS32EB-NEXT: .cfi_def_cfa_offset 24 3881; MIPS32EB-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 3882; MIPS32EB-NEXT: .cfi_offset 31, -4 3883; MIPS32EB-NEXT: lui $1, 3080 3884; MIPS32EB-NEXT: ori $6, $1, 2314 3885; MIPS32EB-NEXT: lui $1, 1543 3886; MIPS32EB-NEXT: ori $4, $1, 2314 3887; MIPS32EB-NEXT: move $5, $4 3888; MIPS32EB-NEXT: move $7, $4 3889; MIPS32EB-NEXT: jal i8_8 3890; MIPS32EB-NEXT: nop 3891; MIPS32EB-NEXT: lui $1, %hi(gv8i8) 3892; MIPS32EB-NEXT: addiu $4, $1, %lo(gv8i8) 3893; MIPS32EB-NEXT: sw $3, 4($4) 3894; MIPS32EB-NEXT: sw $2, %lo(gv8i8)($1) 3895; MIPS32EB-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 3896; MIPS32EB-NEXT: addiu $sp, $sp, 24 3897; MIPS32EB-NEXT: jr $ra 3898; MIPS32EB-NEXT: nop 3899; 3900; MIPS64EB-LABEL: call_i8_8: 3901; MIPS64EB: # %bb.0: # %entry 3902; MIPS64EB-NEXT: daddiu $sp, $sp, -16 3903; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 3904; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 3905; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 3906; MIPS64EB-NEXT: .cfi_offset 31, -8 3907; MIPS64EB-NEXT: .cfi_offset 28, -16 3908; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_8))) 3909; MIPS64EB-NEXT: daddu $1, $1, $25 3910; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_8))) 3911; MIPS64EB-NEXT: lui $1, 772 3912; MIPS64EB-NEXT: daddiu $1, $1, -31611 3913; MIPS64EB-NEXT: dsll $1, $1, 17 3914; MIPS64EB-NEXT: daddiu $1, $1, 1543 3915; MIPS64EB-NEXT: dsll $1, $1, 16 3916; MIPS64EB-NEXT: daddiu $4, $1, 2314 3917; MIPS64EB-NEXT: lui $1, 1540 3918; MIPS64EB-NEXT: daddiu $1, $1, 1157 3919; MIPS64EB-NEXT: dsll $1, $1, 17 3920; MIPS64EB-NEXT: daddiu $1, $1, 1543 3921; MIPS64EB-NEXT: dsll $1, $1, 16 3922; MIPS64EB-NEXT: daddiu $5, $1, 2314 3923; MIPS64EB-NEXT: ld $25, %call16(i8_8)($gp) 3924; MIPS64EB-NEXT: jalr $25 3925; MIPS64EB-NEXT: nop 3926; MIPS64EB-NEXT: ld $1, %got_disp(gv8i8)($gp) 3927; MIPS64EB-NEXT: sd $2, 0($1) 3928; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 3929; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 3930; MIPS64EB-NEXT: daddiu $sp, $sp, 16 3931; MIPS64EB-NEXT: jr $ra 3932; MIPS64EB-NEXT: nop 3933; 3934; MIPS32R5EB-LABEL: call_i8_8: 3935; MIPS32R5EB: # %bb.0: # %entry 3936; MIPS32R5EB-NEXT: addiu $sp, $sp, -24 3937; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 24 3938; MIPS32R5EB-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 3939; MIPS32R5EB-NEXT: .cfi_offset 31, -4 3940; MIPS32R5EB-NEXT: lui $1, 3080 3941; MIPS32R5EB-NEXT: ori $6, $1, 2314 3942; MIPS32R5EB-NEXT: lui $1, 1543 3943; MIPS32R5EB-NEXT: ori $4, $1, 2314 3944; MIPS32R5EB-NEXT: move $5, $4 3945; MIPS32R5EB-NEXT: move $7, $4 3946; MIPS32R5EB-NEXT: jal i8_8 3947; MIPS32R5EB-NEXT: nop 3948; MIPS32R5EB-NEXT: lui $1, %hi(gv8i8) 3949; MIPS32R5EB-NEXT: addiu $4, $1, %lo(gv8i8) 3950; MIPS32R5EB-NEXT: sw $3, 4($4) 3951; MIPS32R5EB-NEXT: sw $2, %lo(gv8i8)($1) 3952; MIPS32R5EB-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 3953; MIPS32R5EB-NEXT: addiu $sp, $sp, 24 3954; MIPS32R5EB-NEXT: jr $ra 3955; MIPS32R5EB-NEXT: nop 3956; 3957; MIPS64R5EB-LABEL: call_i8_8: 3958; MIPS64R5EB: # %bb.0: # %entry 3959; MIPS64R5EB-NEXT: daddiu $sp, $sp, -32 3960; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 32 3961; MIPS64R5EB-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill 3962; MIPS64R5EB-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill 3963; MIPS64R5EB-NEXT: .cfi_offset 31, -8 3964; MIPS64R5EB-NEXT: .cfi_offset 28, -16 3965; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_8))) 3966; MIPS64R5EB-NEXT: daddu $1, $1, $25 3967; MIPS64R5EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_8))) 3968; MIPS64R5EB-NEXT: lui $1, 772 3969; MIPS64R5EB-NEXT: daddiu $1, $1, -31611 3970; MIPS64R5EB-NEXT: dsll $1, $1, 17 3971; MIPS64R5EB-NEXT: daddiu $1, $1, 1543 3972; MIPS64R5EB-NEXT: dsll $1, $1, 16 3973; MIPS64R5EB-NEXT: daddiu $4, $1, 2314 3974; MIPS64R5EB-NEXT: lui $1, 1540 3975; MIPS64R5EB-NEXT: daddiu $1, $1, 1157 3976; MIPS64R5EB-NEXT: dsll $1, $1, 17 3977; MIPS64R5EB-NEXT: daddiu $1, $1, 1543 3978; MIPS64R5EB-NEXT: dsll $1, $1, 16 3979; MIPS64R5EB-NEXT: daddiu $5, $1, 2314 3980; MIPS64R5EB-NEXT: ld $25, %call16(i8_8)($gp) 3981; MIPS64R5EB-NEXT: jalr $25 3982; MIPS64R5EB-NEXT: nop 3983; MIPS64R5EB-NEXT: ld $1, %got_disp(gv8i8)($gp) 3984; MIPS64R5EB-NEXT: sd $2, 0($1) 3985; MIPS64R5EB-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload 3986; MIPS64R5EB-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload 3987; MIPS64R5EB-NEXT: daddiu $sp, $sp, 32 3988; MIPS64R5EB-NEXT: jr $ra 3989; MIPS64R5EB-NEXT: nop 3990; 3991; MIPS32EL-LABEL: call_i8_8: 3992; MIPS32EL: # %bb.0: # %entry 3993; MIPS32EL-NEXT: addiu $sp, $sp, -24 3994; MIPS32EL-NEXT: .cfi_def_cfa_offset 24 3995; MIPS32EL-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 3996; MIPS32EL-NEXT: .cfi_offset 31, -4 3997; MIPS32EL-NEXT: lui $1, 2569 3998; MIPS32EL-NEXT: ori $6, $1, 2060 3999; MIPS32EL-NEXT: ori $4, $1, 1798 4000; MIPS32EL-NEXT: move $5, $4 4001; MIPS32EL-NEXT: move $7, $4 4002; MIPS32EL-NEXT: jal i8_8 4003; MIPS32EL-NEXT: nop 4004; MIPS32EL-NEXT: lui $1, %hi(gv8i8) 4005; MIPS32EL-NEXT: addiu $4, $1, %lo(gv8i8) 4006; MIPS32EL-NEXT: sw $3, 4($4) 4007; MIPS32EL-NEXT: sw $2, %lo(gv8i8)($1) 4008; MIPS32EL-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 4009; MIPS32EL-NEXT: addiu $sp, $sp, 24 4010; MIPS32EL-NEXT: jr $ra 4011; MIPS32EL-NEXT: nop 4012; 4013; MIPS64EL-LABEL: call_i8_8: 4014; MIPS64EL: # %bb.0: # %entry 4015; MIPS64EL-NEXT: daddiu $sp, $sp, -16 4016; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 4017; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 4018; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 4019; MIPS64EL-NEXT: .cfi_offset 31, -8 4020; MIPS64EL-NEXT: .cfi_offset 28, -16 4021; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_8))) 4022; MIPS64EL-NEXT: daddu $1, $1, $25 4023; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_8))) 4024; MIPS64EL-NEXT: lui $1, 1285 4025; MIPS64EL-NEXT: daddiu $1, $1, -31869 4026; MIPS64EL-NEXT: dsll $1, $1, 17 4027; MIPS64EL-NEXT: daddiu $1, $1, 2569 4028; MIPS64EL-NEXT: dsll $1, $1, 16 4029; MIPS64EL-NEXT: daddiu $4, $1, 1798 4030; MIPS64EL-NEXT: daddiu $5, $1, 2060 4031; MIPS64EL-NEXT: ld $25, %call16(i8_8)($gp) 4032; MIPS64EL-NEXT: jalr $25 4033; MIPS64EL-NEXT: nop 4034; MIPS64EL-NEXT: ld $1, %got_disp(gv8i8)($gp) 4035; MIPS64EL-NEXT: sd $2, 0($1) 4036; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 4037; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 4038; MIPS64EL-NEXT: daddiu $sp, $sp, 16 4039; MIPS64EL-NEXT: jr $ra 4040; MIPS64EL-NEXT: nop 4041; 4042; MIPS32R5EL-LABEL: call_i8_8: 4043; MIPS32R5EL: # %bb.0: # %entry 4044; MIPS32R5EL-NEXT: addiu $sp, $sp, -24 4045; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 24 4046; MIPS32R5EL-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 4047; MIPS32R5EL-NEXT: .cfi_offset 31, -4 4048; MIPS32R5EL-NEXT: lui $1, 2569 4049; MIPS32R5EL-NEXT: ori $6, $1, 2060 4050; MIPS32R5EL-NEXT: ori $4, $1, 1798 4051; MIPS32R5EL-NEXT: move $5, $4 4052; MIPS32R5EL-NEXT: move $7, $4 4053; MIPS32R5EL-NEXT: jal i8_8 4054; MIPS32R5EL-NEXT: nop 4055; MIPS32R5EL-NEXT: lui $1, %hi(gv8i8) 4056; MIPS32R5EL-NEXT: addiu $4, $1, %lo(gv8i8) 4057; MIPS32R5EL-NEXT: sw $3, 4($4) 4058; MIPS32R5EL-NEXT: sw $2, %lo(gv8i8)($1) 4059; MIPS32R5EL-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 4060; MIPS32R5EL-NEXT: addiu $sp, $sp, 24 4061; MIPS32R5EL-NEXT: jr $ra 4062; MIPS32R5EL-NEXT: nop 4063; 4064; MIPS64R5EL-LABEL: call_i8_8: 4065; MIPS64R5EL: # %bb.0: # %entry 4066; MIPS64R5EL-NEXT: daddiu $sp, $sp, -32 4067; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 32 4068; MIPS64R5EL-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill 4069; MIPS64R5EL-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill 4070; MIPS64R5EL-NEXT: .cfi_offset 31, -8 4071; MIPS64R5EL-NEXT: .cfi_offset 28, -16 4072; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(call_i8_8))) 4073; MIPS64R5EL-NEXT: daddu $1, $1, $25 4074; MIPS64R5EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(call_i8_8))) 4075; MIPS64R5EL-NEXT: lui $1, 1285 4076; MIPS64R5EL-NEXT: daddiu $1, $1, -31869 4077; MIPS64R5EL-NEXT: dsll $1, $1, 17 4078; MIPS64R5EL-NEXT: daddiu $1, $1, 2569 4079; MIPS64R5EL-NEXT: dsll $1, $1, 16 4080; MIPS64R5EL-NEXT: daddiu $4, $1, 1798 4081; MIPS64R5EL-NEXT: daddiu $5, $1, 2060 4082; MIPS64R5EL-NEXT: ld $25, %call16(i8_8)($gp) 4083; MIPS64R5EL-NEXT: jalr $25 4084; MIPS64R5EL-NEXT: nop 4085; MIPS64R5EL-NEXT: ld $1, %got_disp(gv8i8)($gp) 4086; MIPS64R5EL-NEXT: sd $2, 0($1) 4087; MIPS64R5EL-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload 4088; MIPS64R5EL-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload 4089; MIPS64R5EL-NEXT: daddiu $sp, $sp, 32 4090; MIPS64R5EL-NEXT: jr $ra 4091; MIPS64R5EL-NEXT: nop 4092entry: 4093 %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>) 4094 store <8 x i8> %0, <8 x i8> * @gv8i8 4095 ret void 4096} 4097 4098define void @calli8_16() { 4099; MIPS32EB-LABEL: calli8_16: 4100; MIPS32EB: # %bb.0: # %entry 4101; MIPS32EB-NEXT: addiu $sp, $sp, -40 4102; MIPS32EB-NEXT: .cfi_def_cfa_offset 40 4103; MIPS32EB-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill 4104; MIPS32EB-NEXT: .cfi_offset 31, -4 4105; MIPS32EB-NEXT: lui $1, 3080 4106; MIPS32EB-NEXT: ori $1, $1, 2314 4107; MIPS32EB-NEXT: lui $2, 1801 4108; MIPS32EB-NEXT: sw $1, 28($sp) 4109; MIPS32EB-NEXT: ori $1, $2, 1801 4110; MIPS32EB-NEXT: sw $1, 24($sp) 4111; MIPS32EB-NEXT: sw $1, 20($sp) 4112; MIPS32EB-NEXT: sw $1, 16($sp) 4113; MIPS32EB-NEXT: lui $1, 1543 4114; MIPS32EB-NEXT: ori $4, $1, 1543 4115; MIPS32EB-NEXT: ori $7, $1, 2314 4116; MIPS32EB-NEXT: move $5, $4 4117; MIPS32EB-NEXT: move $6, $4 4118; MIPS32EB-NEXT: jal i8_16 4119; MIPS32EB-NEXT: nop 4120; MIPS32EB-NEXT: lui $1, %hi(gv16i8) 4121; MIPS32EB-NEXT: addiu $6, $1, %lo(gv16i8) 4122; MIPS32EB-NEXT: sw $5, 12($6) 4123; MIPS32EB-NEXT: sw $4, 8($6) 4124; MIPS32EB-NEXT: sw $3, 4($6) 4125; MIPS32EB-NEXT: sw $2, %lo(gv16i8)($1) 4126; MIPS32EB-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload 4127; MIPS32EB-NEXT: addiu $sp, $sp, 40 4128; MIPS32EB-NEXT: jr $ra 4129; MIPS32EB-NEXT: nop 4130; 4131; MIPS64EB-LABEL: calli8_16: 4132; MIPS64EB: # %bb.0: # %entry 4133; MIPS64EB-NEXT: daddiu $sp, $sp, -16 4134; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 4135; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 4136; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 4137; MIPS64EB-NEXT: .cfi_offset 31, -8 4138; MIPS64EB-NEXT: .cfi_offset 28, -16 4139; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli8_16))) 4140; MIPS64EB-NEXT: daddu $1, $1, $25 4141; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli8_16))) 4142; MIPS64EB-NEXT: lui $1, 1801 4143; MIPS64EB-NEXT: daddiu $1, $1, 1801 4144; MIPS64EB-NEXT: dsll $1, $1, 16 4145; MIPS64EB-NEXT: daddiu $1, $1, 1801 4146; MIPS64EB-NEXT: lui $2, 1543 4147; MIPS64EB-NEXT: dsll $1, $1, 16 4148; MIPS64EB-NEXT: daddiu $2, $2, 1543 4149; MIPS64EB-NEXT: dsll $2, $2, 16 4150; MIPS64EB-NEXT: daddiu $2, $2, 1543 4151; MIPS64EB-NEXT: dsll $2, $2, 16 4152; MIPS64EB-NEXT: daddiu $4, $2, 1543 4153; MIPS64EB-NEXT: daddiu $5, $2, 2314 4154; MIPS64EB-NEXT: daddiu $6, $1, 1801 4155; MIPS64EB-NEXT: lui $1, 225 4156; MIPS64EB-NEXT: daddiu $1, $1, 8417 4157; MIPS64EB-NEXT: dsll $1, $1, 16 4158; MIPS64EB-NEXT: daddiu $1, $1, 8577 4159; MIPS64EB-NEXT: dsll $1, $1, 19 4160; MIPS64EB-NEXT: daddiu $7, $1, 2314 4161; MIPS64EB-NEXT: ld $25, %call16(i8_16)($gp) 4162; MIPS64EB-NEXT: jalr $25 4163; MIPS64EB-NEXT: nop 4164; MIPS64EB-NEXT: ld $1, %got_disp(gv16i8)($gp) 4165; MIPS64EB-NEXT: sd $3, 8($1) 4166; MIPS64EB-NEXT: sd $2, 0($1) 4167; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 4168; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 4169; MIPS64EB-NEXT: daddiu $sp, $sp, 16 4170; MIPS64EB-NEXT: jr $ra 4171; MIPS64EB-NEXT: nop 4172; 4173; MIPS32R5-LABEL: calli8_16: 4174; MIPS32R5: # %bb.0: # %entry 4175; MIPS32R5-NEXT: addiu $sp, $sp, -40 4176; MIPS32R5-NEXT: .cfi_def_cfa_offset 40 4177; MIPS32R5-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill 4178; MIPS32R5-NEXT: .cfi_offset 31, -4 4179; MIPS32R5-NEXT: lui $1, %hi($CPI30_0) 4180; MIPS32R5-NEXT: addiu $1, $1, %lo($CPI30_0) 4181; MIPS32R5-NEXT: ld.w $w0, 0($1) 4182; MIPS32R5-NEXT: copy_s.w $4, $w0[0] 4183; MIPS32R5-NEXT: copy_s.w $5, $w0[1] 4184; MIPS32R5-NEXT: copy_s.w $6, $w0[2] 4185; MIPS32R5-NEXT: copy_s.w $7, $w0[3] 4186; MIPS32R5-NEXT: lui $1, %hi($CPI30_1) 4187; MIPS32R5-NEXT: addiu $1, $1, %lo($CPI30_1) 4188; MIPS32R5-NEXT: ld.w $w0, 0($1) 4189; MIPS32R5-NEXT: copy_s.w $1, $w0[0] 4190; MIPS32R5-NEXT: copy_s.w $2, $w0[1] 4191; MIPS32R5-NEXT: copy_s.w $3, $w0[2] 4192; MIPS32R5-NEXT: copy_s.w $8, $w0[3] 4193; MIPS32R5-NEXT: sw $8, 28($sp) 4194; MIPS32R5-NEXT: sw $3, 24($sp) 4195; MIPS32R5-NEXT: sw $2, 20($sp) 4196; MIPS32R5-NEXT: sw $1, 16($sp) 4197; MIPS32R5-NEXT: jal i8_16 4198; MIPS32R5-NEXT: nop 4199; MIPS32R5-NEXT: lui $1, %hi(gv16i8) 4200; MIPS32R5-NEXT: insert.w $w0[0], $2 4201; MIPS32R5-NEXT: insert.w $w0[1], $3 4202; MIPS32R5-NEXT: addiu $1, $1, %lo(gv16i8) 4203; MIPS32R5-NEXT: insert.w $w0[2], $4 4204; MIPS32R5-NEXT: insert.w $w0[3], $5 4205; MIPS32R5-NEXT: st.w $w0, 0($1) 4206; MIPS32R5-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload 4207; MIPS32R5-NEXT: addiu $sp, $sp, 40 4208; MIPS32R5-NEXT: jr $ra 4209; MIPS32R5-NEXT: nop 4210; 4211; MIPS64R5-LABEL: calli8_16: 4212; MIPS64R5: # %bb.0: # %entry 4213; MIPS64R5-NEXT: daddiu $sp, $sp, -16 4214; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 4215; MIPS64R5-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 4216; MIPS64R5-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 4217; MIPS64R5-NEXT: .cfi_offset 31, -8 4218; MIPS64R5-NEXT: .cfi_offset 28, -16 4219; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(calli8_16))) 4220; MIPS64R5-NEXT: daddu $1, $1, $25 4221; MIPS64R5-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli8_16))) 4222; MIPS64R5-NEXT: ld $1, %got_page(.LCPI30_0)($gp) 4223; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI30_0) 4224; MIPS64R5-NEXT: ld.d $w0, 0($1) 4225; MIPS64R5-NEXT: copy_s.d $4, $w0[0] 4226; MIPS64R5-NEXT: copy_s.d $5, $w0[1] 4227; MIPS64R5-NEXT: ld $1, %got_page(.LCPI30_1)($gp) 4228; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI30_1) 4229; MIPS64R5-NEXT: ld.d $w0, 0($1) 4230; MIPS64R5-NEXT: copy_s.d $6, $w0[0] 4231; MIPS64R5-NEXT: copy_s.d $7, $w0[1] 4232; MIPS64R5-NEXT: ld $25, %call16(i8_16)($gp) 4233; MIPS64R5-NEXT: jalr $25 4234; MIPS64R5-NEXT: nop 4235; MIPS64R5-NEXT: insert.d $w0[0], $2 4236; MIPS64R5-NEXT: insert.d $w0[1], $3 4237; MIPS64R5-NEXT: ld $1, %got_disp(gv16i8)($gp) 4238; MIPS64R5-NEXT: st.d $w0, 0($1) 4239; MIPS64R5-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 4240; MIPS64R5-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 4241; MIPS64R5-NEXT: daddiu $sp, $sp, 16 4242; MIPS64R5-NEXT: jr $ra 4243; MIPS64R5-NEXT: nop 4244; 4245; MIPS32EL-LABEL: calli8_16: 4246; MIPS32EL: # %bb.0: # %entry 4247; MIPS32EL-NEXT: addiu $sp, $sp, -40 4248; MIPS32EL-NEXT: .cfi_def_cfa_offset 40 4249; MIPS32EL-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill 4250; MIPS32EL-NEXT: .cfi_offset 31, -4 4251; MIPS32EL-NEXT: lui $1, 2569 4252; MIPS32EL-NEXT: ori $2, $1, 2060 4253; MIPS32EL-NEXT: lui $3, 2311 4254; MIPS32EL-NEXT: sw $2, 28($sp) 4255; MIPS32EL-NEXT: ori $2, $3, 2311 4256; MIPS32EL-NEXT: sw $2, 24($sp) 4257; MIPS32EL-NEXT: sw $2, 20($sp) 4258; MIPS32EL-NEXT: sw $2, 16($sp) 4259; MIPS32EL-NEXT: lui $2, 1798 4260; MIPS32EL-NEXT: ori $4, $2, 1798 4261; MIPS32EL-NEXT: ori $7, $1, 1798 4262; MIPS32EL-NEXT: move $5, $4 4263; MIPS32EL-NEXT: move $6, $4 4264; MIPS32EL-NEXT: jal i8_16 4265; MIPS32EL-NEXT: nop 4266; MIPS32EL-NEXT: lui $1, %hi(gv16i8) 4267; MIPS32EL-NEXT: addiu $6, $1, %lo(gv16i8) 4268; MIPS32EL-NEXT: sw $5, 12($6) 4269; MIPS32EL-NEXT: sw $4, 8($6) 4270; MIPS32EL-NEXT: sw $3, 4($6) 4271; MIPS32EL-NEXT: sw $2, %lo(gv16i8)($1) 4272; MIPS32EL-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload 4273; MIPS32EL-NEXT: addiu $sp, $sp, 40 4274; MIPS32EL-NEXT: jr $ra 4275; MIPS32EL-NEXT: nop 4276; 4277; MIPS64EL-LABEL: calli8_16: 4278; MIPS64EL: # %bb.0: # %entry 4279; MIPS64EL-NEXT: daddiu $sp, $sp, -16 4280; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 4281; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 4282; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 4283; MIPS64EL-NEXT: .cfi_offset 31, -8 4284; MIPS64EL-NEXT: .cfi_offset 28, -16 4285; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli8_16))) 4286; MIPS64EL-NEXT: daddu $1, $1, $25 4287; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli8_16))) 4288; MIPS64EL-NEXT: lui $1, 1285 4289; MIPS64EL-NEXT: daddiu $1, $1, -31869 4290; MIPS64EL-NEXT: dsll $1, $1, 16 4291; MIPS64EL-NEXT: daddiu $1, $1, 899 4292; MIPS64EL-NEXT: lui $2, 2311 4293; MIPS64EL-NEXT: daddiu $2, $2, 2311 4294; MIPS64EL-NEXT: dsll $2, $2, 16 4295; MIPS64EL-NEXT: daddiu $2, $2, 2311 4296; MIPS64EL-NEXT: dsll $2, $2, 16 4297; MIPS64EL-NEXT: dsll $1, $1, 17 4298; MIPS64EL-NEXT: lui $3, 899 4299; MIPS64EL-NEXT: daddiu $3, $3, 899 4300; MIPS64EL-NEXT: dsll $3, $3, 16 4301; MIPS64EL-NEXT: daddiu $3, $3, 899 4302; MIPS64EL-NEXT: dsll $3, $3, 17 4303; MIPS64EL-NEXT: daddiu $4, $3, 1798 4304; MIPS64EL-NEXT: daddiu $5, $1, 1798 4305; MIPS64EL-NEXT: daddiu $6, $2, 2311 4306; MIPS64EL-NEXT: lui $1, 642 4307; MIPS64EL-NEXT: daddiu $1, $1, 16899 4308; MIPS64EL-NEXT: dsll $1, $1, 18 4309; MIPS64EL-NEXT: daddiu $1, $1, 2311 4310; MIPS64EL-NEXT: dsll $1, $1, 16 4311; MIPS64EL-NEXT: daddiu $7, $1, 2311 4312; MIPS64EL-NEXT: ld $25, %call16(i8_16)($gp) 4313; MIPS64EL-NEXT: jalr $25 4314; MIPS64EL-NEXT: nop 4315; MIPS64EL-NEXT: ld $1, %got_disp(gv16i8)($gp) 4316; MIPS64EL-NEXT: sd $3, 8($1) 4317; MIPS64EL-NEXT: sd $2, 0($1) 4318; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 4319; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 4320; MIPS64EL-NEXT: daddiu $sp, $sp, 16 4321; MIPS64EL-NEXT: jr $ra 4322; MIPS64EL-NEXT: nop 4323entry: 4324 %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>) 4325 store <16 x i8> %0, <16 x i8> * @gv16i8 4326 ret void 4327} 4328 4329define void @calli16_2() { 4330; MIPS32EB-LABEL: calli16_2: 4331; MIPS32EB: # %bb.0: # %entry 4332; MIPS32EB-NEXT: addiu $sp, $sp, -24 4333; MIPS32EB-NEXT: .cfi_def_cfa_offset 24 4334; MIPS32EB-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 4335; MIPS32EB-NEXT: .cfi_offset 31, -4 4336; MIPS32EB-NEXT: lui $1, 6 4337; MIPS32EB-NEXT: ori $4, $1, 7 4338; MIPS32EB-NEXT: lui $1, 12 4339; MIPS32EB-NEXT: ori $5, $1, 8 4340; MIPS32EB-NEXT: jal i16_2 4341; MIPS32EB-NEXT: nop 4342; MIPS32EB-NEXT: lui $1, %hi(gv2i16) 4343; MIPS32EB-NEXT: sw $2, %lo(gv2i16)($1) 4344; MIPS32EB-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 4345; MIPS32EB-NEXT: addiu $sp, $sp, 24 4346; MIPS32EB-NEXT: jr $ra 4347; MIPS32EB-NEXT: nop 4348; 4349; MIPS64EB-LABEL: calli16_2: 4350; MIPS64EB: # %bb.0: # %entry 4351; MIPS64EB-NEXT: daddiu $sp, $sp, -16 4352; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 4353; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 4354; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 4355; MIPS64EB-NEXT: .cfi_offset 31, -8 4356; MIPS64EB-NEXT: .cfi_offset 28, -16 4357; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_2))) 4358; MIPS64EB-NEXT: daddu $1, $1, $25 4359; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_2))) 4360; MIPS64EB-NEXT: lui $1, 6 4361; MIPS64EB-NEXT: ori $4, $1, 7 4362; MIPS64EB-NEXT: lui $1, 12 4363; MIPS64EB-NEXT: ori $5, $1, 8 4364; MIPS64EB-NEXT: ld $25, %call16(i16_2)($gp) 4365; MIPS64EB-NEXT: jalr $25 4366; MIPS64EB-NEXT: nop 4367; MIPS64EB-NEXT: ld $1, %got_disp(gv2i16)($gp) 4368; MIPS64EB-NEXT: sw $2, 0($1) 4369; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 4370; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 4371; MIPS64EB-NEXT: daddiu $sp, $sp, 16 4372; MIPS64EB-NEXT: jr $ra 4373; MIPS64EB-NEXT: nop 4374; 4375; MIPS32R5EB-LABEL: calli16_2: 4376; MIPS32R5EB: # %bb.0: # %entry 4377; MIPS32R5EB-NEXT: addiu $sp, $sp, -32 4378; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 32 4379; MIPS32R5EB-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill 4380; MIPS32R5EB-NEXT: .cfi_offset 31, -4 4381; MIPS32R5EB-NEXT: lui $1, 6 4382; MIPS32R5EB-NEXT: ori $4, $1, 7 4383; MIPS32R5EB-NEXT: lui $1, 12 4384; MIPS32R5EB-NEXT: ori $5, $1, 8 4385; MIPS32R5EB-NEXT: jal i16_2 4386; MIPS32R5EB-NEXT: nop 4387; MIPS32R5EB-NEXT: lui $1, %hi(gv2i16) 4388; MIPS32R5EB-NEXT: sw $2, %lo(gv2i16)($1) 4389; MIPS32R5EB-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload 4390; MIPS32R5EB-NEXT: addiu $sp, $sp, 32 4391; MIPS32R5EB-NEXT: jr $ra 4392; MIPS32R5EB-NEXT: nop 4393; 4394; MIPS64R5EB-LABEL: calli16_2: 4395; MIPS64R5EB: # %bb.0: # %entry 4396; MIPS64R5EB-NEXT: daddiu $sp, $sp, -32 4397; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 32 4398; MIPS64R5EB-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill 4399; MIPS64R5EB-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill 4400; MIPS64R5EB-NEXT: .cfi_offset 31, -8 4401; MIPS64R5EB-NEXT: .cfi_offset 28, -16 4402; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_2))) 4403; MIPS64R5EB-NEXT: daddu $1, $1, $25 4404; MIPS64R5EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_2))) 4405; MIPS64R5EB-NEXT: lui $1, 6 4406; MIPS64R5EB-NEXT: ori $4, $1, 7 4407; MIPS64R5EB-NEXT: lui $1, 12 4408; MIPS64R5EB-NEXT: ori $5, $1, 8 4409; MIPS64R5EB-NEXT: ld $25, %call16(i16_2)($gp) 4410; MIPS64R5EB-NEXT: jalr $25 4411; MIPS64R5EB-NEXT: nop 4412; MIPS64R5EB-NEXT: ld $1, %got_disp(gv2i16)($gp) 4413; MIPS64R5EB-NEXT: sw $2, 0($1) 4414; MIPS64R5EB-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload 4415; MIPS64R5EB-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload 4416; MIPS64R5EB-NEXT: daddiu $sp, $sp, 32 4417; MIPS64R5EB-NEXT: jr $ra 4418; MIPS64R5EB-NEXT: nop 4419; 4420; MIPS32EL-LABEL: calli16_2: 4421; MIPS32EL: # %bb.0: # %entry 4422; MIPS32EL-NEXT: addiu $sp, $sp, -24 4423; MIPS32EL-NEXT: .cfi_def_cfa_offset 24 4424; MIPS32EL-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 4425; MIPS32EL-NEXT: .cfi_offset 31, -4 4426; MIPS32EL-NEXT: lui $1, 7 4427; MIPS32EL-NEXT: ori $4, $1, 6 4428; MIPS32EL-NEXT: lui $1, 8 4429; MIPS32EL-NEXT: ori $5, $1, 12 4430; MIPS32EL-NEXT: jal i16_2 4431; MIPS32EL-NEXT: nop 4432; MIPS32EL-NEXT: lui $1, %hi(gv2i16) 4433; MIPS32EL-NEXT: sw $2, %lo(gv2i16)($1) 4434; MIPS32EL-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 4435; MIPS32EL-NEXT: addiu $sp, $sp, 24 4436; MIPS32EL-NEXT: jr $ra 4437; MIPS32EL-NEXT: nop 4438; 4439; MIPS64EL-LABEL: calli16_2: 4440; MIPS64EL: # %bb.0: # %entry 4441; MIPS64EL-NEXT: daddiu $sp, $sp, -16 4442; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 4443; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 4444; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 4445; MIPS64EL-NEXT: .cfi_offset 31, -8 4446; MIPS64EL-NEXT: .cfi_offset 28, -16 4447; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_2))) 4448; MIPS64EL-NEXT: daddu $1, $1, $25 4449; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_2))) 4450; MIPS64EL-NEXT: lui $1, 7 4451; MIPS64EL-NEXT: ori $4, $1, 6 4452; MIPS64EL-NEXT: lui $1, 8 4453; MIPS64EL-NEXT: ori $5, $1, 12 4454; MIPS64EL-NEXT: ld $25, %call16(i16_2)($gp) 4455; MIPS64EL-NEXT: jalr $25 4456; MIPS64EL-NEXT: nop 4457; MIPS64EL-NEXT: ld $1, %got_disp(gv2i16)($gp) 4458; MIPS64EL-NEXT: sw $2, 0($1) 4459; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 4460; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 4461; MIPS64EL-NEXT: daddiu $sp, $sp, 16 4462; MIPS64EL-NEXT: jr $ra 4463; MIPS64EL-NEXT: nop 4464; 4465; MIPS32R5EL-LABEL: calli16_2: 4466; MIPS32R5EL: # %bb.0: # %entry 4467; MIPS32R5EL-NEXT: addiu $sp, $sp, -32 4468; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 32 4469; MIPS32R5EL-NEXT: sw $ra, 28($sp) # 4-byte Folded Spill 4470; MIPS32R5EL-NEXT: .cfi_offset 31, -4 4471; MIPS32R5EL-NEXT: lui $1, 7 4472; MIPS32R5EL-NEXT: ori $4, $1, 6 4473; MIPS32R5EL-NEXT: lui $1, 8 4474; MIPS32R5EL-NEXT: ori $5, $1, 12 4475; MIPS32R5EL-NEXT: jal i16_2 4476; MIPS32R5EL-NEXT: nop 4477; MIPS32R5EL-NEXT: lui $1, %hi(gv2i16) 4478; MIPS32R5EL-NEXT: sw $2, %lo(gv2i16)($1) 4479; MIPS32R5EL-NEXT: lw $ra, 28($sp) # 4-byte Folded Reload 4480; MIPS32R5EL-NEXT: addiu $sp, $sp, 32 4481; MIPS32R5EL-NEXT: jr $ra 4482; MIPS32R5EL-NEXT: nop 4483; 4484; MIPS64R5EL-LABEL: calli16_2: 4485; MIPS64R5EL: # %bb.0: # %entry 4486; MIPS64R5EL-NEXT: daddiu $sp, $sp, -32 4487; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 32 4488; MIPS64R5EL-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill 4489; MIPS64R5EL-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill 4490; MIPS64R5EL-NEXT: .cfi_offset 31, -8 4491; MIPS64R5EL-NEXT: .cfi_offset 28, -16 4492; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_2))) 4493; MIPS64R5EL-NEXT: daddu $1, $1, $25 4494; MIPS64R5EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_2))) 4495; MIPS64R5EL-NEXT: lui $1, 7 4496; MIPS64R5EL-NEXT: ori $4, $1, 6 4497; MIPS64R5EL-NEXT: lui $1, 8 4498; MIPS64R5EL-NEXT: ori $5, $1, 12 4499; MIPS64R5EL-NEXT: ld $25, %call16(i16_2)($gp) 4500; MIPS64R5EL-NEXT: jalr $25 4501; MIPS64R5EL-NEXT: nop 4502; MIPS64R5EL-NEXT: ld $1, %got_disp(gv2i16)($gp) 4503; MIPS64R5EL-NEXT: sw $2, 0($1) 4504; MIPS64R5EL-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload 4505; MIPS64R5EL-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload 4506; MIPS64R5EL-NEXT: daddiu $sp, $sp, 32 4507; MIPS64R5EL-NEXT: jr $ra 4508; MIPS64R5EL-NEXT: nop 4509entry: 4510 %0 = call <2 x i16> @i16_2(<2 x i16> <i16 6, i16 7>, <2 x i16> <i16 12, i16 8>) 4511 store <2 x i16> %0, <2 x i16> * @gv2i16 4512 ret void 4513} 4514 4515define void @calli16_4() { 4516; MIPS32EB-LABEL: calli16_4: 4517; MIPS32EB: # %bb.0: # %entry 4518; MIPS32EB-NEXT: addiu $sp, $sp, -24 4519; MIPS32EB-NEXT: .cfi_def_cfa_offset 24 4520; MIPS32EB-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 4521; MIPS32EB-NEXT: .cfi_offset 31, -4 4522; MIPS32EB-NEXT: lui $1, 6 4523; MIPS32EB-NEXT: ori $4, $1, 7 4524; MIPS32EB-NEXT: lui $1, 12 4525; MIPS32EB-NEXT: ori $6, $1, 8 4526; MIPS32EB-NEXT: lui $1, 9 4527; MIPS32EB-NEXT: ori $5, $1, 10 4528; MIPS32EB-NEXT: move $7, $5 4529; MIPS32EB-NEXT: jal i16_4 4530; MIPS32EB-NEXT: nop 4531; MIPS32EB-NEXT: lui $1, %hi(gv4i16) 4532; MIPS32EB-NEXT: addiu $4, $1, %lo(gv4i16) 4533; MIPS32EB-NEXT: sw $3, 4($4) 4534; MIPS32EB-NEXT: sw $2, %lo(gv4i16)($1) 4535; MIPS32EB-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 4536; MIPS32EB-NEXT: addiu $sp, $sp, 24 4537; MIPS32EB-NEXT: jr $ra 4538; MIPS32EB-NEXT: nop 4539; 4540; MIPS64EB-LABEL: calli16_4: 4541; MIPS64EB: # %bb.0: # %entry 4542; MIPS64EB-NEXT: daddiu $sp, $sp, -16 4543; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 4544; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 4545; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 4546; MIPS64EB-NEXT: .cfi_offset 31, -8 4547; MIPS64EB-NEXT: .cfi_offset 28, -16 4548; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_4))) 4549; MIPS64EB-NEXT: daddu $1, $1, $25 4550; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_4))) 4551; MIPS64EB-NEXT: lui $1, 6 4552; MIPS64EB-NEXT: daddiu $1, $1, 7 4553; MIPS64EB-NEXT: dsll $1, $1, 16 4554; MIPS64EB-NEXT: daddiu $1, $1, 9 4555; MIPS64EB-NEXT: dsll $1, $1, 16 4556; MIPS64EB-NEXT: daddiu $4, $1, 10 4557; MIPS64EB-NEXT: lui $1, 2 4558; MIPS64EB-NEXT: daddiu $1, $1, -32767 4559; MIPS64EB-NEXT: dsll $1, $1, 19 4560; MIPS64EB-NEXT: daddiu $1, $1, 9 4561; MIPS64EB-NEXT: dsll $1, $1, 16 4562; MIPS64EB-NEXT: daddiu $5, $1, 10 4563; MIPS64EB-NEXT: ld $25, %call16(i16_4)($gp) 4564; MIPS64EB-NEXT: jalr $25 4565; MIPS64EB-NEXT: nop 4566; MIPS64EB-NEXT: ld $1, %got_disp(gv4i16)($gp) 4567; MIPS64EB-NEXT: sd $2, 0($1) 4568; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 4569; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 4570; MIPS64EB-NEXT: daddiu $sp, $sp, 16 4571; MIPS64EB-NEXT: jr $ra 4572; MIPS64EB-NEXT: nop 4573; 4574; MIPS32R5EB-LABEL: calli16_4: 4575; MIPS32R5EB: # %bb.0: # %entry 4576; MIPS32R5EB-NEXT: addiu $sp, $sp, -24 4577; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 24 4578; MIPS32R5EB-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 4579; MIPS32R5EB-NEXT: .cfi_offset 31, -4 4580; MIPS32R5EB-NEXT: lui $1, 6 4581; MIPS32R5EB-NEXT: ori $4, $1, 7 4582; MIPS32R5EB-NEXT: lui $1, 12 4583; MIPS32R5EB-NEXT: ori $6, $1, 8 4584; MIPS32R5EB-NEXT: lui $1, 9 4585; MIPS32R5EB-NEXT: ori $5, $1, 10 4586; MIPS32R5EB-NEXT: move $7, $5 4587; MIPS32R5EB-NEXT: jal i16_4 4588; MIPS32R5EB-NEXT: nop 4589; MIPS32R5EB-NEXT: lui $1, %hi(gv4i16) 4590; MIPS32R5EB-NEXT: addiu $4, $1, %lo(gv4i16) 4591; MIPS32R5EB-NEXT: sw $3, 4($4) 4592; MIPS32R5EB-NEXT: sw $2, %lo(gv4i16)($1) 4593; MIPS32R5EB-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 4594; MIPS32R5EB-NEXT: addiu $sp, $sp, 24 4595; MIPS32R5EB-NEXT: jr $ra 4596; MIPS32R5EB-NEXT: nop 4597; 4598; MIPS64R5EB-LABEL: calli16_4: 4599; MIPS64R5EB: # %bb.0: # %entry 4600; MIPS64R5EB-NEXT: daddiu $sp, $sp, -32 4601; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 32 4602; MIPS64R5EB-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill 4603; MIPS64R5EB-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill 4604; MIPS64R5EB-NEXT: .cfi_offset 31, -8 4605; MIPS64R5EB-NEXT: .cfi_offset 28, -16 4606; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_4))) 4607; MIPS64R5EB-NEXT: daddu $1, $1, $25 4608; MIPS64R5EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_4))) 4609; MIPS64R5EB-NEXT: lui $1, 6 4610; MIPS64R5EB-NEXT: daddiu $1, $1, 7 4611; MIPS64R5EB-NEXT: dsll $1, $1, 16 4612; MIPS64R5EB-NEXT: daddiu $1, $1, 9 4613; MIPS64R5EB-NEXT: dsll $1, $1, 16 4614; MIPS64R5EB-NEXT: daddiu $4, $1, 10 4615; MIPS64R5EB-NEXT: lui $1, 2 4616; MIPS64R5EB-NEXT: daddiu $1, $1, -32767 4617; MIPS64R5EB-NEXT: dsll $1, $1, 19 4618; MIPS64R5EB-NEXT: daddiu $1, $1, 9 4619; MIPS64R5EB-NEXT: dsll $1, $1, 16 4620; MIPS64R5EB-NEXT: daddiu $5, $1, 10 4621; MIPS64R5EB-NEXT: ld $25, %call16(i16_4)($gp) 4622; MIPS64R5EB-NEXT: jalr $25 4623; MIPS64R5EB-NEXT: nop 4624; MIPS64R5EB-NEXT: ld $1, %got_disp(gv4i16)($gp) 4625; MIPS64R5EB-NEXT: sd $2, 0($1) 4626; MIPS64R5EB-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload 4627; MIPS64R5EB-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload 4628; MIPS64R5EB-NEXT: daddiu $sp, $sp, 32 4629; MIPS64R5EB-NEXT: jr $ra 4630; MIPS64R5EB-NEXT: nop 4631; 4632; MIPS32EL-LABEL: calli16_4: 4633; MIPS32EL: # %bb.0: # %entry 4634; MIPS32EL-NEXT: addiu $sp, $sp, -24 4635; MIPS32EL-NEXT: .cfi_def_cfa_offset 24 4636; MIPS32EL-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 4637; MIPS32EL-NEXT: .cfi_offset 31, -4 4638; MIPS32EL-NEXT: lui $1, 7 4639; MIPS32EL-NEXT: ori $4, $1, 6 4640; MIPS32EL-NEXT: lui $1, 8 4641; MIPS32EL-NEXT: ori $6, $1, 12 4642; MIPS32EL-NEXT: lui $1, 10 4643; MIPS32EL-NEXT: ori $5, $1, 9 4644; MIPS32EL-NEXT: move $7, $5 4645; MIPS32EL-NEXT: jal i16_4 4646; MIPS32EL-NEXT: nop 4647; MIPS32EL-NEXT: lui $1, %hi(gv4i16) 4648; MIPS32EL-NEXT: addiu $4, $1, %lo(gv4i16) 4649; MIPS32EL-NEXT: sw $3, 4($4) 4650; MIPS32EL-NEXT: sw $2, %lo(gv4i16)($1) 4651; MIPS32EL-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 4652; MIPS32EL-NEXT: addiu $sp, $sp, 24 4653; MIPS32EL-NEXT: jr $ra 4654; MIPS32EL-NEXT: nop 4655; 4656; MIPS64EL-LABEL: calli16_4: 4657; MIPS64EL: # %bb.0: # %entry 4658; MIPS64EL-NEXT: daddiu $sp, $sp, -16 4659; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 4660; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 4661; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 4662; MIPS64EL-NEXT: .cfi_offset 31, -8 4663; MIPS64EL-NEXT: .cfi_offset 28, -16 4664; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_4))) 4665; MIPS64EL-NEXT: daddu $1, $1, $25 4666; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_4))) 4667; MIPS64EL-NEXT: lui $1, 10 4668; MIPS64EL-NEXT: daddiu $1, $1, 9 4669; MIPS64EL-NEXT: dsll $1, $1, 16 4670; MIPS64EL-NEXT: daddiu $1, $1, 7 4671; MIPS64EL-NEXT: dsll $1, $1, 16 4672; MIPS64EL-NEXT: daddiu $4, $1, 6 4673; MIPS64EL-NEXT: lui $1, 1 4674; MIPS64EL-NEXT: daddiu $1, $1, 16385 4675; MIPS64EL-NEXT: dsll $1, $1, 16 4676; MIPS64EL-NEXT: daddiu $1, $1, 8193 4677; MIPS64EL-NEXT: dsll $1, $1, 19 4678; MIPS64EL-NEXT: daddiu $5, $1, 12 4679; MIPS64EL-NEXT: ld $25, %call16(i16_4)($gp) 4680; MIPS64EL-NEXT: jalr $25 4681; MIPS64EL-NEXT: nop 4682; MIPS64EL-NEXT: ld $1, %got_disp(gv4i16)($gp) 4683; MIPS64EL-NEXT: sd $2, 0($1) 4684; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 4685; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 4686; MIPS64EL-NEXT: daddiu $sp, $sp, 16 4687; MIPS64EL-NEXT: jr $ra 4688; MIPS64EL-NEXT: nop 4689; 4690; MIPS32R5EL-LABEL: calli16_4: 4691; MIPS32R5EL: # %bb.0: # %entry 4692; MIPS32R5EL-NEXT: addiu $sp, $sp, -24 4693; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 24 4694; MIPS32R5EL-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 4695; MIPS32R5EL-NEXT: .cfi_offset 31, -4 4696; MIPS32R5EL-NEXT: lui $1, 7 4697; MIPS32R5EL-NEXT: ori $4, $1, 6 4698; MIPS32R5EL-NEXT: lui $1, 8 4699; MIPS32R5EL-NEXT: ori $6, $1, 12 4700; MIPS32R5EL-NEXT: lui $1, 10 4701; MIPS32R5EL-NEXT: ori $5, $1, 9 4702; MIPS32R5EL-NEXT: move $7, $5 4703; MIPS32R5EL-NEXT: jal i16_4 4704; MIPS32R5EL-NEXT: nop 4705; MIPS32R5EL-NEXT: lui $1, %hi(gv4i16) 4706; MIPS32R5EL-NEXT: addiu $4, $1, %lo(gv4i16) 4707; MIPS32R5EL-NEXT: sw $3, 4($4) 4708; MIPS32R5EL-NEXT: sw $2, %lo(gv4i16)($1) 4709; MIPS32R5EL-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 4710; MIPS32R5EL-NEXT: addiu $sp, $sp, 24 4711; MIPS32R5EL-NEXT: jr $ra 4712; MIPS32R5EL-NEXT: nop 4713; 4714; MIPS64R5EL-LABEL: calli16_4: 4715; MIPS64R5EL: # %bb.0: # %entry 4716; MIPS64R5EL-NEXT: daddiu $sp, $sp, -32 4717; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 32 4718; MIPS64R5EL-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill 4719; MIPS64R5EL-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill 4720; MIPS64R5EL-NEXT: .cfi_offset 31, -8 4721; MIPS64R5EL-NEXT: .cfi_offset 28, -16 4722; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_4))) 4723; MIPS64R5EL-NEXT: daddu $1, $1, $25 4724; MIPS64R5EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_4))) 4725; MIPS64R5EL-NEXT: lui $1, 10 4726; MIPS64R5EL-NEXT: daddiu $1, $1, 9 4727; MIPS64R5EL-NEXT: dsll $1, $1, 16 4728; MIPS64R5EL-NEXT: daddiu $1, $1, 7 4729; MIPS64R5EL-NEXT: dsll $1, $1, 16 4730; MIPS64R5EL-NEXT: daddiu $4, $1, 6 4731; MIPS64R5EL-NEXT: lui $1, 1 4732; MIPS64R5EL-NEXT: daddiu $1, $1, 16385 4733; MIPS64R5EL-NEXT: dsll $1, $1, 16 4734; MIPS64R5EL-NEXT: daddiu $1, $1, 8193 4735; MIPS64R5EL-NEXT: dsll $1, $1, 19 4736; MIPS64R5EL-NEXT: daddiu $5, $1, 12 4737; MIPS64R5EL-NEXT: ld $25, %call16(i16_4)($gp) 4738; MIPS64R5EL-NEXT: jalr $25 4739; MIPS64R5EL-NEXT: nop 4740; MIPS64R5EL-NEXT: ld $1, %got_disp(gv4i16)($gp) 4741; MIPS64R5EL-NEXT: sd $2, 0($1) 4742; MIPS64R5EL-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload 4743; MIPS64R5EL-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload 4744; MIPS64R5EL-NEXT: daddiu $sp, $sp, 32 4745; MIPS64R5EL-NEXT: jr $ra 4746; MIPS64R5EL-NEXT: nop 4747entry: 4748 %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>) 4749 store <4 x i16> %0, <4 x i16> * @gv4i16 4750 ret void 4751} 4752 4753define void @calli16_8() { 4754; MIPS32EB-LABEL: calli16_8: 4755; MIPS32EB: # %bb.0: # %entry 4756; MIPS32EB-NEXT: addiu $sp, $sp, -40 4757; MIPS32EB-NEXT: .cfi_def_cfa_offset 40 4758; MIPS32EB-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill 4759; MIPS32EB-NEXT: .cfi_offset 31, -4 4760; MIPS32EB-NEXT: lui $1, 9 4761; MIPS32EB-NEXT: ori $5, $1, 10 4762; MIPS32EB-NEXT: sw $5, 28($sp) 4763; MIPS32EB-NEXT: lui $1, 12 4764; MIPS32EB-NEXT: ori $1, $1, 8 4765; MIPS32EB-NEXT: sw $1, 24($sp) 4766; MIPS32EB-NEXT: sw $5, 20($sp) 4767; MIPS32EB-NEXT: lui $1, 6 4768; MIPS32EB-NEXT: ori $4, $1, 7 4769; MIPS32EB-NEXT: sw $4, 16($sp) 4770; MIPS32EB-NEXT: move $6, $4 4771; MIPS32EB-NEXT: move $7, $5 4772; MIPS32EB-NEXT: jal i16_8 4773; MIPS32EB-NEXT: nop 4774; MIPS32EB-NEXT: lui $1, %hi(gv8i16) 4775; MIPS32EB-NEXT: addiu $6, $1, %lo(gv8i16) 4776; MIPS32EB-NEXT: sw $5, 12($6) 4777; MIPS32EB-NEXT: sw $4, 8($6) 4778; MIPS32EB-NEXT: sw $3, 4($6) 4779; MIPS32EB-NEXT: sw $2, %lo(gv8i16)($1) 4780; MIPS32EB-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload 4781; MIPS32EB-NEXT: addiu $sp, $sp, 40 4782; MIPS32EB-NEXT: jr $ra 4783; MIPS32EB-NEXT: nop 4784; 4785; MIPS64EB-LABEL: calli16_8: 4786; MIPS64EB: # %bb.0: # %entry 4787; MIPS64EB-NEXT: daddiu $sp, $sp, -16 4788; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 4789; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 4790; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 4791; MIPS64EB-NEXT: .cfi_offset 31, -8 4792; MIPS64EB-NEXT: .cfi_offset 28, -16 4793; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_8))) 4794; MIPS64EB-NEXT: daddu $1, $1, $25 4795; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_8))) 4796; MIPS64EB-NEXT: lui $1, 6 4797; MIPS64EB-NEXT: daddiu $1, $1, 7 4798; MIPS64EB-NEXT: dsll $1, $1, 16 4799; MIPS64EB-NEXT: daddiu $1, $1, 9 4800; MIPS64EB-NEXT: dsll $1, $1, 16 4801; MIPS64EB-NEXT: daddiu $4, $1, 10 4802; MIPS64EB-NEXT: lui $1, 2 4803; MIPS64EB-NEXT: daddiu $1, $1, -32767 4804; MIPS64EB-NEXT: dsll $1, $1, 19 4805; MIPS64EB-NEXT: daddiu $1, $1, 9 4806; MIPS64EB-NEXT: dsll $1, $1, 16 4807; MIPS64EB-NEXT: daddiu $7, $1, 10 4808; MIPS64EB-NEXT: ld $25, %call16(i16_8)($gp) 4809; MIPS64EB-NEXT: move $5, $4 4810; MIPS64EB-NEXT: move $6, $4 4811; MIPS64EB-NEXT: jalr $25 4812; MIPS64EB-NEXT: nop 4813; MIPS64EB-NEXT: ld $1, %got_disp(gv8i16)($gp) 4814; MIPS64EB-NEXT: sd $3, 8($1) 4815; MIPS64EB-NEXT: sd $2, 0($1) 4816; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 4817; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 4818; MIPS64EB-NEXT: daddiu $sp, $sp, 16 4819; MIPS64EB-NEXT: jr $ra 4820; MIPS64EB-NEXT: nop 4821; 4822; MIPS32R5EB-LABEL: calli16_8: 4823; MIPS32R5EB: # %bb.0: # %entry 4824; MIPS32R5EB-NEXT: addiu $sp, $sp, -40 4825; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 40 4826; MIPS32R5EB-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill 4827; MIPS32R5EB-NEXT: .cfi_offset 31, -4 4828; MIPS32R5EB-NEXT: lui $1, 6 4829; MIPS32R5EB-NEXT: ori $1, $1, 7 4830; MIPS32R5EB-NEXT: lui $2, 9 4831; MIPS32R5EB-NEXT: ori $2, $2, 10 4832; MIPS32R5EB-NEXT: fill.w $w0, $2 4833; MIPS32R5EB-NEXT: insert.w $w0[1], $1 4834; MIPS32R5EB-NEXT: splati.d $w0, $w0[0] 4835; MIPS32R5EB-NEXT: copy_s.w $4, $w0[0] 4836; MIPS32R5EB-NEXT: copy_s.w $5, $w0[1] 4837; MIPS32R5EB-NEXT: copy_s.w $6, $w0[2] 4838; MIPS32R5EB-NEXT: copy_s.w $7, $w0[3] 4839; MIPS32R5EB-NEXT: lui $1, %hi($CPI33_0) 4840; MIPS32R5EB-NEXT: addiu $1, $1, %lo($CPI33_0) 4841; MIPS32R5EB-NEXT: ld.w $w0, 0($1) 4842; MIPS32R5EB-NEXT: copy_s.w $1, $w0[0] 4843; MIPS32R5EB-NEXT: copy_s.w $2, $w0[1] 4844; MIPS32R5EB-NEXT: copy_s.w $3, $w0[2] 4845; MIPS32R5EB-NEXT: copy_s.w $8, $w0[3] 4846; MIPS32R5EB-NEXT: sw $8, 28($sp) 4847; MIPS32R5EB-NEXT: sw $3, 24($sp) 4848; MIPS32R5EB-NEXT: sw $2, 20($sp) 4849; MIPS32R5EB-NEXT: sw $1, 16($sp) 4850; MIPS32R5EB-NEXT: jal i16_8 4851; MIPS32R5EB-NEXT: nop 4852; MIPS32R5EB-NEXT: lui $1, %hi(gv8i16) 4853; MIPS32R5EB-NEXT: addiu $1, $1, %lo(gv8i16) 4854; MIPS32R5EB-NEXT: insert.w $w0[0], $2 4855; MIPS32R5EB-NEXT: insert.w $w0[1], $3 4856; MIPS32R5EB-NEXT: insert.w $w0[2], $4 4857; MIPS32R5EB-NEXT: insert.w $w0[3], $5 4858; MIPS32R5EB-NEXT: st.w $w0, 0($1) 4859; MIPS32R5EB-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload 4860; MIPS32R5EB-NEXT: addiu $sp, $sp, 40 4861; MIPS32R5EB-NEXT: jr $ra 4862; MIPS32R5EB-NEXT: nop 4863; 4864; MIPS64R5EB-LABEL: calli16_8: 4865; MIPS64R5EB: # %bb.0: # %entry 4866; MIPS64R5EB-NEXT: daddiu $sp, $sp, -16 4867; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 16 4868; MIPS64R5EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 4869; MIPS64R5EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 4870; MIPS64R5EB-NEXT: .cfi_offset 31, -8 4871; MIPS64R5EB-NEXT: .cfi_offset 28, -16 4872; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_8))) 4873; MIPS64R5EB-NEXT: daddu $1, $1, $25 4874; MIPS64R5EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_8))) 4875; MIPS64R5EB-NEXT: lui $1, 9 4876; MIPS64R5EB-NEXT: ori $1, $1, 10 4877; MIPS64R5EB-NEXT: lui $2, 6 4878; MIPS64R5EB-NEXT: ori $2, $2, 7 4879; MIPS64R5EB-NEXT: dinsu $1, $2, 32, 32 4880; MIPS64R5EB-NEXT: fill.d $w0, $1 4881; MIPS64R5EB-NEXT: copy_s.d $4, $w0[0] 4882; MIPS64R5EB-NEXT: copy_s.d $5, $w0[1] 4883; MIPS64R5EB-NEXT: ld $1, %got_page(.LCPI33_0)($gp) 4884; MIPS64R5EB-NEXT: daddiu $1, $1, %got_ofst(.LCPI33_0) 4885; MIPS64R5EB-NEXT: ld.d $w0, 0($1) 4886; MIPS64R5EB-NEXT: copy_s.d $6, $w0[0] 4887; MIPS64R5EB-NEXT: copy_s.d $7, $w0[1] 4888; MIPS64R5EB-NEXT: ld $25, %call16(i16_8)($gp) 4889; MIPS64R5EB-NEXT: jalr $25 4890; MIPS64R5EB-NEXT: nop 4891; MIPS64R5EB-NEXT: ld $1, %got_disp(gv8i16)($gp) 4892; MIPS64R5EB-NEXT: insert.d $w0[0], $2 4893; MIPS64R5EB-NEXT: insert.d $w0[1], $3 4894; MIPS64R5EB-NEXT: st.d $w0, 0($1) 4895; MIPS64R5EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 4896; MIPS64R5EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 4897; MIPS64R5EB-NEXT: daddiu $sp, $sp, 16 4898; MIPS64R5EB-NEXT: jr $ra 4899; MIPS64R5EB-NEXT: nop 4900; 4901; MIPS32EL-LABEL: calli16_8: 4902; MIPS32EL: # %bb.0: # %entry 4903; MIPS32EL-NEXT: addiu $sp, $sp, -40 4904; MIPS32EL-NEXT: .cfi_def_cfa_offset 40 4905; MIPS32EL-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill 4906; MIPS32EL-NEXT: .cfi_offset 31, -4 4907; MIPS32EL-NEXT: lui $1, 10 4908; MIPS32EL-NEXT: ori $5, $1, 9 4909; MIPS32EL-NEXT: sw $5, 28($sp) 4910; MIPS32EL-NEXT: lui $1, 8 4911; MIPS32EL-NEXT: ori $1, $1, 12 4912; MIPS32EL-NEXT: sw $1, 24($sp) 4913; MIPS32EL-NEXT: sw $5, 20($sp) 4914; MIPS32EL-NEXT: lui $1, 7 4915; MIPS32EL-NEXT: ori $4, $1, 6 4916; MIPS32EL-NEXT: sw $4, 16($sp) 4917; MIPS32EL-NEXT: move $6, $4 4918; MIPS32EL-NEXT: move $7, $5 4919; MIPS32EL-NEXT: jal i16_8 4920; MIPS32EL-NEXT: nop 4921; MIPS32EL-NEXT: lui $1, %hi(gv8i16) 4922; MIPS32EL-NEXT: addiu $6, $1, %lo(gv8i16) 4923; MIPS32EL-NEXT: sw $5, 12($6) 4924; MIPS32EL-NEXT: sw $4, 8($6) 4925; MIPS32EL-NEXT: sw $3, 4($6) 4926; MIPS32EL-NEXT: sw $2, %lo(gv8i16)($1) 4927; MIPS32EL-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload 4928; MIPS32EL-NEXT: addiu $sp, $sp, 40 4929; MIPS32EL-NEXT: jr $ra 4930; MIPS32EL-NEXT: nop 4931; 4932; MIPS64EL-LABEL: calli16_8: 4933; MIPS64EL: # %bb.0: # %entry 4934; MIPS64EL-NEXT: daddiu $sp, $sp, -16 4935; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 4936; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 4937; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 4938; MIPS64EL-NEXT: .cfi_offset 31, -8 4939; MIPS64EL-NEXT: .cfi_offset 28, -16 4940; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_8))) 4941; MIPS64EL-NEXT: daddu $1, $1, $25 4942; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_8))) 4943; MIPS64EL-NEXT: lui $1, 10 4944; MIPS64EL-NEXT: daddiu $1, $1, 9 4945; MIPS64EL-NEXT: dsll $1, $1, 16 4946; MIPS64EL-NEXT: daddiu $1, $1, 7 4947; MIPS64EL-NEXT: dsll $1, $1, 16 4948; MIPS64EL-NEXT: daddiu $4, $1, 6 4949; MIPS64EL-NEXT: lui $1, 1 4950; MIPS64EL-NEXT: daddiu $1, $1, 16385 4951; MIPS64EL-NEXT: dsll $1, $1, 16 4952; MIPS64EL-NEXT: daddiu $1, $1, 8193 4953; MIPS64EL-NEXT: dsll $1, $1, 19 4954; MIPS64EL-NEXT: daddiu $7, $1, 12 4955; MIPS64EL-NEXT: ld $25, %call16(i16_8)($gp) 4956; MIPS64EL-NEXT: move $5, $4 4957; MIPS64EL-NEXT: move $6, $4 4958; MIPS64EL-NEXT: jalr $25 4959; MIPS64EL-NEXT: nop 4960; MIPS64EL-NEXT: ld $1, %got_disp(gv8i16)($gp) 4961; MIPS64EL-NEXT: sd $3, 8($1) 4962; MIPS64EL-NEXT: sd $2, 0($1) 4963; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 4964; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 4965; MIPS64EL-NEXT: daddiu $sp, $sp, 16 4966; MIPS64EL-NEXT: jr $ra 4967; MIPS64EL-NEXT: nop 4968; 4969; MIPS32R5EL-LABEL: calli16_8: 4970; MIPS32R5EL: # %bb.0: # %entry 4971; MIPS32R5EL-NEXT: addiu $sp, $sp, -40 4972; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 40 4973; MIPS32R5EL-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill 4974; MIPS32R5EL-NEXT: .cfi_offset 31, -4 4975; MIPS32R5EL-NEXT: lui $1, 10 4976; MIPS32R5EL-NEXT: ori $1, $1, 9 4977; MIPS32R5EL-NEXT: lui $2, 7 4978; MIPS32R5EL-NEXT: ori $2, $2, 6 4979; MIPS32R5EL-NEXT: fill.w $w0, $2 4980; MIPS32R5EL-NEXT: insert.w $w0[1], $1 4981; MIPS32R5EL-NEXT: splati.d $w0, $w0[0] 4982; MIPS32R5EL-NEXT: copy_s.w $4, $w0[0] 4983; MIPS32R5EL-NEXT: copy_s.w $5, $w0[1] 4984; MIPS32R5EL-NEXT: copy_s.w $6, $w0[2] 4985; MIPS32R5EL-NEXT: copy_s.w $7, $w0[3] 4986; MIPS32R5EL-NEXT: lui $1, %hi($CPI33_0) 4987; MIPS32R5EL-NEXT: addiu $1, $1, %lo($CPI33_0) 4988; MIPS32R5EL-NEXT: ld.w $w0, 0($1) 4989; MIPS32R5EL-NEXT: copy_s.w $1, $w0[0] 4990; MIPS32R5EL-NEXT: copy_s.w $2, $w0[1] 4991; MIPS32R5EL-NEXT: copy_s.w $3, $w0[2] 4992; MIPS32R5EL-NEXT: copy_s.w $8, $w0[3] 4993; MIPS32R5EL-NEXT: sw $8, 28($sp) 4994; MIPS32R5EL-NEXT: sw $3, 24($sp) 4995; MIPS32R5EL-NEXT: sw $2, 20($sp) 4996; MIPS32R5EL-NEXT: sw $1, 16($sp) 4997; MIPS32R5EL-NEXT: jal i16_8 4998; MIPS32R5EL-NEXT: nop 4999; MIPS32R5EL-NEXT: lui $1, %hi(gv8i16) 5000; MIPS32R5EL-NEXT: addiu $1, $1, %lo(gv8i16) 5001; MIPS32R5EL-NEXT: insert.w $w0[0], $2 5002; MIPS32R5EL-NEXT: insert.w $w0[1], $3 5003; MIPS32R5EL-NEXT: insert.w $w0[2], $4 5004; MIPS32R5EL-NEXT: insert.w $w0[3], $5 5005; MIPS32R5EL-NEXT: st.w $w0, 0($1) 5006; MIPS32R5EL-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload 5007; MIPS32R5EL-NEXT: addiu $sp, $sp, 40 5008; MIPS32R5EL-NEXT: jr $ra 5009; MIPS32R5EL-NEXT: nop 5010; 5011; MIPS64R5EL-LABEL: calli16_8: 5012; MIPS64R5EL: # %bb.0: # %entry 5013; MIPS64R5EL-NEXT: daddiu $sp, $sp, -16 5014; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 16 5015; MIPS64R5EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 5016; MIPS64R5EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 5017; MIPS64R5EL-NEXT: .cfi_offset 31, -8 5018; MIPS64R5EL-NEXT: .cfi_offset 28, -16 5019; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli16_8))) 5020; MIPS64R5EL-NEXT: daddu $1, $1, $25 5021; MIPS64R5EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli16_8))) 5022; MIPS64R5EL-NEXT: lui $1, 7 5023; MIPS64R5EL-NEXT: ori $1, $1, 6 5024; MIPS64R5EL-NEXT: lui $2, 10 5025; MIPS64R5EL-NEXT: ori $2, $2, 9 5026; MIPS64R5EL-NEXT: dinsu $1, $2, 32, 32 5027; MIPS64R5EL-NEXT: fill.d $w0, $1 5028; MIPS64R5EL-NEXT: copy_s.d $4, $w0[0] 5029; MIPS64R5EL-NEXT: copy_s.d $5, $w0[1] 5030; MIPS64R5EL-NEXT: ld $1, %got_page(.LCPI33_0)($gp) 5031; MIPS64R5EL-NEXT: daddiu $1, $1, %got_ofst(.LCPI33_0) 5032; MIPS64R5EL-NEXT: ld.d $w0, 0($1) 5033; MIPS64R5EL-NEXT: copy_s.d $6, $w0[0] 5034; MIPS64R5EL-NEXT: copy_s.d $7, $w0[1] 5035; MIPS64R5EL-NEXT: ld $25, %call16(i16_8)($gp) 5036; MIPS64R5EL-NEXT: jalr $25 5037; MIPS64R5EL-NEXT: nop 5038; MIPS64R5EL-NEXT: ld $1, %got_disp(gv8i16)($gp) 5039; MIPS64R5EL-NEXT: insert.d $w0[0], $2 5040; MIPS64R5EL-NEXT: insert.d $w0[1], $3 5041; MIPS64R5EL-NEXT: st.d $w0, 0($1) 5042; MIPS64R5EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 5043; MIPS64R5EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 5044; MIPS64R5EL-NEXT: daddiu $sp, $sp, 16 5045; MIPS64R5EL-NEXT: jr $ra 5046; MIPS64R5EL-NEXT: nop 5047entry: 5048 %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>) 5049 store <8 x i16> %0, <8 x i16> * @gv8i16 5050 ret void 5051} 5052 5053define void @calli32_2() { 5054; MIPS32-LABEL: calli32_2: 5055; MIPS32: # %bb.0: # %entry 5056; MIPS32-NEXT: addiu $sp, $sp, -24 5057; MIPS32-NEXT: .cfi_def_cfa_offset 24 5058; MIPS32-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 5059; MIPS32-NEXT: .cfi_offset 31, -4 5060; MIPS32-NEXT: addiu $4, $zero, 6 5061; MIPS32-NEXT: addiu $5, $zero, 7 5062; MIPS32-NEXT: addiu $6, $zero, 12 5063; MIPS32-NEXT: addiu $7, $zero, 8 5064; MIPS32-NEXT: jal i32_2 5065; MIPS32-NEXT: nop 5066; MIPS32-NEXT: lui $1, %hi(gv2i32) 5067; MIPS32-NEXT: addiu $4, $1, %lo(gv2i32) 5068; MIPS32-NEXT: sw $3, 4($4) 5069; MIPS32-NEXT: sw $2, %lo(gv2i32)($1) 5070; MIPS32-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 5071; MIPS32-NEXT: addiu $sp, $sp, 24 5072; MIPS32-NEXT: jr $ra 5073; MIPS32-NEXT: nop 5074; 5075; MIPS64EB-LABEL: calli32_2: 5076; MIPS64EB: # %bb.0: # %entry 5077; MIPS64EB-NEXT: daddiu $sp, $sp, -16 5078; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 5079; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 5080; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 5081; MIPS64EB-NEXT: .cfi_offset 31, -8 5082; MIPS64EB-NEXT: .cfi_offset 28, -16 5083; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli32_2))) 5084; MIPS64EB-NEXT: daddu $1, $1, $25 5085; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli32_2))) 5086; MIPS64EB-NEXT: daddiu $1, $zero, 3 5087; MIPS64EB-NEXT: dsll $2, $1, 33 5088; MIPS64EB-NEXT: daddiu $4, $2, 7 5089; MIPS64EB-NEXT: dsll $1, $1, 34 5090; MIPS64EB-NEXT: daddiu $5, $1, 8 5091; MIPS64EB-NEXT: ld $25, %call16(i32_2)($gp) 5092; MIPS64EB-NEXT: jalr $25 5093; MIPS64EB-NEXT: nop 5094; MIPS64EB-NEXT: ld $1, %got_disp(gv2i32)($gp) 5095; MIPS64EB-NEXT: sd $2, 0($1) 5096; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 5097; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 5098; MIPS64EB-NEXT: daddiu $sp, $sp, 16 5099; MIPS64EB-NEXT: jr $ra 5100; MIPS64EB-NEXT: nop 5101; 5102; MIPS32R5-LABEL: calli32_2: 5103; MIPS32R5: # %bb.0: # %entry 5104; MIPS32R5-NEXT: addiu $sp, $sp, -24 5105; MIPS32R5-NEXT: .cfi_def_cfa_offset 24 5106; MIPS32R5-NEXT: sw $ra, 20($sp) # 4-byte Folded Spill 5107; MIPS32R5-NEXT: .cfi_offset 31, -4 5108; MIPS32R5-NEXT: addiu $4, $zero, 6 5109; MIPS32R5-NEXT: addiu $5, $zero, 7 5110; MIPS32R5-NEXT: addiu $6, $zero, 12 5111; MIPS32R5-NEXT: addiu $7, $zero, 8 5112; MIPS32R5-NEXT: jal i32_2 5113; MIPS32R5-NEXT: nop 5114; MIPS32R5-NEXT: lui $1, %hi(gv2i32) 5115; MIPS32R5-NEXT: addiu $4, $1, %lo(gv2i32) 5116; MIPS32R5-NEXT: sw $3, 4($4) 5117; MIPS32R5-NEXT: sw $2, %lo(gv2i32)($1) 5118; MIPS32R5-NEXT: lw $ra, 20($sp) # 4-byte Folded Reload 5119; MIPS32R5-NEXT: addiu $sp, $sp, 24 5120; MIPS32R5-NEXT: jr $ra 5121; MIPS32R5-NEXT: nop 5122; 5123; MIPS64R5EB-LABEL: calli32_2: 5124; MIPS64R5EB: # %bb.0: # %entry 5125; MIPS64R5EB-NEXT: daddiu $sp, $sp, -32 5126; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 32 5127; MIPS64R5EB-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill 5128; MIPS64R5EB-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill 5129; MIPS64R5EB-NEXT: .cfi_offset 31, -8 5130; MIPS64R5EB-NEXT: .cfi_offset 28, -16 5131; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli32_2))) 5132; MIPS64R5EB-NEXT: daddu $1, $1, $25 5133; MIPS64R5EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli32_2))) 5134; MIPS64R5EB-NEXT: daddiu $1, $zero, 3 5135; MIPS64R5EB-NEXT: dsll $2, $1, 33 5136; MIPS64R5EB-NEXT: daddiu $4, $2, 7 5137; MIPS64R5EB-NEXT: dsll $1, $1, 34 5138; MIPS64R5EB-NEXT: daddiu $5, $1, 8 5139; MIPS64R5EB-NEXT: ld $25, %call16(i32_2)($gp) 5140; MIPS64R5EB-NEXT: jalr $25 5141; MIPS64R5EB-NEXT: nop 5142; MIPS64R5EB-NEXT: ld $1, %got_disp(gv2i32)($gp) 5143; MIPS64R5EB-NEXT: sd $2, 0($1) 5144; MIPS64R5EB-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload 5145; MIPS64R5EB-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload 5146; MIPS64R5EB-NEXT: daddiu $sp, $sp, 32 5147; MIPS64R5EB-NEXT: jr $ra 5148; MIPS64R5EB-NEXT: nop 5149; 5150; MIPS64EL-LABEL: calli32_2: 5151; MIPS64EL: # %bb.0: # %entry 5152; MIPS64EL-NEXT: daddiu $sp, $sp, -16 5153; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 5154; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 5155; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 5156; MIPS64EL-NEXT: .cfi_offset 31, -8 5157; MIPS64EL-NEXT: .cfi_offset 28, -16 5158; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli32_2))) 5159; MIPS64EL-NEXT: daddu $1, $1, $25 5160; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli32_2))) 5161; MIPS64EL-NEXT: daddiu $1, $zero, 7 5162; MIPS64EL-NEXT: dsll $1, $1, 32 5163; MIPS64EL-NEXT: daddiu $4, $1, 6 5164; MIPS64EL-NEXT: daddiu $1, $zero, 1 5165; MIPS64EL-NEXT: dsll $1, $1, 35 5166; MIPS64EL-NEXT: daddiu $5, $1, 12 5167; MIPS64EL-NEXT: ld $25, %call16(i32_2)($gp) 5168; MIPS64EL-NEXT: jalr $25 5169; MIPS64EL-NEXT: nop 5170; MIPS64EL-NEXT: ld $1, %got_disp(gv2i32)($gp) 5171; MIPS64EL-NEXT: sd $2, 0($1) 5172; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 5173; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 5174; MIPS64EL-NEXT: daddiu $sp, $sp, 16 5175; MIPS64EL-NEXT: jr $ra 5176; MIPS64EL-NEXT: nop 5177; 5178; MIPS64R5EL-LABEL: calli32_2: 5179; MIPS64R5EL: # %bb.0: # %entry 5180; MIPS64R5EL-NEXT: daddiu $sp, $sp, -32 5181; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 32 5182; MIPS64R5EL-NEXT: sd $ra, 24($sp) # 8-byte Folded Spill 5183; MIPS64R5EL-NEXT: sd $gp, 16($sp) # 8-byte Folded Spill 5184; MIPS64R5EL-NEXT: .cfi_offset 31, -8 5185; MIPS64R5EL-NEXT: .cfi_offset 28, -16 5186; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli32_2))) 5187; MIPS64R5EL-NEXT: daddu $1, $1, $25 5188; MIPS64R5EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli32_2))) 5189; MIPS64R5EL-NEXT: daddiu $1, $zero, 7 5190; MIPS64R5EL-NEXT: dsll $1, $1, 32 5191; MIPS64R5EL-NEXT: daddiu $4, $1, 6 5192; MIPS64R5EL-NEXT: daddiu $1, $zero, 1 5193; MIPS64R5EL-NEXT: dsll $1, $1, 35 5194; MIPS64R5EL-NEXT: daddiu $5, $1, 12 5195; MIPS64R5EL-NEXT: ld $25, %call16(i32_2)($gp) 5196; MIPS64R5EL-NEXT: jalr $25 5197; MIPS64R5EL-NEXT: nop 5198; MIPS64R5EL-NEXT: ld $1, %got_disp(gv2i32)($gp) 5199; MIPS64R5EL-NEXT: sd $2, 0($1) 5200; MIPS64R5EL-NEXT: ld $gp, 16($sp) # 8-byte Folded Reload 5201; MIPS64R5EL-NEXT: ld $ra, 24($sp) # 8-byte Folded Reload 5202; MIPS64R5EL-NEXT: daddiu $sp, $sp, 32 5203; MIPS64R5EL-NEXT: jr $ra 5204; MIPS64R5EL-NEXT: nop 5205entry: 5206 %0 = call <2 x i32> @i32_2(<2 x i32> <i32 6, i32 7>, <2 x i32> <i32 12, i32 8>) 5207 store <2 x i32> %0, <2 x i32> * @gv2i32 5208 ret void 5209} 5210 5211define void @calli32_4() { 5212; MIPS32-LABEL: calli32_4: 5213; MIPS32: # %bb.0: # %entry 5214; MIPS32-NEXT: addiu $sp, $sp, -40 5215; MIPS32-NEXT: .cfi_def_cfa_offset 40 5216; MIPS32-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill 5217; MIPS32-NEXT: .cfi_offset 31, -4 5218; MIPS32-NEXT: addiu $1, $zero, 9 5219; MIPS32-NEXT: addiu $2, $zero, 10 5220; MIPS32-NEXT: sw $2, 28($sp) 5221; MIPS32-NEXT: sw $1, 24($sp) 5222; MIPS32-NEXT: addiu $1, $zero, 8 5223; MIPS32-NEXT: sw $1, 20($sp) 5224; MIPS32-NEXT: addiu $1, $zero, 12 5225; MIPS32-NEXT: sw $1, 16($sp) 5226; MIPS32-NEXT: addiu $4, $zero, 6 5227; MIPS32-NEXT: addiu $5, $zero, 7 5228; MIPS32-NEXT: addiu $6, $zero, 9 5229; MIPS32-NEXT: addiu $7, $zero, 10 5230; MIPS32-NEXT: jal i32_4 5231; MIPS32-NEXT: nop 5232; MIPS32-NEXT: lui $1, %hi(gv4i32) 5233; MIPS32-NEXT: addiu $6, $1, %lo(gv4i32) 5234; MIPS32-NEXT: sw $5, 12($6) 5235; MIPS32-NEXT: sw $4, 8($6) 5236; MIPS32-NEXT: sw $3, 4($6) 5237; MIPS32-NEXT: sw $2, %lo(gv4i32)($1) 5238; MIPS32-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload 5239; MIPS32-NEXT: addiu $sp, $sp, 40 5240; MIPS32-NEXT: jr $ra 5241; MIPS32-NEXT: nop 5242; 5243; MIPS64EB-LABEL: calli32_4: 5244; MIPS64EB: # %bb.0: # %entry 5245; MIPS64EB-NEXT: daddiu $sp, $sp, -16 5246; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 5247; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 5248; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 5249; MIPS64EB-NEXT: .cfi_offset 31, -8 5250; MIPS64EB-NEXT: .cfi_offset 28, -16 5251; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(calli32_4))) 5252; MIPS64EB-NEXT: daddu $1, $1, $25 5253; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli32_4))) 5254; MIPS64EB-NEXT: daddiu $1, $zero, 3 5255; MIPS64EB-NEXT: dsll $2, $1, 33 5256; MIPS64EB-NEXT: daddiu $4, $2, 7 5257; MIPS64EB-NEXT: dsll $1, $1, 34 5258; MIPS64EB-NEXT: daddiu $6, $1, 8 5259; MIPS64EB-NEXT: daddiu $1, $zero, 9 5260; MIPS64EB-NEXT: dsll $1, $1, 32 5261; MIPS64EB-NEXT: daddiu $5, $1, 10 5262; MIPS64EB-NEXT: ld $25, %call16(i32_4)($gp) 5263; MIPS64EB-NEXT: move $7, $5 5264; MIPS64EB-NEXT: jalr $25 5265; MIPS64EB-NEXT: nop 5266; MIPS64EB-NEXT: ld $1, %got_disp(gv4i32)($gp) 5267; MIPS64EB-NEXT: sd $3, 8($1) 5268; MIPS64EB-NEXT: sd $2, 0($1) 5269; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 5270; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 5271; MIPS64EB-NEXT: daddiu $sp, $sp, 16 5272; MIPS64EB-NEXT: jr $ra 5273; MIPS64EB-NEXT: nop 5274; 5275; MIPS32R5-LABEL: calli32_4: 5276; MIPS32R5: # %bb.0: # %entry 5277; MIPS32R5-NEXT: addiu $sp, $sp, -40 5278; MIPS32R5-NEXT: .cfi_def_cfa_offset 40 5279; MIPS32R5-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill 5280; MIPS32R5-NEXT: .cfi_offset 31, -4 5281; MIPS32R5-NEXT: addiu $1, $zero, 9 5282; MIPS32R5-NEXT: addiu $2, $zero, 10 5283; MIPS32R5-NEXT: sw $2, 28($sp) 5284; MIPS32R5-NEXT: sw $1, 24($sp) 5285; MIPS32R5-NEXT: addiu $1, $zero, 8 5286; MIPS32R5-NEXT: sw $1, 20($sp) 5287; MIPS32R5-NEXT: addiu $1, $zero, 12 5288; MIPS32R5-NEXT: sw $1, 16($sp) 5289; MIPS32R5-NEXT: addiu $4, $zero, 6 5290; MIPS32R5-NEXT: addiu $5, $zero, 7 5291; MIPS32R5-NEXT: addiu $6, $zero, 9 5292; MIPS32R5-NEXT: addiu $7, $zero, 10 5293; MIPS32R5-NEXT: jal i32_4 5294; MIPS32R5-NEXT: nop 5295; MIPS32R5-NEXT: insert.w $w0[0], $2 5296; MIPS32R5-NEXT: insert.w $w0[1], $3 5297; MIPS32R5-NEXT: insert.w $w0[2], $4 5298; MIPS32R5-NEXT: lui $1, %hi(gv4i32) 5299; MIPS32R5-NEXT: insert.w $w0[3], $5 5300; MIPS32R5-NEXT: addiu $1, $1, %lo(gv4i32) 5301; MIPS32R5-NEXT: st.w $w0, 0($1) 5302; MIPS32R5-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload 5303; MIPS32R5-NEXT: addiu $sp, $sp, 40 5304; MIPS32R5-NEXT: jr $ra 5305; MIPS32R5-NEXT: nop 5306; 5307; MIPS64R5-LABEL: calli32_4: 5308; MIPS64R5: # %bb.0: # %entry 5309; MIPS64R5-NEXT: daddiu $sp, $sp, -16 5310; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 5311; MIPS64R5-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 5312; MIPS64R5-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 5313; MIPS64R5-NEXT: .cfi_offset 31, -8 5314; MIPS64R5-NEXT: .cfi_offset 28, -16 5315; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(calli32_4))) 5316; MIPS64R5-NEXT: daddu $1, $1, $25 5317; MIPS64R5-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli32_4))) 5318; MIPS64R5-NEXT: ld $1, %got_page(.LCPI35_0)($gp) 5319; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI35_0) 5320; MIPS64R5-NEXT: ld.d $w0, 0($1) 5321; MIPS64R5-NEXT: copy_s.d $4, $w0[0] 5322; MIPS64R5-NEXT: copy_s.d $5, $w0[1] 5323; MIPS64R5-NEXT: ld $1, %got_page(.LCPI35_1)($gp) 5324; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI35_1) 5325; MIPS64R5-NEXT: ld.d $w0, 0($1) 5326; MIPS64R5-NEXT: copy_s.d $6, $w0[0] 5327; MIPS64R5-NEXT: copy_s.d $7, $w0[1] 5328; MIPS64R5-NEXT: ld $25, %call16(i32_4)($gp) 5329; MIPS64R5-NEXT: jalr $25 5330; MIPS64R5-NEXT: nop 5331; MIPS64R5-NEXT: insert.d $w0[0], $2 5332; MIPS64R5-NEXT: insert.d $w0[1], $3 5333; MIPS64R5-NEXT: ld $1, %got_disp(gv4i32)($gp) 5334; MIPS64R5-NEXT: st.d $w0, 0($1) 5335; MIPS64R5-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 5336; MIPS64R5-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 5337; MIPS64R5-NEXT: daddiu $sp, $sp, 16 5338; MIPS64R5-NEXT: jr $ra 5339; MIPS64R5-NEXT: nop 5340; 5341; MIPS64EL-LABEL: calli32_4: 5342; MIPS64EL: # %bb.0: # %entry 5343; MIPS64EL-NEXT: daddiu $sp, $sp, -16 5344; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 5345; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 5346; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 5347; MIPS64EL-NEXT: .cfi_offset 31, -8 5348; MIPS64EL-NEXT: .cfi_offset 28, -16 5349; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(calli32_4))) 5350; MIPS64EL-NEXT: daddu $1, $1, $25 5351; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli32_4))) 5352; MIPS64EL-NEXT: daddiu $1, $zero, 7 5353; MIPS64EL-NEXT: dsll $1, $1, 32 5354; MIPS64EL-NEXT: daddiu $4, $1, 6 5355; MIPS64EL-NEXT: daddiu $1, $zero, 1 5356; MIPS64EL-NEXT: dsll $1, $1, 35 5357; MIPS64EL-NEXT: daddiu $6, $1, 12 5358; MIPS64EL-NEXT: daddiu $1, $zero, 5 5359; MIPS64EL-NEXT: dsll $1, $1, 33 5360; MIPS64EL-NEXT: daddiu $5, $1, 9 5361; MIPS64EL-NEXT: ld $25, %call16(i32_4)($gp) 5362; MIPS64EL-NEXT: move $7, $5 5363; MIPS64EL-NEXT: jalr $25 5364; MIPS64EL-NEXT: nop 5365; MIPS64EL-NEXT: ld $1, %got_disp(gv4i32)($gp) 5366; MIPS64EL-NEXT: sd $3, 8($1) 5367; MIPS64EL-NEXT: sd $2, 0($1) 5368; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 5369; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 5370; MIPS64EL-NEXT: daddiu $sp, $sp, 16 5371; MIPS64EL-NEXT: jr $ra 5372; MIPS64EL-NEXT: nop 5373entry: 5374 %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>) 5375 store <4 x i32> %0, <4 x i32> * @gv4i32 5376 ret void 5377} 5378 5379define void @calli64_2() { 5380; MIPS32EB-LABEL: calli64_2: 5381; MIPS32EB: # %bb.0: # %entry 5382; MIPS32EB-NEXT: addiu $sp, $sp, -40 5383; MIPS32EB-NEXT: .cfi_def_cfa_offset 40 5384; MIPS32EB-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill 5385; MIPS32EB-NEXT: .cfi_offset 31, -4 5386; MIPS32EB-NEXT: addiu $1, $zero, 8 5387; MIPS32EB-NEXT: sw $1, 28($sp) 5388; MIPS32EB-NEXT: addiu $1, $zero, 12 5389; MIPS32EB-NEXT: sw $1, 20($sp) 5390; MIPS32EB-NEXT: sw $zero, 24($sp) 5391; MIPS32EB-NEXT: sw $zero, 16($sp) 5392; MIPS32EB-NEXT: addiu $4, $zero, 0 5393; MIPS32EB-NEXT: addiu $5, $zero, 6 5394; MIPS32EB-NEXT: addiu $6, $zero, 0 5395; MIPS32EB-NEXT: addiu $7, $zero, 7 5396; MIPS32EB-NEXT: jal i64_2 5397; MIPS32EB-NEXT: nop 5398; MIPS32EB-NEXT: lui $1, %hi(gv2i64) 5399; MIPS32EB-NEXT: addiu $6, $1, %lo(gv2i64) 5400; MIPS32EB-NEXT: sw $5, 12($6) 5401; MIPS32EB-NEXT: sw $4, 8($6) 5402; MIPS32EB-NEXT: sw $3, 4($6) 5403; MIPS32EB-NEXT: sw $2, %lo(gv2i64)($1) 5404; MIPS32EB-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload 5405; MIPS32EB-NEXT: addiu $sp, $sp, 40 5406; MIPS32EB-NEXT: jr $ra 5407; MIPS32EB-NEXT: nop 5408; 5409; MIPS64-LABEL: calli64_2: 5410; MIPS64: # %bb.0: # %entry 5411; MIPS64-NEXT: daddiu $sp, $sp, -16 5412; MIPS64-NEXT: .cfi_def_cfa_offset 16 5413; MIPS64-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 5414; MIPS64-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 5415; MIPS64-NEXT: .cfi_offset 31, -8 5416; MIPS64-NEXT: .cfi_offset 28, -16 5417; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(calli64_2))) 5418; MIPS64-NEXT: daddu $1, $1, $25 5419; MIPS64-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli64_2))) 5420; MIPS64-NEXT: ld $25, %call16(i64_2)($gp) 5421; MIPS64-NEXT: daddiu $4, $zero, 6 5422; MIPS64-NEXT: daddiu $5, $zero, 7 5423; MIPS64-NEXT: daddiu $6, $zero, 12 5424; MIPS64-NEXT: daddiu $7, $zero, 8 5425; MIPS64-NEXT: jalr $25 5426; MIPS64-NEXT: nop 5427; MIPS64-NEXT: ld $1, %got_disp(gv2i64)($gp) 5428; MIPS64-NEXT: sd $3, 8($1) 5429; MIPS64-NEXT: sd $2, 0($1) 5430; MIPS64-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 5431; MIPS64-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 5432; MIPS64-NEXT: daddiu $sp, $sp, 16 5433; MIPS64-NEXT: jr $ra 5434; MIPS64-NEXT: nop 5435; 5436; MIPS32R5-LABEL: calli64_2: 5437; MIPS32R5: # %bb.0: # %entry 5438; MIPS32R5-NEXT: addiu $sp, $sp, -40 5439; MIPS32R5-NEXT: .cfi_def_cfa_offset 40 5440; MIPS32R5-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill 5441; MIPS32R5-NEXT: .cfi_offset 31, -4 5442; MIPS32R5-NEXT: lui $1, %hi($CPI36_0) 5443; MIPS32R5-NEXT: addiu $1, $1, %lo($CPI36_0) 5444; MIPS32R5-NEXT: ld.w $w0, 0($1) 5445; MIPS32R5-NEXT: copy_s.w $4, $w0[0] 5446; MIPS32R5-NEXT: copy_s.w $5, $w0[1] 5447; MIPS32R5-NEXT: copy_s.w $6, $w0[2] 5448; MIPS32R5-NEXT: copy_s.w $7, $w0[3] 5449; MIPS32R5-NEXT: lui $1, %hi($CPI36_1) 5450; MIPS32R5-NEXT: addiu $1, $1, %lo($CPI36_1) 5451; MIPS32R5-NEXT: ld.w $w0, 0($1) 5452; MIPS32R5-NEXT: copy_s.w $1, $w0[0] 5453; MIPS32R5-NEXT: copy_s.w $2, $w0[1] 5454; MIPS32R5-NEXT: copy_s.w $3, $w0[2] 5455; MIPS32R5-NEXT: copy_s.w $8, $w0[3] 5456; MIPS32R5-NEXT: sw $8, 28($sp) 5457; MIPS32R5-NEXT: sw $3, 24($sp) 5458; MIPS32R5-NEXT: sw $2, 20($sp) 5459; MIPS32R5-NEXT: sw $1, 16($sp) 5460; MIPS32R5-NEXT: jal i64_2 5461; MIPS32R5-NEXT: nop 5462; MIPS32R5-NEXT: lui $1, %hi(gv2i64) 5463; MIPS32R5-NEXT: insert.w $w0[0], $2 5464; MIPS32R5-NEXT: insert.w $w0[1], $3 5465; MIPS32R5-NEXT: addiu $1, $1, %lo(gv2i64) 5466; MIPS32R5-NEXT: insert.w $w0[2], $4 5467; MIPS32R5-NEXT: insert.w $w0[3], $5 5468; MIPS32R5-NEXT: st.w $w0, 0($1) 5469; MIPS32R5-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload 5470; MIPS32R5-NEXT: addiu $sp, $sp, 40 5471; MIPS32R5-NEXT: jr $ra 5472; MIPS32R5-NEXT: nop 5473; 5474; MIPS64R5-LABEL: calli64_2: 5475; MIPS64R5: # %bb.0: # %entry 5476; MIPS64R5-NEXT: daddiu $sp, $sp, -16 5477; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 5478; MIPS64R5-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 5479; MIPS64R5-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 5480; MIPS64R5-NEXT: .cfi_offset 31, -8 5481; MIPS64R5-NEXT: .cfi_offset 28, -16 5482; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(calli64_2))) 5483; MIPS64R5-NEXT: daddu $1, $1, $25 5484; MIPS64R5-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calli64_2))) 5485; MIPS64R5-NEXT: ld $25, %call16(i64_2)($gp) 5486; MIPS64R5-NEXT: daddiu $4, $zero, 6 5487; MIPS64R5-NEXT: daddiu $5, $zero, 7 5488; MIPS64R5-NEXT: daddiu $6, $zero, 12 5489; MIPS64R5-NEXT: daddiu $7, $zero, 8 5490; MIPS64R5-NEXT: jalr $25 5491; MIPS64R5-NEXT: nop 5492; MIPS64R5-NEXT: insert.d $w0[0], $2 5493; MIPS64R5-NEXT: insert.d $w0[1], $3 5494; MIPS64R5-NEXT: ld $1, %got_disp(gv2i64)($gp) 5495; MIPS64R5-NEXT: st.d $w0, 0($1) 5496; MIPS64R5-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 5497; MIPS64R5-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 5498; MIPS64R5-NEXT: daddiu $sp, $sp, 16 5499; MIPS64R5-NEXT: jr $ra 5500; MIPS64R5-NEXT: nop 5501; 5502; MIPS32EL-LABEL: calli64_2: 5503; MIPS32EL: # %bb.0: # %entry 5504; MIPS32EL-NEXT: addiu $sp, $sp, -40 5505; MIPS32EL-NEXT: .cfi_def_cfa_offset 40 5506; MIPS32EL-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill 5507; MIPS32EL-NEXT: .cfi_offset 31, -4 5508; MIPS32EL-NEXT: addiu $1, $zero, 8 5509; MIPS32EL-NEXT: sw $1, 24($sp) 5510; MIPS32EL-NEXT: addiu $1, $zero, 12 5511; MIPS32EL-NEXT: sw $1, 16($sp) 5512; MIPS32EL-NEXT: sw $zero, 28($sp) 5513; MIPS32EL-NEXT: sw $zero, 20($sp) 5514; MIPS32EL-NEXT: addiu $4, $zero, 6 5515; MIPS32EL-NEXT: addiu $5, $zero, 0 5516; MIPS32EL-NEXT: addiu $6, $zero, 7 5517; MIPS32EL-NEXT: addiu $7, $zero, 0 5518; MIPS32EL-NEXT: jal i64_2 5519; MIPS32EL-NEXT: nop 5520; MIPS32EL-NEXT: lui $1, %hi(gv2i64) 5521; MIPS32EL-NEXT: addiu $6, $1, %lo(gv2i64) 5522; MIPS32EL-NEXT: sw $5, 12($6) 5523; MIPS32EL-NEXT: sw $4, 8($6) 5524; MIPS32EL-NEXT: sw $3, 4($6) 5525; MIPS32EL-NEXT: sw $2, %lo(gv2i64)($1) 5526; MIPS32EL-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload 5527; MIPS32EL-NEXT: addiu $sp, $sp, 40 5528; MIPS32EL-NEXT: jr $ra 5529; MIPS32EL-NEXT: nop 5530entry: 5531 %0 = call <2 x i64> @i64_2(<2 x i64> <i64 6, i64 7>, <2 x i64> <i64 12, i64 8>) 5532 store <2 x i64> %0, <2 x i64> * @gv2i64 5533 ret void 5534} 5535 5536declare <2 x float> @float2_extern(<2 x float>, <2 x float>) 5537declare <4 x float> @float4_extern(<4 x float>, <4 x float>) 5538declare <2 x double> @double2_extern(<2 x double>, <2 x double>) 5539 5540define void @callfloat_2() { 5541; MIPS32-LABEL: callfloat_2: 5542; MIPS32: # %bb.0: # %entry 5543; MIPS32-NEXT: addiu $sp, $sp, -40 5544; MIPS32-NEXT: .cfi_def_cfa_offset 40 5545; MIPS32-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill 5546; MIPS32-NEXT: .cfi_offset 31, -4 5547; MIPS32-NEXT: lui $1, 16736 5548; MIPS32-NEXT: sw $1, 20($sp) 5549; MIPS32-NEXT: lui $1, 16704 5550; MIPS32-NEXT: sw $1, 16($sp) 5551; MIPS32-NEXT: addiu $4, $sp, 24 5552; MIPS32-NEXT: addiu $6, $zero, 0 5553; MIPS32-NEXT: lui $7, 49024 5554; MIPS32-NEXT: jal float2_extern 5555; MIPS32-NEXT: nop 5556; MIPS32-NEXT: lui $1, %hi(gv2f32) 5557; MIPS32-NEXT: addiu $2, $1, %lo(gv2f32) 5558; MIPS32-NEXT: lwc1 $f0, 28($sp) 5559; MIPS32-NEXT: swc1 $f0, 4($2) 5560; MIPS32-NEXT: lwc1 $f0, 24($sp) 5561; MIPS32-NEXT: swc1 $f0, %lo(gv2f32)($1) 5562; MIPS32-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload 5563; MIPS32-NEXT: addiu $sp, $sp, 40 5564; MIPS32-NEXT: jr $ra 5565; MIPS32-NEXT: nop 5566; 5567; MIPS64EB-LABEL: callfloat_2: 5568; MIPS64EB: # %bb.0: # %entry 5569; MIPS64EB-NEXT: daddiu $sp, $sp, -16 5570; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 5571; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 5572; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 5573; MIPS64EB-NEXT: .cfi_offset 31, -8 5574; MIPS64EB-NEXT: .cfi_offset 28, -16 5575; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(callfloat_2))) 5576; MIPS64EB-NEXT: daddu $1, $1, $25 5577; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(callfloat_2))) 5578; MIPS64EB-NEXT: daddiu $1, $zero, 383 5579; MIPS64EB-NEXT: dsll $4, $1, 23 5580; MIPS64EB-NEXT: daddiu $1, $zero, 261 5581; MIPS64EB-NEXT: dsll $1, $1, 33 5582; MIPS64EB-NEXT: daddiu $1, $1, 523 5583; MIPS64EB-NEXT: dsll $5, $1, 21 5584; MIPS64EB-NEXT: ld $25, %call16(float2_extern)($gp) 5585; MIPS64EB-NEXT: jalr $25 5586; MIPS64EB-NEXT: nop 5587; MIPS64EB-NEXT: ld $1, %got_disp(gv2f32)($gp) 5588; MIPS64EB-NEXT: sd $2, 0($1) 5589; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 5590; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 5591; MIPS64EB-NEXT: daddiu $sp, $sp, 16 5592; MIPS64EB-NEXT: jr $ra 5593; MIPS64EB-NEXT: nop 5594; 5595; MIPS32R5-LABEL: callfloat_2: 5596; MIPS32R5: # %bb.0: # %entry 5597; MIPS32R5-NEXT: addiu $sp, $sp, -40 5598; MIPS32R5-NEXT: .cfi_def_cfa_offset 40 5599; MIPS32R5-NEXT: sw $ra, 36($sp) # 4-byte Folded Spill 5600; MIPS32R5-NEXT: .cfi_offset 31, -4 5601; MIPS32R5-NEXT: lui $1, 16736 5602; MIPS32R5-NEXT: sw $1, 20($sp) 5603; MIPS32R5-NEXT: lui $1, 16704 5604; MIPS32R5-NEXT: sw $1, 16($sp) 5605; MIPS32R5-NEXT: addiu $4, $sp, 24 5606; MIPS32R5-NEXT: addiu $6, $zero, 0 5607; MIPS32R5-NEXT: lui $7, 49024 5608; MIPS32R5-NEXT: jal float2_extern 5609; MIPS32R5-NEXT: nop 5610; MIPS32R5-NEXT: lui $1, %hi(gv2f32) 5611; MIPS32R5-NEXT: addiu $2, $1, %lo(gv2f32) 5612; MIPS32R5-NEXT: lwc1 $f0, 28($sp) 5613; MIPS32R5-NEXT: swc1 $f0, 4($2) 5614; MIPS32R5-NEXT: lwc1 $f0, 24($sp) 5615; MIPS32R5-NEXT: swc1 $f0, %lo(gv2f32)($1) 5616; MIPS32R5-NEXT: lw $ra, 36($sp) # 4-byte Folded Reload 5617; MIPS32R5-NEXT: addiu $sp, $sp, 40 5618; MIPS32R5-NEXT: jr $ra 5619; MIPS32R5-NEXT: nop 5620; 5621; MIPS64R5-LABEL: callfloat_2: 5622; MIPS64R5: # %bb.0: # %entry 5623; MIPS64R5-NEXT: daddiu $sp, $sp, -16 5624; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 5625; MIPS64R5-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 5626; MIPS64R5-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 5627; MIPS64R5-NEXT: .cfi_offset 31, -8 5628; MIPS64R5-NEXT: .cfi_offset 28, -16 5629; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(callfloat_2))) 5630; MIPS64R5-NEXT: daddu $1, $1, $25 5631; MIPS64R5-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(callfloat_2))) 5632; MIPS64R5-NEXT: ld $1, %got_page(.LCPI37_0)($gp) 5633; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI37_0) 5634; MIPS64R5-NEXT: ld.d $w0, 0($1) 5635; MIPS64R5-NEXT: copy_s.d $4, $w0[0] 5636; MIPS64R5-NEXT: ld $1, %got_page(.LCPI37_1)($gp) 5637; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI37_1) 5638; MIPS64R5-NEXT: ld.d $w0, 0($1) 5639; MIPS64R5-NEXT: copy_s.d $5, $w0[0] 5640; MIPS64R5-NEXT: ld $25, %call16(float2_extern)($gp) 5641; MIPS64R5-NEXT: jalr $25 5642; MIPS64R5-NEXT: nop 5643; MIPS64R5-NEXT: ld $1, %got_disp(gv2f32)($gp) 5644; MIPS64R5-NEXT: sd $2, 0($1) 5645; MIPS64R5-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 5646; MIPS64R5-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 5647; MIPS64R5-NEXT: daddiu $sp, $sp, 16 5648; MIPS64R5-NEXT: jr $ra 5649; MIPS64R5-NEXT: nop 5650; 5651; MIPS64EL-LABEL: callfloat_2: 5652; MIPS64EL: # %bb.0: # %entry 5653; MIPS64EL-NEXT: daddiu $sp, $sp, -16 5654; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 5655; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 5656; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 5657; MIPS64EL-NEXT: .cfi_offset 31, -8 5658; MIPS64EL-NEXT: .cfi_offset 28, -16 5659; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(callfloat_2))) 5660; MIPS64EL-NEXT: daddu $1, $1, $25 5661; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(callfloat_2))) 5662; MIPS64EL-NEXT: daddiu $1, $zero, 383 5663; MIPS64EL-NEXT: dsll $4, $1, 55 5664; MIPS64EL-NEXT: daddiu $1, $zero, 523 5665; MIPS64EL-NEXT: dsll $1, $1, 31 5666; MIPS64EL-NEXT: daddiu $1, $1, 261 5667; MIPS64EL-NEXT: dsll $5, $1, 22 5668; MIPS64EL-NEXT: ld $25, %call16(float2_extern)($gp) 5669; MIPS64EL-NEXT: jalr $25 5670; MIPS64EL-NEXT: nop 5671; MIPS64EL-NEXT: ld $1, %got_disp(gv2f32)($gp) 5672; MIPS64EL-NEXT: sd $2, 0($1) 5673; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 5674; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 5675; MIPS64EL-NEXT: daddiu $sp, $sp, 16 5676; MIPS64EL-NEXT: jr $ra 5677; MIPS64EL-NEXT: nop 5678entry: 5679 %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>) 5680 store <2 x float> %0, <2 x float> * @gv2f32 5681 ret void 5682} 5683 5684define void @callfloat_4() { 5685; MIPS32-LABEL: callfloat_4: 5686; MIPS32: # %bb.0: # %entry 5687; MIPS32-NEXT: addiu $sp, $sp, -80 5688; MIPS32-NEXT: .cfi_def_cfa_offset 80 5689; MIPS32-NEXT: sw $ra, 76($sp) # 4-byte Folded Spill 5690; MIPS32-NEXT: sw $fp, 72($sp) # 4-byte Folded Spill 5691; MIPS32-NEXT: .cfi_offset 31, -4 5692; MIPS32-NEXT: .cfi_offset 30, -8 5693; MIPS32-NEXT: move $fp, $sp 5694; MIPS32-NEXT: .cfi_def_cfa_register 30 5695; MIPS32-NEXT: addiu $1, $zero, -16 5696; MIPS32-NEXT: and $sp, $sp, $1 5697; MIPS32-NEXT: lui $1, 16704 5698; MIPS32-NEXT: lui $2, 16736 5699; MIPS32-NEXT: lui $3, 16752 5700; MIPS32-NEXT: lui $4, 16768 5701; MIPS32-NEXT: sw $4, 36($sp) 5702; MIPS32-NEXT: sw $3, 32($sp) 5703; MIPS32-NEXT: sw $2, 28($sp) 5704; MIPS32-NEXT: sw $1, 24($sp) 5705; MIPS32-NEXT: lui $1, 16512 5706; MIPS32-NEXT: sw $1, 20($sp) 5707; MIPS32-NEXT: lui $1, 16384 5708; MIPS32-NEXT: sw $1, 16($sp) 5709; MIPS32-NEXT: addiu $4, $sp, 48 5710; MIPS32-NEXT: addiu $6, $zero, 0 5711; MIPS32-NEXT: lui $7, 49024 5712; MIPS32-NEXT: jal float4_extern 5713; MIPS32-NEXT: nop 5714; MIPS32-NEXT: lui $1, %hi(gv4f32) 5715; MIPS32-NEXT: addiu $2, $1, %lo(gv4f32) 5716; MIPS32-NEXT: lwc1 $f0, 60($sp) 5717; MIPS32-NEXT: swc1 $f0, 12($2) 5718; MIPS32-NEXT: lwc1 $f0, 56($sp) 5719; MIPS32-NEXT: swc1 $f0, 8($2) 5720; MIPS32-NEXT: lwc1 $f0, 52($sp) 5721; MIPS32-NEXT: swc1 $f0, 4($2) 5722; MIPS32-NEXT: lwc1 $f0, 48($sp) 5723; MIPS32-NEXT: swc1 $f0, %lo(gv4f32)($1) 5724; MIPS32-NEXT: move $sp, $fp 5725; MIPS32-NEXT: lw $fp, 72($sp) # 4-byte Folded Reload 5726; MIPS32-NEXT: lw $ra, 76($sp) # 4-byte Folded Reload 5727; MIPS32-NEXT: addiu $sp, $sp, 80 5728; MIPS32-NEXT: jr $ra 5729; MIPS32-NEXT: nop 5730; 5731; MIPS64EB-LABEL: callfloat_4: 5732; MIPS64EB: # %bb.0: # %entry 5733; MIPS64EB-NEXT: daddiu $sp, $sp, -16 5734; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 5735; MIPS64EB-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 5736; MIPS64EB-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 5737; MIPS64EB-NEXT: .cfi_offset 31, -8 5738; MIPS64EB-NEXT: .cfi_offset 28, -16 5739; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(callfloat_4))) 5740; MIPS64EB-NEXT: daddu $1, $1, $25 5741; MIPS64EB-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(callfloat_4))) 5742; MIPS64EB-NEXT: daddiu $1, $zero, 1 5743; MIPS64EB-NEXT: dsll $1, $1, 39 5744; MIPS64EB-NEXT: daddiu $1, $1, 129 5745; MIPS64EB-NEXT: daddiu $2, $zero, 261 5746; MIPS64EB-NEXT: dsll $2, $2, 33 5747; MIPS64EB-NEXT: daddiu $3, $zero, 383 5748; MIPS64EB-NEXT: dsll $4, $3, 23 5749; MIPS64EB-NEXT: dsll $5, $1, 23 5750; MIPS64EB-NEXT: daddiu $1, $2, 523 5751; MIPS64EB-NEXT: dsll $6, $1, 21 5752; MIPS64EB-NEXT: daddiu $1, $zero, 1047 5753; MIPS64EB-NEXT: dsll $1, $1, 29 5754; MIPS64EB-NEXT: daddiu $1, $1, 131 5755; MIPS64EB-NEXT: dsll $7, $1, 23 5756; MIPS64EB-NEXT: ld $25, %call16(float4_extern)($gp) 5757; MIPS64EB-NEXT: jalr $25 5758; MIPS64EB-NEXT: nop 5759; MIPS64EB-NEXT: ld $1, %got_disp(gv4f32)($gp) 5760; MIPS64EB-NEXT: sd $3, 8($1) 5761; MIPS64EB-NEXT: sd $2, 0($1) 5762; MIPS64EB-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 5763; MIPS64EB-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 5764; MIPS64EB-NEXT: daddiu $sp, $sp, 16 5765; MIPS64EB-NEXT: jr $ra 5766; MIPS64EB-NEXT: nop 5767; 5768; MIPS32R5-LABEL: callfloat_4: 5769; MIPS32R5: # %bb.0: # %entry 5770; MIPS32R5-NEXT: addiu $sp, $sp, -80 5771; MIPS32R5-NEXT: .cfi_def_cfa_offset 80 5772; MIPS32R5-NEXT: sw $ra, 76($sp) # 4-byte Folded Spill 5773; MIPS32R5-NEXT: sw $fp, 72($sp) # 4-byte Folded Spill 5774; MIPS32R5-NEXT: .cfi_offset 31, -4 5775; MIPS32R5-NEXT: .cfi_offset 30, -8 5776; MIPS32R5-NEXT: move $fp, $sp 5777; MIPS32R5-NEXT: .cfi_def_cfa_register 30 5778; MIPS32R5-NEXT: addiu $1, $zero, -16 5779; MIPS32R5-NEXT: and $sp, $sp, $1 5780; MIPS32R5-NEXT: lui $1, %hi($CPI38_0) 5781; MIPS32R5-NEXT: addiu $1, $1, %lo($CPI38_0) 5782; MIPS32R5-NEXT: ld.w $w0, 0($1) 5783; MIPS32R5-NEXT: copy_s.w $6, $w0[0] 5784; MIPS32R5-NEXT: copy_s.w $7, $w0[1] 5785; MIPS32R5-NEXT: copy_s.w $1, $w0[2] 5786; MIPS32R5-NEXT: copy_s.w $2, $w0[3] 5787; MIPS32R5-NEXT: lui $3, %hi($CPI38_1) 5788; MIPS32R5-NEXT: addiu $3, $3, %lo($CPI38_1) 5789; MIPS32R5-NEXT: ld.w $w0, 0($3) 5790; MIPS32R5-NEXT: copy_s.w $3, $w0[0] 5791; MIPS32R5-NEXT: copy_s.w $4, $w0[1] 5792; MIPS32R5-NEXT: copy_s.w $5, $w0[2] 5793; MIPS32R5-NEXT: copy_s.w $8, $w0[3] 5794; MIPS32R5-NEXT: sw $8, 36($sp) 5795; MIPS32R5-NEXT: sw $5, 32($sp) 5796; MIPS32R5-NEXT: sw $4, 28($sp) 5797; MIPS32R5-NEXT: sw $3, 24($sp) 5798; MIPS32R5-NEXT: sw $2, 20($sp) 5799; MIPS32R5-NEXT: sw $1, 16($sp) 5800; MIPS32R5-NEXT: addiu $4, $sp, 48 5801; MIPS32R5-NEXT: jal float4_extern 5802; MIPS32R5-NEXT: nop 5803; MIPS32R5-NEXT: lui $1, %hi(gv4f32) 5804; MIPS32R5-NEXT: addiu $1, $1, %lo(gv4f32) 5805; MIPS32R5-NEXT: ld.w $w0, 48($sp) 5806; MIPS32R5-NEXT: st.w $w0, 0($1) 5807; MIPS32R5-NEXT: move $sp, $fp 5808; MIPS32R5-NEXT: lw $fp, 72($sp) # 4-byte Folded Reload 5809; MIPS32R5-NEXT: lw $ra, 76($sp) # 4-byte Folded Reload 5810; MIPS32R5-NEXT: addiu $sp, $sp, 80 5811; MIPS32R5-NEXT: jr $ra 5812; MIPS32R5-NEXT: nop 5813; 5814; MIPS64R5-LABEL: callfloat_4: 5815; MIPS64R5: # %bb.0: # %entry 5816; MIPS64R5-NEXT: daddiu $sp, $sp, -16 5817; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 5818; MIPS64R5-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 5819; MIPS64R5-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 5820; MIPS64R5-NEXT: .cfi_offset 31, -8 5821; MIPS64R5-NEXT: .cfi_offset 28, -16 5822; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(callfloat_4))) 5823; MIPS64R5-NEXT: daddu $1, $1, $25 5824; MIPS64R5-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(callfloat_4))) 5825; MIPS64R5-NEXT: ld $1, %got_page(.LCPI38_0)($gp) 5826; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI38_0) 5827; MIPS64R5-NEXT: ld.d $w0, 0($1) 5828; MIPS64R5-NEXT: copy_s.d $4, $w0[0] 5829; MIPS64R5-NEXT: copy_s.d $5, $w0[1] 5830; MIPS64R5-NEXT: ld $1, %got_page(.LCPI38_1)($gp) 5831; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI38_1) 5832; MIPS64R5-NEXT: ld.d $w0, 0($1) 5833; MIPS64R5-NEXT: copy_s.d $6, $w0[0] 5834; MIPS64R5-NEXT: copy_s.d $7, $w0[1] 5835; MIPS64R5-NEXT: ld $25, %call16(float4_extern)($gp) 5836; MIPS64R5-NEXT: jalr $25 5837; MIPS64R5-NEXT: nop 5838; MIPS64R5-NEXT: insert.d $w0[0], $2 5839; MIPS64R5-NEXT: insert.d $w0[1], $3 5840; MIPS64R5-NEXT: ld $1, %got_disp(gv4f32)($gp) 5841; MIPS64R5-NEXT: st.d $w0, 0($1) 5842; MIPS64R5-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 5843; MIPS64R5-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 5844; MIPS64R5-NEXT: daddiu $sp, $sp, 16 5845; MIPS64R5-NEXT: jr $ra 5846; MIPS64R5-NEXT: nop 5847; 5848; MIPS64EL-LABEL: callfloat_4: 5849; MIPS64EL: # %bb.0: # %entry 5850; MIPS64EL-NEXT: daddiu $sp, $sp, -16 5851; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 5852; MIPS64EL-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 5853; MIPS64EL-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 5854; MIPS64EL-NEXT: .cfi_offset 31, -8 5855; MIPS64EL-NEXT: .cfi_offset 28, -16 5856; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(callfloat_4))) 5857; MIPS64EL-NEXT: daddu $1, $1, $25 5858; MIPS64EL-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(callfloat_4))) 5859; MIPS64EL-NEXT: daddiu $1, $zero, 129 5860; MIPS64EL-NEXT: dsll $1, $1, 25 5861; MIPS64EL-NEXT: daddiu $1, $1, 1 5862; MIPS64EL-NEXT: daddiu $2, $zero, 523 5863; MIPS64EL-NEXT: dsll $2, $2, 31 5864; MIPS64EL-NEXT: daddiu $3, $zero, 383 5865; MIPS64EL-NEXT: dsll $4, $3, 55 5866; MIPS64EL-NEXT: dsll $5, $1, 30 5867; MIPS64EL-NEXT: daddiu $1, $2, 261 5868; MIPS64EL-NEXT: dsll $6, $1, 22 5869; MIPS64EL-NEXT: daddiu $1, $zero, 131 5870; MIPS64EL-NEXT: dsll $1, $1, 35 5871; MIPS64EL-NEXT: daddiu $1, $1, 1047 5872; MIPS64EL-NEXT: dsll $7, $1, 20 5873; MIPS64EL-NEXT: ld $25, %call16(float4_extern)($gp) 5874; MIPS64EL-NEXT: jalr $25 5875; MIPS64EL-NEXT: nop 5876; MIPS64EL-NEXT: ld $1, %got_disp(gv4f32)($gp) 5877; MIPS64EL-NEXT: sd $3, 8($1) 5878; MIPS64EL-NEXT: sd $2, 0($1) 5879; MIPS64EL-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 5880; MIPS64EL-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 5881; MIPS64EL-NEXT: daddiu $sp, $sp, 16 5882; MIPS64EL-NEXT: jr $ra 5883; MIPS64EL-NEXT: nop 5884entry: 5885 %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>) 5886 store <4 x float> %0, <4 x float> * @gv4f32 5887 ret void 5888} 5889 5890define void @calldouble_2() { 5891; MIPS32EB-LABEL: calldouble_2: 5892; MIPS32EB: # %bb.0: # %entry 5893; MIPS32EB-NEXT: addiu $sp, $sp, -80 5894; MIPS32EB-NEXT: .cfi_def_cfa_offset 80 5895; MIPS32EB-NEXT: sw $ra, 76($sp) # 4-byte Folded Spill 5896; MIPS32EB-NEXT: sw $fp, 72($sp) # 4-byte Folded Spill 5897; MIPS32EB-NEXT: .cfi_offset 31, -4 5898; MIPS32EB-NEXT: .cfi_offset 30, -8 5899; MIPS32EB-NEXT: move $fp, $sp 5900; MIPS32EB-NEXT: .cfi_def_cfa_register 30 5901; MIPS32EB-NEXT: addiu $1, $zero, -16 5902; MIPS32EB-NEXT: and $sp, $sp, $1 5903; MIPS32EB-NEXT: lui $1, 16424 5904; MIPS32EB-NEXT: lui $2, 16428 5905; MIPS32EB-NEXT: sw $2, 32($sp) 5906; MIPS32EB-NEXT: sw $1, 24($sp) 5907; MIPS32EB-NEXT: lui $1, 49136 5908; MIPS32EB-NEXT: sw $1, 16($sp) 5909; MIPS32EB-NEXT: sw $zero, 36($sp) 5910; MIPS32EB-NEXT: sw $zero, 28($sp) 5911; MIPS32EB-NEXT: sw $zero, 20($sp) 5912; MIPS32EB-NEXT: addiu $4, $sp, 48 5913; MIPS32EB-NEXT: addiu $6, $zero, 0 5914; MIPS32EB-NEXT: addiu $7, $zero, 0 5915; MIPS32EB-NEXT: jal double2_extern 5916; MIPS32EB-NEXT: nop 5917; MIPS32EB-NEXT: lui $1, %hi(gv2f64) 5918; MIPS32EB-NEXT: addiu $2, $1, %lo(gv2f64) 5919; MIPS32EB-NEXT: ldc1 $f0, 56($sp) 5920; MIPS32EB-NEXT: sdc1 $f0, 8($2) 5921; MIPS32EB-NEXT: ldc1 $f0, 48($sp) 5922; MIPS32EB-NEXT: sdc1 $f0, %lo(gv2f64)($1) 5923; MIPS32EB-NEXT: move $sp, $fp 5924; MIPS32EB-NEXT: lw $fp, 72($sp) # 4-byte Folded Reload 5925; MIPS32EB-NEXT: lw $ra, 76($sp) # 4-byte Folded Reload 5926; MIPS32EB-NEXT: addiu $sp, $sp, 80 5927; MIPS32EB-NEXT: jr $ra 5928; MIPS32EB-NEXT: nop 5929; 5930; MIPS64-LABEL: calldouble_2: 5931; MIPS64: # %bb.0: # %entry 5932; MIPS64-NEXT: daddiu $sp, $sp, -16 5933; MIPS64-NEXT: .cfi_def_cfa_offset 16 5934; MIPS64-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 5935; MIPS64-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 5936; MIPS64-NEXT: .cfi_offset 31, -8 5937; MIPS64-NEXT: .cfi_offset 28, -16 5938; MIPS64-NEXT: lui $1, %hi(%neg(%gp_rel(calldouble_2))) 5939; MIPS64-NEXT: daddu $1, $1, $25 5940; MIPS64-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calldouble_2))) 5941; MIPS64-NEXT: daddiu $1, $zero, 3071 5942; MIPS64-NEXT: dsll $5, $1, 52 5943; MIPS64-NEXT: daddiu $1, $zero, 2053 5944; MIPS64-NEXT: dsll $6, $1, 51 5945; MIPS64-NEXT: daddiu $1, $zero, 4107 5946; MIPS64-NEXT: dsll $7, $1, 50 5947; MIPS64-NEXT: ld $25, %call16(double2_extern)($gp) 5948; MIPS64-NEXT: daddiu $4, $zero, 0 5949; MIPS64-NEXT: jalr $25 5950; MIPS64-NEXT: nop 5951; MIPS64-NEXT: ld $1, %got_disp(gv2f64)($gp) 5952; MIPS64-NEXT: sd $3, 8($1) 5953; MIPS64-NEXT: sd $2, 0($1) 5954; MIPS64-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 5955; MIPS64-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 5956; MIPS64-NEXT: daddiu $sp, $sp, 16 5957; MIPS64-NEXT: jr $ra 5958; MIPS64-NEXT: nop 5959; 5960; MIPS32R5-LABEL: calldouble_2: 5961; MIPS32R5: # %bb.0: # %entry 5962; MIPS32R5-NEXT: addiu $sp, $sp, -80 5963; MIPS32R5-NEXT: .cfi_def_cfa_offset 80 5964; MIPS32R5-NEXT: sw $ra, 76($sp) # 4-byte Folded Spill 5965; MIPS32R5-NEXT: sw $fp, 72($sp) # 4-byte Folded Spill 5966; MIPS32R5-NEXT: .cfi_offset 31, -4 5967; MIPS32R5-NEXT: .cfi_offset 30, -8 5968; MIPS32R5-NEXT: move $fp, $sp 5969; MIPS32R5-NEXT: .cfi_def_cfa_register 30 5970; MIPS32R5-NEXT: addiu $1, $zero, -16 5971; MIPS32R5-NEXT: and $sp, $sp, $1 5972; MIPS32R5-NEXT: lui $1, %hi($CPI39_0) 5973; MIPS32R5-NEXT: addiu $1, $1, %lo($CPI39_0) 5974; MIPS32R5-NEXT: ld.w $w0, 0($1) 5975; MIPS32R5-NEXT: copy_s.w $6, $w0[0] 5976; MIPS32R5-NEXT: copy_s.w $7, $w0[1] 5977; MIPS32R5-NEXT: copy_s.w $1, $w0[2] 5978; MIPS32R5-NEXT: copy_s.w $2, $w0[3] 5979; MIPS32R5-NEXT: lui $3, %hi($CPI39_1) 5980; MIPS32R5-NEXT: addiu $3, $3, %lo($CPI39_1) 5981; MIPS32R5-NEXT: ld.w $w0, 0($3) 5982; MIPS32R5-NEXT: copy_s.w $3, $w0[0] 5983; MIPS32R5-NEXT: copy_s.w $4, $w0[1] 5984; MIPS32R5-NEXT: copy_s.w $5, $w0[2] 5985; MIPS32R5-NEXT: copy_s.w $8, $w0[3] 5986; MIPS32R5-NEXT: sw $8, 36($sp) 5987; MIPS32R5-NEXT: sw $5, 32($sp) 5988; MIPS32R5-NEXT: sw $4, 28($sp) 5989; MIPS32R5-NEXT: sw $3, 24($sp) 5990; MIPS32R5-NEXT: sw $2, 20($sp) 5991; MIPS32R5-NEXT: sw $1, 16($sp) 5992; MIPS32R5-NEXT: addiu $4, $sp, 48 5993; MIPS32R5-NEXT: jal double2_extern 5994; MIPS32R5-NEXT: nop 5995; MIPS32R5-NEXT: lui $1, %hi(gv2f64) 5996; MIPS32R5-NEXT: addiu $1, $1, %lo(gv2f64) 5997; MIPS32R5-NEXT: ld.d $w0, 48($sp) 5998; MIPS32R5-NEXT: st.d $w0, 0($1) 5999; MIPS32R5-NEXT: move $sp, $fp 6000; MIPS32R5-NEXT: lw $fp, 72($sp) # 4-byte Folded Reload 6001; MIPS32R5-NEXT: lw $ra, 76($sp) # 4-byte Folded Reload 6002; MIPS32R5-NEXT: addiu $sp, $sp, 80 6003; MIPS32R5-NEXT: jr $ra 6004; MIPS32R5-NEXT: nop 6005; 6006; MIPS64R5-LABEL: calldouble_2: 6007; MIPS64R5: # %bb.0: # %entry 6008; MIPS64R5-NEXT: daddiu $sp, $sp, -16 6009; MIPS64R5-NEXT: .cfi_def_cfa_offset 16 6010; MIPS64R5-NEXT: sd $ra, 8($sp) # 8-byte Folded Spill 6011; MIPS64R5-NEXT: sd $gp, 0($sp) # 8-byte Folded Spill 6012; MIPS64R5-NEXT: .cfi_offset 31, -8 6013; MIPS64R5-NEXT: .cfi_offset 28, -16 6014; MIPS64R5-NEXT: lui $1, %hi(%neg(%gp_rel(calldouble_2))) 6015; MIPS64R5-NEXT: daddu $1, $1, $25 6016; MIPS64R5-NEXT: daddiu $gp, $1, %lo(%neg(%gp_rel(calldouble_2))) 6017; MIPS64R5-NEXT: ld $1, %got_page(.LCPI39_0)($gp) 6018; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI39_0) 6019; MIPS64R5-NEXT: ld.d $w0, 0($1) 6020; MIPS64R5-NEXT: copy_s.d $4, $w0[0] 6021; MIPS64R5-NEXT: copy_s.d $5, $w0[1] 6022; MIPS64R5-NEXT: ld $1, %got_page(.LCPI39_1)($gp) 6023; MIPS64R5-NEXT: daddiu $1, $1, %got_ofst(.LCPI39_1) 6024; MIPS64R5-NEXT: ld.d $w0, 0($1) 6025; MIPS64R5-NEXT: copy_s.d $6, $w0[0] 6026; MIPS64R5-NEXT: copy_s.d $7, $w0[1] 6027; MIPS64R5-NEXT: ld $25, %call16(double2_extern)($gp) 6028; MIPS64R5-NEXT: jalr $25 6029; MIPS64R5-NEXT: nop 6030; MIPS64R5-NEXT: insert.d $w0[0], $2 6031; MIPS64R5-NEXT: insert.d $w0[1], $3 6032; MIPS64R5-NEXT: ld $1, %got_disp(gv2f64)($gp) 6033; MIPS64R5-NEXT: st.d $w0, 0($1) 6034; MIPS64R5-NEXT: ld $gp, 0($sp) # 8-byte Folded Reload 6035; MIPS64R5-NEXT: ld $ra, 8($sp) # 8-byte Folded Reload 6036; MIPS64R5-NEXT: daddiu $sp, $sp, 16 6037; MIPS64R5-NEXT: jr $ra 6038; MIPS64R5-NEXT: nop 6039; 6040; MIPS32EL-LABEL: calldouble_2: 6041; MIPS32EL: # %bb.0: # %entry 6042; MIPS32EL-NEXT: addiu $sp, $sp, -80 6043; MIPS32EL-NEXT: .cfi_def_cfa_offset 80 6044; MIPS32EL-NEXT: sw $ra, 76($sp) # 4-byte Folded Spill 6045; MIPS32EL-NEXT: sw $fp, 72($sp) # 4-byte Folded Spill 6046; MIPS32EL-NEXT: .cfi_offset 31, -4 6047; MIPS32EL-NEXT: .cfi_offset 30, -8 6048; MIPS32EL-NEXT: move $fp, $sp 6049; MIPS32EL-NEXT: .cfi_def_cfa_register 30 6050; MIPS32EL-NEXT: addiu $1, $zero, -16 6051; MIPS32EL-NEXT: and $sp, $sp, $1 6052; MIPS32EL-NEXT: lui $1, 16424 6053; MIPS32EL-NEXT: lui $2, 16428 6054; MIPS32EL-NEXT: sw $2, 36($sp) 6055; MIPS32EL-NEXT: sw $1, 28($sp) 6056; MIPS32EL-NEXT: lui $1, 49136 6057; MIPS32EL-NEXT: sw $1, 20($sp) 6058; MIPS32EL-NEXT: sw $zero, 32($sp) 6059; MIPS32EL-NEXT: sw $zero, 24($sp) 6060; MIPS32EL-NEXT: sw $zero, 16($sp) 6061; MIPS32EL-NEXT: addiu $4, $sp, 48 6062; MIPS32EL-NEXT: addiu $6, $zero, 0 6063; MIPS32EL-NEXT: addiu $7, $zero, 0 6064; MIPS32EL-NEXT: jal double2_extern 6065; MIPS32EL-NEXT: nop 6066; MIPS32EL-NEXT: lui $1, %hi(gv2f64) 6067; MIPS32EL-NEXT: addiu $2, $1, %lo(gv2f64) 6068; MIPS32EL-NEXT: ldc1 $f0, 56($sp) 6069; MIPS32EL-NEXT: sdc1 $f0, 8($2) 6070; MIPS32EL-NEXT: ldc1 $f0, 48($sp) 6071; MIPS32EL-NEXT: sdc1 $f0, %lo(gv2f64)($1) 6072; MIPS32EL-NEXT: move $sp, $fp 6073; MIPS32EL-NEXT: lw $fp, 72($sp) # 4-byte Folded Reload 6074; MIPS32EL-NEXT: lw $ra, 76($sp) # 4-byte Folded Reload 6075; MIPS32EL-NEXT: addiu $sp, $sp, 80 6076; MIPS32EL-NEXT: jr $ra 6077; MIPS32EL-NEXT: nop 6078entry: 6079 %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>) 6080 store <2 x double> %0, <2 x double> * @gv2f64 6081 ret void 6082} 6083 6084; The mixed tests show that due to alignment requirements, $5 is not used 6085; in argument passing. 6086 6087define float @mixed_i8(<2 x float> %a, i8 %b, <2 x float> %c) { 6088; MIPS32-LABEL: mixed_i8: 6089; MIPS32: # %bb.0: # %entry 6090; MIPS32-NEXT: mtc1 $5, $f0 6091; MIPS32-NEXT: andi $1, $6, 255 6092; MIPS32-NEXT: mtc1 $1, $f1 6093; MIPS32-NEXT: cvt.s.w $f1, $f1 6094; MIPS32-NEXT: add.s $f0, $f1, $f0 6095; MIPS32-NEXT: lwc1 $f2, 20($sp) 6096; MIPS32-NEXT: add.s $f0, $f0, $f2 6097; MIPS32-NEXT: mtc1 $4, $f2 6098; MIPS32-NEXT: add.s $f1, $f1, $f2 6099; MIPS32-NEXT: lwc1 $f2, 16($sp) 6100; MIPS32-NEXT: add.s $f1, $f1, $f2 6101; MIPS32-NEXT: add.s $f0, $f1, $f0 6102; MIPS32-NEXT: jr $ra 6103; MIPS32-NEXT: nop 6104; 6105; MIPS64EB-LABEL: mixed_i8: 6106; MIPS64EB: # %bb.0: # %entry 6107; MIPS64EB-NEXT: sll $1, $4, 0 6108; MIPS64EB-NEXT: mtc1 $1, $f0 6109; MIPS64EB-NEXT: sll $1, $5, 0 6110; MIPS64EB-NEXT: andi $1, $1, 255 6111; MIPS64EB-NEXT: mtc1 $1, $f1 6112; MIPS64EB-NEXT: cvt.s.w $f1, $f1 6113; MIPS64EB-NEXT: add.s $f0, $f1, $f0 6114; MIPS64EB-NEXT: dsrl $1, $4, 32 6115; MIPS64EB-NEXT: sll $1, $1, 0 6116; MIPS64EB-NEXT: sll $2, $6, 0 6117; MIPS64EB-NEXT: mtc1 $2, $f2 6118; MIPS64EB-NEXT: add.s $f0, $f0, $f2 6119; MIPS64EB-NEXT: mtc1 $1, $f2 6120; MIPS64EB-NEXT: add.s $f1, $f1, $f2 6121; MIPS64EB-NEXT: dsrl $1, $6, 32 6122; MIPS64EB-NEXT: sll $1, $1, 0 6123; MIPS64EB-NEXT: mtc1 $1, $f2 6124; MIPS64EB-NEXT: add.s $f1, $f1, $f2 6125; MIPS64EB-NEXT: add.s $f0, $f1, $f0 6126; MIPS64EB-NEXT: jr $ra 6127; MIPS64EB-NEXT: nop 6128; 6129; MIPS32R5-LABEL: mixed_i8: 6130; MIPS32R5: # %bb.0: # %entry 6131; MIPS32R5-NEXT: addiu $sp, $sp, -64 6132; MIPS32R5-NEXT: .cfi_def_cfa_offset 64 6133; MIPS32R5-NEXT: sw $ra, 60($sp) # 4-byte Folded Spill 6134; MIPS32R5-NEXT: sw $fp, 56($sp) # 4-byte Folded Spill 6135; MIPS32R5-NEXT: .cfi_offset 31, -4 6136; MIPS32R5-NEXT: .cfi_offset 30, -8 6137; MIPS32R5-NEXT: move $fp, $sp 6138; MIPS32R5-NEXT: .cfi_def_cfa_register 30 6139; MIPS32R5-NEXT: addiu $1, $zero, -16 6140; MIPS32R5-NEXT: and $sp, $sp, $1 6141; MIPS32R5-NEXT: andi $1, $6, 255 6142; MIPS32R5-NEXT: mtc1 $1, $f0 6143; MIPS32R5-NEXT: cvt.s.w $f0, $f0 6144; MIPS32R5-NEXT: swc1 $f0, 36($sp) 6145; MIPS32R5-NEXT: swc1 $f0, 32($sp) 6146; MIPS32R5-NEXT: sw $5, 4($sp) 6147; MIPS32R5-NEXT: sw $4, 0($sp) 6148; MIPS32R5-NEXT: ld.w $w0, 0($sp) 6149; MIPS32R5-NEXT: ld.w $w1, 32($sp) 6150; MIPS32R5-NEXT: fadd.w $w0, $w1, $w0 6151; MIPS32R5-NEXT: lw $1, 84($fp) 6152; MIPS32R5-NEXT: sw $1, 20($sp) 6153; MIPS32R5-NEXT: lw $1, 80($fp) 6154; MIPS32R5-NEXT: sw $1, 16($sp) 6155; MIPS32R5-NEXT: ld.w $w1, 16($sp) 6156; MIPS32R5-NEXT: fadd.w $w0, $w0, $w1 6157; MIPS32R5-NEXT: splati.w $w1, $w0[1] 6158; MIPS32R5-NEXT: add.s $f0, $f0, $f1 6159; MIPS32R5-NEXT: move $sp, $fp 6160; MIPS32R5-NEXT: lw $fp, 56($sp) # 4-byte Folded Reload 6161; MIPS32R5-NEXT: lw $ra, 60($sp) # 4-byte Folded Reload 6162; MIPS32R5-NEXT: addiu $sp, $sp, 64 6163; MIPS32R5-NEXT: jr $ra 6164; MIPS32R5-NEXT: nop 6165; 6166; MIPS64R5-LABEL: mixed_i8: 6167; MIPS64R5: # %bb.0: # %entry 6168; MIPS64R5-NEXT: daddiu $sp, $sp, -48 6169; MIPS64R5-NEXT: .cfi_def_cfa_offset 48 6170; MIPS64R5-NEXT: sll $1, $5, 0 6171; MIPS64R5-NEXT: andi $1, $1, 255 6172; MIPS64R5-NEXT: mtc1 $1, $f0 6173; MIPS64R5-NEXT: cvt.s.w $f0, $f0 6174; MIPS64R5-NEXT: swc1 $f0, 36($sp) 6175; MIPS64R5-NEXT: swc1 $f0, 32($sp) 6176; MIPS64R5-NEXT: sd $4, 0($sp) 6177; MIPS64R5-NEXT: ld.w $w0, 0($sp) 6178; MIPS64R5-NEXT: ld.w $w1, 32($sp) 6179; MIPS64R5-NEXT: fadd.w $w0, $w1, $w0 6180; MIPS64R5-NEXT: sd $6, 16($sp) 6181; MIPS64R5-NEXT: ld.w $w1, 16($sp) 6182; MIPS64R5-NEXT: fadd.w $w0, $w0, $w1 6183; MIPS64R5-NEXT: splati.w $w1, $w0[1] 6184; MIPS64R5-NEXT: add.s $f0, $f0, $f1 6185; MIPS64R5-NEXT: daddiu $sp, $sp, 48 6186; MIPS64R5-NEXT: jr $ra 6187; MIPS64R5-NEXT: nop 6188; 6189; MIPS64EL-LABEL: mixed_i8: 6190; MIPS64EL: # %bb.0: # %entry 6191; MIPS64EL-NEXT: dsrl $1, $4, 32 6192; MIPS64EL-NEXT: sll $1, $1, 0 6193; MIPS64EL-NEXT: mtc1 $1, $f0 6194; MIPS64EL-NEXT: sll $1, $5, 0 6195; MIPS64EL-NEXT: andi $1, $1, 255 6196; MIPS64EL-NEXT: mtc1 $1, $f1 6197; MIPS64EL-NEXT: cvt.s.w $f1, $f1 6198; MIPS64EL-NEXT: add.s $f0, $f1, $f0 6199; MIPS64EL-NEXT: dsrl $1, $6, 32 6200; MIPS64EL-NEXT: sll $1, $1, 0 6201; MIPS64EL-NEXT: mtc1 $1, $f2 6202; MIPS64EL-NEXT: add.s $f0, $f0, $f2 6203; MIPS64EL-NEXT: sll $1, $4, 0 6204; MIPS64EL-NEXT: mtc1 $1, $f2 6205; MIPS64EL-NEXT: add.s $f1, $f1, $f2 6206; MIPS64EL-NEXT: sll $1, $6, 0 6207; MIPS64EL-NEXT: mtc1 $1, $f2 6208; MIPS64EL-NEXT: add.s $f1, $f1, $f2 6209; MIPS64EL-NEXT: add.s $f0, $f1, $f0 6210; MIPS64EL-NEXT: jr $ra 6211; MIPS64EL-NEXT: nop 6212entry: 6213 %0 = zext i8 %b to i32 6214 %1 = uitofp i32 %0 to float 6215 %2 = insertelement <2 x float> undef, float %1, i32 0 6216 %3 = insertelement <2 x float> %2, float %1, i32 1 6217 %4 = fadd <2 x float> %3, %a 6218 %5 = fadd <2 x float> %4, %c 6219 %6 = extractelement <2 x float> %5, i32 0 6220 %7 = extractelement <2 x float> %5, i32 1 6221 %8 = fadd float %6, %7 6222 ret float %8 6223} 6224 6225define <4 x float> @mixed_32(<4 x float> %a, i32 %b) { 6226; MIPS32EB-LABEL: mixed_32: 6227; MIPS32EB: # %bb.0: # %entry 6228; MIPS32EB-NEXT: addiu $sp, $sp, -8 6229; MIPS32EB-NEXT: .cfi_def_cfa_offset 8 6230; MIPS32EB-NEXT: lw $1, 32($sp) 6231; MIPS32EB-NEXT: sw $1, 4($sp) 6232; MIPS32EB-NEXT: lui $1, 17200 6233; MIPS32EB-NEXT: sw $1, 0($sp) 6234; MIPS32EB-NEXT: lui $1, %hi($CPI41_0) 6235; MIPS32EB-NEXT: ldc1 $f0, %lo($CPI41_0)($1) 6236; MIPS32EB-NEXT: ldc1 $f2, 0($sp) 6237; MIPS32EB-NEXT: sub.d $f0, $f2, $f0 6238; MIPS32EB-NEXT: cvt.s.d $f0, $f0 6239; MIPS32EB-NEXT: lwc1 $f1, 28($sp) 6240; MIPS32EB-NEXT: lwc1 $f2, 24($sp) 6241; MIPS32EB-NEXT: add.s $f2, $f0, $f2 6242; MIPS32EB-NEXT: add.s $f1, $f0, $f1 6243; MIPS32EB-NEXT: swc1 $f1, 12($4) 6244; MIPS32EB-NEXT: swc1 $f2, 8($4) 6245; MIPS32EB-NEXT: mtc1 $7, $f1 6246; MIPS32EB-NEXT: add.s $f1, $f0, $f1 6247; MIPS32EB-NEXT: swc1 $f1, 4($4) 6248; MIPS32EB-NEXT: mtc1 $6, $f1 6249; MIPS32EB-NEXT: add.s $f0, $f0, $f1 6250; MIPS32EB-NEXT: swc1 $f0, 0($4) 6251; MIPS32EB-NEXT: addiu $sp, $sp, 8 6252; MIPS32EB-NEXT: jr $ra 6253; MIPS32EB-NEXT: nop 6254; 6255; MIPS64EB-LABEL: mixed_32: 6256; MIPS64EB: # %bb.0: # %entry 6257; MIPS64EB-NEXT: daddiu $sp, $sp, -16 6258; MIPS64EB-NEXT: .cfi_def_cfa_offset 16 6259; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(mixed_32))) 6260; MIPS64EB-NEXT: daddu $1, $1, $25 6261; MIPS64EB-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(mixed_32))) 6262; MIPS64EB-NEXT: lui $2, 17200 6263; MIPS64EB-NEXT: sw $2, 8($sp) 6264; MIPS64EB-NEXT: sll $2, $6, 0 6265; MIPS64EB-NEXT: sw $2, 12($sp) 6266; MIPS64EB-NEXT: ld $1, %got_page(.LCPI41_0)($1) 6267; MIPS64EB-NEXT: ldc1 $f0, %got_ofst(.LCPI41_0)($1) 6268; MIPS64EB-NEXT: ldc1 $f1, 8($sp) 6269; MIPS64EB-NEXT: sub.d $f0, $f1, $f0 6270; MIPS64EB-NEXT: cvt.s.d $f0, $f0 6271; MIPS64EB-NEXT: dsrl $1, $4, 32 6272; MIPS64EB-NEXT: sll $1, $1, 0 6273; MIPS64EB-NEXT: mtc1 $1, $f1 6274; MIPS64EB-NEXT: add.s $f1, $f0, $f1 6275; MIPS64EB-NEXT: dsrl $1, $5, 32 6276; MIPS64EB-NEXT: mfc1 $2, $f1 6277; MIPS64EB-NEXT: sll $3, $4, 0 6278; MIPS64EB-NEXT: sll $1, $1, 0 6279; MIPS64EB-NEXT: mtc1 $1, $f1 6280; MIPS64EB-NEXT: add.s $f1, $f0, $f1 6281; MIPS64EB-NEXT: mfc1 $1, $f1 6282; MIPS64EB-NEXT: mtc1 $3, $f1 6283; MIPS64EB-NEXT: sll $3, $5, 0 6284; MIPS64EB-NEXT: mtc1 $3, $f2 6285; MIPS64EB-NEXT: dsll $2, $2, 32 6286; MIPS64EB-NEXT: add.s $f1, $f0, $f1 6287; MIPS64EB-NEXT: mfc1 $3, $f1 6288; MIPS64EB-NEXT: dsll $3, $3, 32 6289; MIPS64EB-NEXT: dsrl $3, $3, 32 6290; MIPS64EB-NEXT: or $2, $3, $2 6291; MIPS64EB-NEXT: dsll $1, $1, 32 6292; MIPS64EB-NEXT: add.s $f0, $f0, $f2 6293; MIPS64EB-NEXT: mfc1 $3, $f0 6294; MIPS64EB-NEXT: dsll $3, $3, 32 6295; MIPS64EB-NEXT: dsrl $3, $3, 32 6296; MIPS64EB-NEXT: or $3, $3, $1 6297; MIPS64EB-NEXT: daddiu $sp, $sp, 16 6298; MIPS64EB-NEXT: jr $ra 6299; MIPS64EB-NEXT: nop 6300; 6301; MIPS32R5EB-LABEL: mixed_32: 6302; MIPS32R5EB: # %bb.0: # %entry 6303; MIPS32R5EB-NEXT: addiu $sp, $sp, -8 6304; MIPS32R5EB-NEXT: .cfi_def_cfa_offset 8 6305; MIPS32R5EB-NEXT: lw $1, 32($sp) 6306; MIPS32R5EB-NEXT: sw $1, 4($sp) 6307; MIPS32R5EB-NEXT: lui $1, 17200 6308; MIPS32R5EB-NEXT: sw $1, 0($sp) 6309; MIPS32R5EB-NEXT: lui $1, %hi($CPI41_0) 6310; MIPS32R5EB-NEXT: ldc1 $f0, %lo($CPI41_0)($1) 6311; MIPS32R5EB-NEXT: ldc1 $f1, 0($sp) 6312; MIPS32R5EB-NEXT: sub.d $f0, $f1, $f0 6313; MIPS32R5EB-NEXT: insert.w $w1[0], $6 6314; MIPS32R5EB-NEXT: insert.w $w1[1], $7 6315; MIPS32R5EB-NEXT: lw $1, 24($sp) 6316; MIPS32R5EB-NEXT: insert.w $w1[2], $1 6317; MIPS32R5EB-NEXT: lw $1, 28($sp) 6318; MIPS32R5EB-NEXT: insert.w $w1[3], $1 6319; MIPS32R5EB-NEXT: cvt.s.d $f0, $f0 6320; MIPS32R5EB-NEXT: splati.w $w0, $w0[0] 6321; MIPS32R5EB-NEXT: fadd.w $w0, $w0, $w1 6322; MIPS32R5EB-NEXT: st.w $w0, 0($4) 6323; MIPS32R5EB-NEXT: addiu $sp, $sp, 8 6324; MIPS32R5EB-NEXT: jr $ra 6325; MIPS32R5EB-NEXT: nop 6326; 6327; MIPS64R5EB-LABEL: mixed_32: 6328; MIPS64R5EB: # %bb.0: # %entry 6329; MIPS64R5EB-NEXT: daddiu $sp, $sp, -16 6330; MIPS64R5EB-NEXT: .cfi_def_cfa_offset 16 6331; MIPS64R5EB-NEXT: lui $1, %hi(%neg(%gp_rel(mixed_32))) 6332; MIPS64R5EB-NEXT: daddu $1, $1, $25 6333; MIPS64R5EB-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(mixed_32))) 6334; MIPS64R5EB-NEXT: lui $2, 17200 6335; MIPS64R5EB-NEXT: sw $2, 8($sp) 6336; MIPS64R5EB-NEXT: sll $2, $6, 0 6337; MIPS64R5EB-NEXT: sw $2, 12($sp) 6338; MIPS64R5EB-NEXT: ld $1, %got_page(.LCPI41_0)($1) 6339; MIPS64R5EB-NEXT: ldc1 $f0, %got_ofst(.LCPI41_0)($1) 6340; MIPS64R5EB-NEXT: ldc1 $f1, 8($sp) 6341; MIPS64R5EB-NEXT: sub.d $f0, $f1, $f0 6342; MIPS64R5EB-NEXT: insert.d $w1[0], $4 6343; MIPS64R5EB-NEXT: insert.d $w1[1], $5 6344; MIPS64R5EB-NEXT: shf.w $w1, $w1, 177 6345; MIPS64R5EB-NEXT: cvt.s.d $f0, $f0 6346; MIPS64R5EB-NEXT: splati.w $w0, $w0[0] 6347; MIPS64R5EB-NEXT: fadd.w $w0, $w0, $w1 6348; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 6349; MIPS64R5EB-NEXT: copy_s.d $2, $w0[0] 6350; MIPS64R5EB-NEXT: copy_s.d $3, $w0[1] 6351; MIPS64R5EB-NEXT: daddiu $sp, $sp, 16 6352; MIPS64R5EB-NEXT: jr $ra 6353; MIPS64R5EB-NEXT: nop 6354; 6355; MIPS32EL-LABEL: mixed_32: 6356; MIPS32EL: # %bb.0: # %entry 6357; MIPS32EL-NEXT: addiu $sp, $sp, -8 6358; MIPS32EL-NEXT: .cfi_def_cfa_offset 8 6359; MIPS32EL-NEXT: lui $1, 17200 6360; MIPS32EL-NEXT: sw $1, 4($sp) 6361; MIPS32EL-NEXT: lw $1, 32($sp) 6362; MIPS32EL-NEXT: sw $1, 0($sp) 6363; MIPS32EL-NEXT: lui $1, %hi($CPI41_0) 6364; MIPS32EL-NEXT: ldc1 $f0, %lo($CPI41_0)($1) 6365; MIPS32EL-NEXT: ldc1 $f2, 0($sp) 6366; MIPS32EL-NEXT: sub.d $f0, $f2, $f0 6367; MIPS32EL-NEXT: cvt.s.d $f0, $f0 6368; MIPS32EL-NEXT: lwc1 $f1, 28($sp) 6369; MIPS32EL-NEXT: lwc1 $f2, 24($sp) 6370; MIPS32EL-NEXT: add.s $f2, $f0, $f2 6371; MIPS32EL-NEXT: add.s $f1, $f0, $f1 6372; MIPS32EL-NEXT: swc1 $f1, 12($4) 6373; MIPS32EL-NEXT: swc1 $f2, 8($4) 6374; MIPS32EL-NEXT: mtc1 $7, $f1 6375; MIPS32EL-NEXT: add.s $f1, $f0, $f1 6376; MIPS32EL-NEXT: swc1 $f1, 4($4) 6377; MIPS32EL-NEXT: mtc1 $6, $f1 6378; MIPS32EL-NEXT: add.s $f0, $f0, $f1 6379; MIPS32EL-NEXT: swc1 $f0, 0($4) 6380; MIPS32EL-NEXT: addiu $sp, $sp, 8 6381; MIPS32EL-NEXT: jr $ra 6382; MIPS32EL-NEXT: nop 6383; 6384; MIPS64EL-LABEL: mixed_32: 6385; MIPS64EL: # %bb.0: # %entry 6386; MIPS64EL-NEXT: daddiu $sp, $sp, -16 6387; MIPS64EL-NEXT: .cfi_def_cfa_offset 16 6388; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(mixed_32))) 6389; MIPS64EL-NEXT: daddu $1, $1, $25 6390; MIPS64EL-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(mixed_32))) 6391; MIPS64EL-NEXT: lui $2, 17200 6392; MIPS64EL-NEXT: sw $2, 12($sp) 6393; MIPS64EL-NEXT: sll $2, $6, 0 6394; MIPS64EL-NEXT: sw $2, 8($sp) 6395; MIPS64EL-NEXT: ld $1, %got_page(.LCPI41_0)($1) 6396; MIPS64EL-NEXT: ldc1 $f0, %got_ofst(.LCPI41_0)($1) 6397; MIPS64EL-NEXT: ldc1 $f1, 8($sp) 6398; MIPS64EL-NEXT: sub.d $f0, $f1, $f0 6399; MIPS64EL-NEXT: cvt.s.d $f0, $f0 6400; MIPS64EL-NEXT: dsrl $1, $4, 32 6401; MIPS64EL-NEXT: sll $1, $1, 0 6402; MIPS64EL-NEXT: mtc1 $1, $f1 6403; MIPS64EL-NEXT: add.s $f1, $f0, $f1 6404; MIPS64EL-NEXT: dsrl $1, $5, 32 6405; MIPS64EL-NEXT: mfc1 $2, $f1 6406; MIPS64EL-NEXT: sll $3, $4, 0 6407; MIPS64EL-NEXT: sll $1, $1, 0 6408; MIPS64EL-NEXT: mtc1 $1, $f1 6409; MIPS64EL-NEXT: add.s $f1, $f0, $f1 6410; MIPS64EL-NEXT: mfc1 $1, $f1 6411; MIPS64EL-NEXT: mtc1 $3, $f1 6412; MIPS64EL-NEXT: sll $3, $5, 0 6413; MIPS64EL-NEXT: mtc1 $3, $f2 6414; MIPS64EL-NEXT: dsll $2, $2, 32 6415; MIPS64EL-NEXT: add.s $f1, $f0, $f1 6416; MIPS64EL-NEXT: mfc1 $3, $f1 6417; MIPS64EL-NEXT: dsll $3, $3, 32 6418; MIPS64EL-NEXT: dsrl $3, $3, 32 6419; MIPS64EL-NEXT: or $2, $3, $2 6420; MIPS64EL-NEXT: dsll $1, $1, 32 6421; MIPS64EL-NEXT: add.s $f0, $f0, $f2 6422; MIPS64EL-NEXT: mfc1 $3, $f0 6423; MIPS64EL-NEXT: dsll $3, $3, 32 6424; MIPS64EL-NEXT: dsrl $3, $3, 32 6425; MIPS64EL-NEXT: or $3, $3, $1 6426; MIPS64EL-NEXT: daddiu $sp, $sp, 16 6427; MIPS64EL-NEXT: jr $ra 6428; MIPS64EL-NEXT: nop 6429; 6430; MIPS32R5EL-LABEL: mixed_32: 6431; MIPS32R5EL: # %bb.0: # %entry 6432; MIPS32R5EL-NEXT: addiu $sp, $sp, -8 6433; MIPS32R5EL-NEXT: .cfi_def_cfa_offset 8 6434; MIPS32R5EL-NEXT: lui $1, 17200 6435; MIPS32R5EL-NEXT: sw $1, 4($sp) 6436; MIPS32R5EL-NEXT: lw $1, 32($sp) 6437; MIPS32R5EL-NEXT: sw $1, 0($sp) 6438; MIPS32R5EL-NEXT: lui $1, %hi($CPI41_0) 6439; MIPS32R5EL-NEXT: ldc1 $f0, %lo($CPI41_0)($1) 6440; MIPS32R5EL-NEXT: ldc1 $f1, 0($sp) 6441; MIPS32R5EL-NEXT: sub.d $f0, $f1, $f0 6442; MIPS32R5EL-NEXT: insert.w $w1[0], $6 6443; MIPS32R5EL-NEXT: insert.w $w1[1], $7 6444; MIPS32R5EL-NEXT: lw $1, 24($sp) 6445; MIPS32R5EL-NEXT: insert.w $w1[2], $1 6446; MIPS32R5EL-NEXT: lw $1, 28($sp) 6447; MIPS32R5EL-NEXT: insert.w $w1[3], $1 6448; MIPS32R5EL-NEXT: cvt.s.d $f0, $f0 6449; MIPS32R5EL-NEXT: splati.w $w0, $w0[0] 6450; MIPS32R5EL-NEXT: fadd.w $w0, $w0, $w1 6451; MIPS32R5EL-NEXT: st.w $w0, 0($4) 6452; MIPS32R5EL-NEXT: addiu $sp, $sp, 8 6453; MIPS32R5EL-NEXT: jr $ra 6454; MIPS32R5EL-NEXT: nop 6455; 6456; MIPS64R5EL-LABEL: mixed_32: 6457; MIPS64R5EL: # %bb.0: # %entry 6458; MIPS64R5EL-NEXT: daddiu $sp, $sp, -16 6459; MIPS64R5EL-NEXT: .cfi_def_cfa_offset 16 6460; MIPS64R5EL-NEXT: lui $1, %hi(%neg(%gp_rel(mixed_32))) 6461; MIPS64R5EL-NEXT: daddu $1, $1, $25 6462; MIPS64R5EL-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(mixed_32))) 6463; MIPS64R5EL-NEXT: lui $2, 17200 6464; MIPS64R5EL-NEXT: sw $2, 12($sp) 6465; MIPS64R5EL-NEXT: sll $2, $6, 0 6466; MIPS64R5EL-NEXT: sw $2, 8($sp) 6467; MIPS64R5EL-NEXT: ld $1, %got_page(.LCPI41_0)($1) 6468; MIPS64R5EL-NEXT: ldc1 $f0, %got_ofst(.LCPI41_0)($1) 6469; MIPS64R5EL-NEXT: ldc1 $f1, 8($sp) 6470; MIPS64R5EL-NEXT: sub.d $f0, $f1, $f0 6471; MIPS64R5EL-NEXT: insert.d $w1[0], $4 6472; MIPS64R5EL-NEXT: insert.d $w1[1], $5 6473; MIPS64R5EL-NEXT: cvt.s.d $f0, $f0 6474; MIPS64R5EL-NEXT: splati.w $w0, $w0[0] 6475; MIPS64R5EL-NEXT: fadd.w $w0, $w0, $w1 6476; MIPS64R5EL-NEXT: copy_s.d $2, $w0[0] 6477; MIPS64R5EL-NEXT: copy_s.d $3, $w0[1] 6478; MIPS64R5EL-NEXT: daddiu $sp, $sp, 16 6479; MIPS64R5EL-NEXT: jr $ra 6480; MIPS64R5EL-NEXT: nop 6481entry: 6482 %0 = uitofp i32 %b to float 6483 %1 = insertelement <4 x float> undef, float %0, i32 0 6484 %2 = insertelement <4 x float> %1, float %0, i32 1 6485 %3 = insertelement <4 x float> %2, float %0, i32 2 6486 %4 = insertelement <4 x float> %3, float %0, i32 3 6487 %5 = fadd <4 x float> %4, %a 6488 ret <4 x float> %5 6489} 6490 6491 6492; This test is slightly more fragile than I'd like as the offset into the 6493; outgoing arguments area is dependant on the size of the stack frame for 6494; this function. 6495 6496define <4 x float> @cast(<4 x i32> %a) { 6497; MIPS32EB-LABEL: cast: 6498; MIPS32EB: # %bb.0: # %entry 6499; MIPS32EB-NEXT: addiu $sp, $sp, -32 6500; MIPS32EB-NEXT: .cfi_def_cfa_offset 32 6501; MIPS32EB-NEXT: lw $1, 48($sp) 6502; MIPS32EB-NEXT: lui $2, 17200 6503; MIPS32EB-NEXT: lw $3, 52($sp) 6504; MIPS32EB-NEXT: sw $3, 28($sp) 6505; MIPS32EB-NEXT: sw $2, 24($sp) 6506; MIPS32EB-NEXT: sw $1, 20($sp) 6507; MIPS32EB-NEXT: sw $2, 16($sp) 6508; MIPS32EB-NEXT: lui $1, %hi($CPI42_0) 6509; MIPS32EB-NEXT: sw $7, 12($sp) 6510; MIPS32EB-NEXT: sw $2, 8($sp) 6511; MIPS32EB-NEXT: ldc1 $f0, %lo($CPI42_0)($1) 6512; MIPS32EB-NEXT: ldc1 $f2, 24($sp) 6513; MIPS32EB-NEXT: sub.d $f2, $f2, $f0 6514; MIPS32EB-NEXT: ldc1 $f4, 16($sp) 6515; MIPS32EB-NEXT: sub.d $f4, $f4, $f0 6516; MIPS32EB-NEXT: ldc1 $f6, 8($sp) 6517; MIPS32EB-NEXT: sub.d $f6, $f6, $f0 6518; MIPS32EB-NEXT: cvt.s.d $f6, $f6 6519; MIPS32EB-NEXT: cvt.s.d $f4, $f4 6520; MIPS32EB-NEXT: cvt.s.d $f2, $f2 6521; MIPS32EB-NEXT: swc1 $f2, 12($4) 6522; MIPS32EB-NEXT: swc1 $f4, 8($4) 6523; MIPS32EB-NEXT: swc1 $f6, 4($4) 6524; MIPS32EB-NEXT: sw $6, 4($sp) 6525; MIPS32EB-NEXT: sw $2, 0($sp) 6526; MIPS32EB-NEXT: ldc1 $f2, 0($sp) 6527; MIPS32EB-NEXT: sub.d $f0, $f2, $f0 6528; MIPS32EB-NEXT: cvt.s.d $f0, $f0 6529; MIPS32EB-NEXT: swc1 $f0, 0($4) 6530; MIPS32EB-NEXT: addiu $sp, $sp, 32 6531; MIPS32EB-NEXT: jr $ra 6532; MIPS32EB-NEXT: nop 6533; 6534; MIPS64EB-LABEL: cast: 6535; MIPS64EB: # %bb.0: # %entry 6536; MIPS64EB-NEXT: daddiu $sp, $sp, -32 6537; MIPS64EB-NEXT: .cfi_def_cfa_offset 32 6538; MIPS64EB-NEXT: lui $1, %hi(%neg(%gp_rel(cast))) 6539; MIPS64EB-NEXT: daddu $1, $1, $25 6540; MIPS64EB-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(cast))) 6541; MIPS64EB-NEXT: sll $2, $4, 0 6542; MIPS64EB-NEXT: lui $3, 17200 6543; MIPS64EB-NEXT: sw $3, 0($sp) 6544; MIPS64EB-NEXT: sw $2, 4($sp) 6545; MIPS64EB-NEXT: sll $2, $5, 0 6546; MIPS64EB-NEXT: sw $3, 8($sp) 6547; MIPS64EB-NEXT: sw $2, 12($sp) 6548; MIPS64EB-NEXT: ld $1, %got_page(.LCPI42_0)($1) 6549; MIPS64EB-NEXT: ldc1 $f0, %got_ofst(.LCPI42_0)($1) 6550; MIPS64EB-NEXT: ldc1 $f1, 0($sp) 6551; MIPS64EB-NEXT: sub.d $f1, $f1, $f0 6552; MIPS64EB-NEXT: cvt.s.d $f1, $f1 6553; MIPS64EB-NEXT: ldc1 $f2, 8($sp) 6554; MIPS64EB-NEXT: sub.d $f2, $f2, $f0 6555; MIPS64EB-NEXT: mfc1 $1, $f1 6556; MIPS64EB-NEXT: dsrl $2, $4, 32 6557; MIPS64EB-NEXT: sll $2, $2, 0 6558; MIPS64EB-NEXT: sw $3, 16($sp) 6559; MIPS64EB-NEXT: sw $2, 20($sp) 6560; MIPS64EB-NEXT: sw $3, 24($sp) 6561; MIPS64EB-NEXT: dsll $1, $1, 32 6562; MIPS64EB-NEXT: cvt.s.d $f1, $f2 6563; MIPS64EB-NEXT: dsrl $2, $5, 32 6564; MIPS64EB-NEXT: sll $2, $2, 0 6565; MIPS64EB-NEXT: sw $2, 28($sp) 6566; MIPS64EB-NEXT: mfc1 $2, $f1 6567; MIPS64EB-NEXT: dsll $3, $2, 32 6568; MIPS64EB-NEXT: dsrl $1, $1, 32 6569; MIPS64EB-NEXT: ldc1 $f1, 16($sp) 6570; MIPS64EB-NEXT: sub.d $f1, $f1, $f0 6571; MIPS64EB-NEXT: cvt.s.d $f1, $f1 6572; MIPS64EB-NEXT: mfc1 $2, $f1 6573; MIPS64EB-NEXT: dsll $2, $2, 32 6574; MIPS64EB-NEXT: or $2, $1, $2 6575; MIPS64EB-NEXT: dsrl $1, $3, 32 6576; MIPS64EB-NEXT: ldc1 $f1, 24($sp) 6577; MIPS64EB-NEXT: sub.d $f0, $f1, $f0 6578; MIPS64EB-NEXT: cvt.s.d $f0, $f0 6579; MIPS64EB-NEXT: mfc1 $3, $f0 6580; MIPS64EB-NEXT: dsll $3, $3, 32 6581; MIPS64EB-NEXT: or $3, $1, $3 6582; MIPS64EB-NEXT: daddiu $sp, $sp, 32 6583; MIPS64EB-NEXT: jr $ra 6584; MIPS64EB-NEXT: nop 6585; 6586; MIPS32R5-LABEL: cast: 6587; MIPS32R5: # %bb.0: # %entry 6588; MIPS32R5-NEXT: insert.w $w0[0], $6 6589; MIPS32R5-NEXT: insert.w $w0[1], $7 6590; MIPS32R5-NEXT: lw $1, 16($sp) 6591; MIPS32R5-NEXT: insert.w $w0[2], $1 6592; MIPS32R5-NEXT: lw $1, 20($sp) 6593; MIPS32R5-NEXT: insert.w $w0[3], $1 6594; MIPS32R5-NEXT: ffint_u.w $w0, $w0 6595; MIPS32R5-NEXT: st.w $w0, 0($4) 6596; MIPS32R5-NEXT: jr $ra 6597; MIPS32R5-NEXT: nop 6598; 6599; MIPS64R5EB-LABEL: cast: 6600; MIPS64R5EB: # %bb.0: # %entry 6601; MIPS64R5EB-NEXT: insert.d $w0[0], $4 6602; MIPS64R5EB-NEXT: insert.d $w0[1], $5 6603; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 6604; MIPS64R5EB-NEXT: ffint_u.w $w0, $w0 6605; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 6606; MIPS64R5EB-NEXT: copy_s.d $2, $w0[0] 6607; MIPS64R5EB-NEXT: copy_s.d $3, $w0[1] 6608; MIPS64R5EB-NEXT: jr $ra 6609; MIPS64R5EB-NEXT: nop 6610; 6611; MIPS32EL-LABEL: cast: 6612; MIPS32EL: # %bb.0: # %entry 6613; MIPS32EL-NEXT: addiu $sp, $sp, -32 6614; MIPS32EL-NEXT: .cfi_def_cfa_offset 32 6615; MIPS32EL-NEXT: lw $1, 52($sp) 6616; MIPS32EL-NEXT: lui $2, 17200 6617; MIPS32EL-NEXT: sw $2, 28($sp) 6618; MIPS32EL-NEXT: sw $1, 24($sp) 6619; MIPS32EL-NEXT: lw $1, 48($sp) 6620; MIPS32EL-NEXT: sw $2, 20($sp) 6621; MIPS32EL-NEXT: sw $1, 16($sp) 6622; MIPS32EL-NEXT: lui $1, %hi($CPI42_0) 6623; MIPS32EL-NEXT: sw $2, 12($sp) 6624; MIPS32EL-NEXT: sw $7, 8($sp) 6625; MIPS32EL-NEXT: ldc1 $f0, %lo($CPI42_0)($1) 6626; MIPS32EL-NEXT: ldc1 $f2, 24($sp) 6627; MIPS32EL-NEXT: sub.d $f2, $f2, $f0 6628; MIPS32EL-NEXT: ldc1 $f4, 16($sp) 6629; MIPS32EL-NEXT: sub.d $f4, $f4, $f0 6630; MIPS32EL-NEXT: ldc1 $f6, 8($sp) 6631; MIPS32EL-NEXT: sub.d $f6, $f6, $f0 6632; MIPS32EL-NEXT: cvt.s.d $f6, $f6 6633; MIPS32EL-NEXT: cvt.s.d $f4, $f4 6634; MIPS32EL-NEXT: cvt.s.d $f2, $f2 6635; MIPS32EL-NEXT: swc1 $f2, 12($4) 6636; MIPS32EL-NEXT: swc1 $f4, 8($4) 6637; MIPS32EL-NEXT: swc1 $f6, 4($4) 6638; MIPS32EL-NEXT: sw $2, 4($sp) 6639; MIPS32EL-NEXT: sw $6, 0($sp) 6640; MIPS32EL-NEXT: ldc1 $f2, 0($sp) 6641; MIPS32EL-NEXT: sub.d $f0, $f2, $f0 6642; MIPS32EL-NEXT: cvt.s.d $f0, $f0 6643; MIPS32EL-NEXT: swc1 $f0, 0($4) 6644; MIPS32EL-NEXT: addiu $sp, $sp, 32 6645; MIPS32EL-NEXT: jr $ra 6646; MIPS32EL-NEXT: nop 6647; 6648; MIPS64EL-LABEL: cast: 6649; MIPS64EL: # %bb.0: # %entry 6650; MIPS64EL-NEXT: daddiu $sp, $sp, -32 6651; MIPS64EL-NEXT: .cfi_def_cfa_offset 32 6652; MIPS64EL-NEXT: lui $1, %hi(%neg(%gp_rel(cast))) 6653; MIPS64EL-NEXT: daddu $1, $1, $25 6654; MIPS64EL-NEXT: daddiu $1, $1, %lo(%neg(%gp_rel(cast))) 6655; MIPS64EL-NEXT: sll $2, $4, 0 6656; MIPS64EL-NEXT: lui $3, 17200 6657; MIPS64EL-NEXT: sw $3, 4($sp) 6658; MIPS64EL-NEXT: sw $2, 0($sp) 6659; MIPS64EL-NEXT: sll $2, $5, 0 6660; MIPS64EL-NEXT: sw $3, 12($sp) 6661; MIPS64EL-NEXT: sw $2, 8($sp) 6662; MIPS64EL-NEXT: ld $1, %got_page(.LCPI42_0)($1) 6663; MIPS64EL-NEXT: ldc1 $f0, %got_ofst(.LCPI42_0)($1) 6664; MIPS64EL-NEXT: ldc1 $f1, 0($sp) 6665; MIPS64EL-NEXT: sub.d $f1, $f1, $f0 6666; MIPS64EL-NEXT: cvt.s.d $f1, $f1 6667; MIPS64EL-NEXT: ldc1 $f2, 8($sp) 6668; MIPS64EL-NEXT: sub.d $f2, $f2, $f0 6669; MIPS64EL-NEXT: mfc1 $1, $f1 6670; MIPS64EL-NEXT: dsrl $2, $4, 32 6671; MIPS64EL-NEXT: sll $2, $2, 0 6672; MIPS64EL-NEXT: sw $3, 20($sp) 6673; MIPS64EL-NEXT: sw $2, 16($sp) 6674; MIPS64EL-NEXT: sw $3, 28($sp) 6675; MIPS64EL-NEXT: dsll $1, $1, 32 6676; MIPS64EL-NEXT: cvt.s.d $f1, $f2 6677; MIPS64EL-NEXT: dsrl $2, $5, 32 6678; MIPS64EL-NEXT: sll $2, $2, 0 6679; MIPS64EL-NEXT: sw $2, 24($sp) 6680; MIPS64EL-NEXT: mfc1 $2, $f1 6681; MIPS64EL-NEXT: dsll $3, $2, 32 6682; MIPS64EL-NEXT: dsrl $1, $1, 32 6683; MIPS64EL-NEXT: ldc1 $f1, 16($sp) 6684; MIPS64EL-NEXT: sub.d $f1, $f1, $f0 6685; MIPS64EL-NEXT: cvt.s.d $f1, $f1 6686; MIPS64EL-NEXT: mfc1 $2, $f1 6687; MIPS64EL-NEXT: dsll $2, $2, 32 6688; MIPS64EL-NEXT: or $2, $1, $2 6689; MIPS64EL-NEXT: dsrl $1, $3, 32 6690; MIPS64EL-NEXT: ldc1 $f1, 24($sp) 6691; MIPS64EL-NEXT: sub.d $f0, $f1, $f0 6692; MIPS64EL-NEXT: cvt.s.d $f0, $f0 6693; MIPS64EL-NEXT: mfc1 $3, $f0 6694; MIPS64EL-NEXT: dsll $3, $3, 32 6695; MIPS64EL-NEXT: or $3, $1, $3 6696; MIPS64EL-NEXT: daddiu $sp, $sp, 32 6697; MIPS64EL-NEXT: jr $ra 6698; MIPS64EL-NEXT: nop 6699; 6700; MIPS64R5EL-LABEL: cast: 6701; MIPS64R5EL: # %bb.0: # %entry 6702; MIPS64R5EL-NEXT: insert.d $w0[0], $4 6703; MIPS64R5EL-NEXT: insert.d $w0[1], $5 6704; MIPS64R5EL-NEXT: ffint_u.w $w0, $w0 6705; MIPS64R5EL-NEXT: copy_s.d $2, $w0[0] 6706; MIPS64R5EL-NEXT: copy_s.d $3, $w0[1] 6707; MIPS64R5EL-NEXT: jr $ra 6708; MIPS64R5EL-NEXT: nop 6709entry: 6710 %0 = uitofp <4 x i32> %a to <4 x float> 6711 ret <4 x float> %0 6712} 6713 6714define <4 x float> @select(<4 x i32> %cond, <4 x float> %arg1, <4 x float> %arg2) { 6715; MIPS32-LABEL: select: 6716; MIPS32: # %bb.0: # %entry 6717; MIPS32-NEXT: andi $1, $7, 1 6718; MIPS32-NEXT: lw $2, 16($sp) 6719; MIPS32-NEXT: andi $2, $2, 1 6720; MIPS32-NEXT: addiu $3, $sp, 44 6721; MIPS32-NEXT: addiu $5, $sp, 28 6722; MIPS32-NEXT: addiu $7, $sp, 48 6723; MIPS32-NEXT: addiu $8, $sp, 32 6724; MIPS32-NEXT: movn $7, $8, $2 6725; MIPS32-NEXT: movn $3, $5, $1 6726; MIPS32-NEXT: andi $1, $6, 1 6727; MIPS32-NEXT: addiu $2, $sp, 40 6728; MIPS32-NEXT: addiu $5, $sp, 24 6729; MIPS32-NEXT: movn $2, $5, $1 6730; MIPS32-NEXT: lw $1, 20($sp) 6731; MIPS32-NEXT: lwc1 $f0, 0($2) 6732; MIPS32-NEXT: lwc1 $f1, 0($3) 6733; MIPS32-NEXT: lwc1 $f2, 0($7) 6734; MIPS32-NEXT: andi $1, $1, 1 6735; MIPS32-NEXT: addiu $2, $sp, 52 6736; MIPS32-NEXT: addiu $3, $sp, 36 6737; MIPS32-NEXT: movn $2, $3, $1 6738; MIPS32-NEXT: lwc1 $f3, 0($2) 6739; MIPS32-NEXT: swc1 $f3, 12($4) 6740; MIPS32-NEXT: swc1 $f2, 8($4) 6741; MIPS32-NEXT: swc1 $f1, 4($4) 6742; MIPS32-NEXT: swc1 $f0, 0($4) 6743; MIPS32-NEXT: jr $ra 6744; MIPS32-NEXT: nop 6745; 6746; MIPS64-LABEL: select: 6747; MIPS64: # %bb.0: # %entry 6748; MIPS64-NEXT: sll $1, $8, 0 6749; MIPS64-NEXT: mtc1 $1, $f0 6750; MIPS64-NEXT: sll $1, $4, 0 6751; MIPS64-NEXT: andi $1, $1, 1 6752; MIPS64-NEXT: sll $2, $6, 0 6753; MIPS64-NEXT: mtc1 $2, $f1 6754; MIPS64-NEXT: movn.s $f0, $f1, $1 6755; MIPS64-NEXT: dsrl $1, $8, 32 6756; MIPS64-NEXT: dsrl $2, $4, 32 6757; MIPS64-NEXT: sll $1, $1, 0 6758; MIPS64-NEXT: mfc1 $3, $f0 6759; MIPS64-NEXT: sll $4, $9, 0 6760; MIPS64-NEXT: mtc1 $1, $f0 6761; MIPS64-NEXT: sll $1, $2, 0 6762; MIPS64-NEXT: andi $1, $1, 1 6763; MIPS64-NEXT: dsrl $2, $6, 32 6764; MIPS64-NEXT: sll $2, $2, 0 6765; MIPS64-NEXT: mtc1 $2, $f1 6766; MIPS64-NEXT: movn.s $f0, $f1, $1 6767; MIPS64-NEXT: dsll $1, $3, 32 6768; MIPS64-NEXT: mtc1 $4, $f1 6769; MIPS64-NEXT: sll $2, $5, 0 6770; MIPS64-NEXT: andi $2, $2, 1 6771; MIPS64-NEXT: sll $3, $7, 0 6772; MIPS64-NEXT: mtc1 $3, $f2 6773; MIPS64-NEXT: movn.s $f1, $f2, $2 6774; MIPS64-NEXT: mfc1 $2, $f1 6775; MIPS64-NEXT: dsll $3, $2, 32 6776; MIPS64-NEXT: dsrl $1, $1, 32 6777; MIPS64-NEXT: mfc1 $2, $f0 6778; MIPS64-NEXT: dsrl $4, $5, 32 6779; MIPS64-NEXT: dsrl $5, $9, 32 6780; MIPS64-NEXT: dsll $2, $2, 32 6781; MIPS64-NEXT: sll $5, $5, 0 6782; MIPS64-NEXT: or $2, $1, $2 6783; MIPS64-NEXT: dsrl $1, $3, 32 6784; MIPS64-NEXT: mtc1 $5, $f0 6785; MIPS64-NEXT: sll $3, $4, 0 6786; MIPS64-NEXT: andi $3, $3, 1 6787; MIPS64-NEXT: dsrl $4, $7, 32 6788; MIPS64-NEXT: sll $4, $4, 0 6789; MIPS64-NEXT: mtc1 $4, $f1 6790; MIPS64-NEXT: movn.s $f0, $f1, $3 6791; MIPS64-NEXT: mfc1 $3, $f0 6792; MIPS64-NEXT: dsll $3, $3, 32 6793; MIPS64-NEXT: or $3, $1, $3 6794; MIPS64-NEXT: jr $ra 6795; MIPS64-NEXT: nop 6796; 6797; MIPS32R5-LABEL: select: 6798; MIPS32R5: # %bb.0: # %entry 6799; MIPS32R5-NEXT: lw $1, 44($sp) 6800; MIPS32R5-NEXT: lw $2, 40($sp) 6801; MIPS32R5-NEXT: insert.w $w0[0], $2 6802; MIPS32R5-NEXT: insert.w $w0[1], $1 6803; MIPS32R5-NEXT: lw $1, 48($sp) 6804; MIPS32R5-NEXT: insert.w $w0[2], $1 6805; MIPS32R5-NEXT: lw $1, 28($sp) 6806; MIPS32R5-NEXT: lw $2, 24($sp) 6807; MIPS32R5-NEXT: lw $3, 52($sp) 6808; MIPS32R5-NEXT: insert.w $w0[3], $3 6809; MIPS32R5-NEXT: insert.w $w1[0], $2 6810; MIPS32R5-NEXT: insert.w $w1[1], $1 6811; MIPS32R5-NEXT: lw $1, 32($sp) 6812; MIPS32R5-NEXT: insert.w $w1[2], $1 6813; MIPS32R5-NEXT: lw $1, 36($sp) 6814; MIPS32R5-NEXT: insert.w $w1[3], $1 6815; MIPS32R5-NEXT: insert.w $w2[0], $6 6816; MIPS32R5-NEXT: insert.w $w2[1], $7 6817; MIPS32R5-NEXT: lw $1, 16($sp) 6818; MIPS32R5-NEXT: insert.w $w2[2], $1 6819; MIPS32R5-NEXT: lw $1, 20($sp) 6820; MIPS32R5-NEXT: insert.w $w2[3], $1 6821; MIPS32R5-NEXT: slli.w $w2, $w2, 31 6822; MIPS32R5-NEXT: srai.w $w2, $w2, 31 6823; MIPS32R5-NEXT: bsel.v $w2, $w0, $w1 6824; MIPS32R5-NEXT: st.w $w2, 0($4) 6825; MIPS32R5-NEXT: jr $ra 6826; MIPS32R5-NEXT: nop 6827; 6828; MIPS64R5EB-LABEL: select: 6829; MIPS64R5EB: # %bb.0: # %entry 6830; MIPS64R5EB-NEXT: insert.d $w0[0], $8 6831; MIPS64R5EB-NEXT: insert.d $w0[1], $9 6832; MIPS64R5EB-NEXT: shf.w $w0, $w0, 177 6833; MIPS64R5EB-NEXT: insert.d $w1[0], $6 6834; MIPS64R5EB-NEXT: insert.d $w1[1], $7 6835; MIPS64R5EB-NEXT: shf.w $w1, $w1, 177 6836; MIPS64R5EB-NEXT: insert.d $w2[0], $4 6837; MIPS64R5EB-NEXT: insert.d $w2[1], $5 6838; MIPS64R5EB-NEXT: shf.w $w2, $w2, 177 6839; MIPS64R5EB-NEXT: slli.w $w2, $w2, 31 6840; MIPS64R5EB-NEXT: srai.w $w2, $w2, 31 6841; MIPS64R5EB-NEXT: bsel.v $w2, $w0, $w1 6842; MIPS64R5EB-NEXT: shf.w $w0, $w2, 177 6843; MIPS64R5EB-NEXT: copy_s.d $2, $w0[0] 6844; MIPS64R5EB-NEXT: copy_s.d $3, $w0[1] 6845; MIPS64R5EB-NEXT: jr $ra 6846; MIPS64R5EB-NEXT: nop 6847; 6848; MIPS64R5EL-LABEL: select: 6849; MIPS64R5EL: # %bb.0: # %entry 6850; MIPS64R5EL-NEXT: insert.d $w0[0], $8 6851; MIPS64R5EL-NEXT: insert.d $w0[1], $9 6852; MIPS64R5EL-NEXT: insert.d $w1[0], $6 6853; MIPS64R5EL-NEXT: insert.d $w1[1], $7 6854; MIPS64R5EL-NEXT: insert.d $w2[0], $4 6855; MIPS64R5EL-NEXT: insert.d $w2[1], $5 6856; MIPS64R5EL-NEXT: slli.w $w2, $w2, 31 6857; MIPS64R5EL-NEXT: srai.w $w2, $w2, 31 6858; MIPS64R5EL-NEXT: bsel.v $w2, $w0, $w1 6859; MIPS64R5EL-NEXT: copy_s.d $2, $w2[0] 6860; MIPS64R5EL-NEXT: copy_s.d $3, $w2[1] 6861; MIPS64R5EL-NEXT: jr $ra 6862; MIPS64R5EL-NEXT: nop 6863entry: 6864 %cond.t = trunc <4 x i32> %cond to <4 x i1> 6865 %res = select <4 x i1> %cond.t, <4 x float> %arg1, <4 x float> %arg2 6866 ret <4 x float> %res 6867} 6868