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