brintos

brintos / llvm-project-archived public Read only

0
0
Text · 83.0 KiB · 7228d53 Raw
2081 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mattr=+simd128,+sign-ext | FileCheck %s --check-prefix=SIMD1283; RUN: llc < %s -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers | FileCheck %s --check-prefix=NO-SIMD1284 5; Test that basic SIMD128 vector manipulation operations assemble as expected.6 7target triple = "wasm32-unknown-unknown"8 9; ==============================================================================10; 16 x i811; ==============================================================================12define <16 x i8> @const_v16i8() {13; SIMD128-LABEL: const_v16i8:14; SIMD128:         .functype const_v16i8 () -> (v128)15; SIMD128-NEXT:  # %bb.0:16; SIMD128-NEXT:    v128.const $push0=, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 1517; SIMD128-NEXT:    return $pop018;19; NO-SIMD128-LABEL: const_v16i8:20; NO-SIMD128:         .functype const_v16i8 (i32) -> ()21; NO-SIMD128-NEXT:  # %bb.0:22; NO-SIMD128-NEXT:    i64.const $push0=, 108481890561884391223; NO-SIMD128-NEXT:    i64.store 8($0), $pop024; NO-SIMD128-NEXT:    i64.const $push1=, 50609752291423052825; NO-SIMD128-NEXT:    i64.store 0($0), $pop126; NO-SIMD128-NEXT:    return27  ret <16 x i8> <i8 00, i8 01, i8 02, i8 03, i8 04, i8 05, i8 06, i8 07,28                 i8 08, i8 09, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>29}30 31define <16 x i8> @splat_v16i8(i8 %x) {32; SIMD128-LABEL: splat_v16i8:33; SIMD128:         .functype splat_v16i8 (i32) -> (v128)34; SIMD128-NEXT:  # %bb.0:35; SIMD128-NEXT:    i8x16.splat $push0=, $036; SIMD128-NEXT:    return $pop037;38; NO-SIMD128-LABEL: splat_v16i8:39; NO-SIMD128:         .functype splat_v16i8 (i32, i32) -> ()40; NO-SIMD128-NEXT:  # %bb.0:41; NO-SIMD128-NEXT:    i32.store8 15($0), $142; NO-SIMD128-NEXT:    i32.store8 14($0), $143; NO-SIMD128-NEXT:    i32.store8 13($0), $144; NO-SIMD128-NEXT:    i32.store8 12($0), $145; NO-SIMD128-NEXT:    i32.store8 11($0), $146; NO-SIMD128-NEXT:    i32.store8 10($0), $147; NO-SIMD128-NEXT:    i32.store8 9($0), $148; NO-SIMD128-NEXT:    i32.store8 8($0), $149; NO-SIMD128-NEXT:    i32.store8 7($0), $150; NO-SIMD128-NEXT:    i32.store8 6($0), $151; NO-SIMD128-NEXT:    i32.store8 5($0), $152; NO-SIMD128-NEXT:    i32.store8 4($0), $153; NO-SIMD128-NEXT:    i32.store8 3($0), $154; NO-SIMD128-NEXT:    i32.store8 2($0), $155; NO-SIMD128-NEXT:    i32.store8 1($0), $156; NO-SIMD128-NEXT:    i32.store8 0($0), $157; NO-SIMD128-NEXT:    return58  %v = insertelement <16 x i8> undef, i8 %x, i32 059  %res = shufflevector <16 x i8> %v, <16 x i8> undef,60    <16 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0,61                i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>62  ret <16 x i8> %res63}64 65define <16 x i8> @const_splat_v16i8() {66; SIMD128-LABEL: const_splat_v16i8:67; SIMD128:         .functype const_splat_v16i8 () -> (v128)68; SIMD128-NEXT:  # %bb.0:69; SIMD128-NEXT:    v128.const $push0=, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 4270; SIMD128-NEXT:    return $pop071;72; NO-SIMD128-LABEL: const_splat_v16i8:73; NO-SIMD128:         .functype const_splat_v16i8 (i32) -> ()74; NO-SIMD128-NEXT:  # %bb.0:75; NO-SIMD128-NEXT:    i64.const $push0=, 303828725919922026676; NO-SIMD128-NEXT:    i64.store 8($0), $pop077; NO-SIMD128-NEXT:    i64.const $push1=, 303828725919922026678; NO-SIMD128-NEXT:    i64.store 0($0), $pop179; NO-SIMD128-NEXT:    return80  ret <16 x i8> <i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42,81                 i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42, i8 42>82}83 84define i32 @extract_v16i8_s(<16 x i8> %v) {85; SIMD128-LABEL: extract_v16i8_s:86; SIMD128:         .functype extract_v16i8_s (v128) -> (i32)87; SIMD128-NEXT:  # %bb.0:88; SIMD128-NEXT:    i8x16.extract_lane_s $push0=, $0, 1389; SIMD128-NEXT:    return $pop090;91; NO-SIMD128-LABEL: extract_v16i8_s:92; NO-SIMD128:         .functype extract_v16i8_s (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)93; NO-SIMD128-NEXT:  # %bb.0:94; NO-SIMD128-NEXT:    i32.extend8_s $push0=, $1395; NO-SIMD128-NEXT:    return $pop096  %elem = extractelement <16 x i8> %v, i8 1397  %a = sext i8 %elem to i3298  ret i32 %a99}100 101define i32 @extract_var_v16i8_s(<16 x i8> %v, i32 %i) {102; SIMD128-LABEL: extract_var_v16i8_s:103; SIMD128:         .functype extract_var_v16i8_s (v128, i32) -> (i32)104; SIMD128-NEXT:  # %bb.0:105; SIMD128-NEXT:    global.get $push4=, __stack_pointer106; SIMD128-NEXT:    i32.const $push5=, 16107; SIMD128-NEXT:    i32.sub $push7=, $pop4, $pop5108; SIMD128-NEXT:    local.tee $push6=, $2=, $pop7109; SIMD128-NEXT:    v128.store 0($pop6), $0110; SIMD128-NEXT:    i32.const $push0=, 15111; SIMD128-NEXT:    i32.and $push1=, $1, $pop0112; SIMD128-NEXT:    i32.or $push2=, $2, $pop1113; SIMD128-NEXT:    i32.load8_s $push3=, 0($pop2)114; SIMD128-NEXT:    return $pop3115;116; NO-SIMD128-LABEL: extract_var_v16i8_s:117; NO-SIMD128:         .functype extract_var_v16i8_s (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)118; NO-SIMD128-NEXT:  # %bb.0:119; NO-SIMD128-NEXT:    global.get $push4=, __stack_pointer120; NO-SIMD128-NEXT:    i32.const $push5=, 16121; NO-SIMD128-NEXT:    i32.sub $push7=, $pop4, $pop5122; NO-SIMD128-NEXT:    local.tee $push6=, $17=, $pop7123; NO-SIMD128-NEXT:    i32.store8 15($pop6), $15124; NO-SIMD128-NEXT:    i32.store8 14($17), $14125; NO-SIMD128-NEXT:    i32.store8 13($17), $13126; NO-SIMD128-NEXT:    i32.store8 12($17), $12127; NO-SIMD128-NEXT:    i32.store8 11($17), $11128; NO-SIMD128-NEXT:    i32.store8 10($17), $10129; NO-SIMD128-NEXT:    i32.store8 9($17), $9130; NO-SIMD128-NEXT:    i32.store8 8($17), $8131; NO-SIMD128-NEXT:    i32.store8 7($17), $7132; NO-SIMD128-NEXT:    i32.store8 6($17), $6133; NO-SIMD128-NEXT:    i32.store8 5($17), $5134; NO-SIMD128-NEXT:    i32.store8 4($17), $4135; NO-SIMD128-NEXT:    i32.store8 3($17), $3136; NO-SIMD128-NEXT:    i32.store8 2($17), $2137; NO-SIMD128-NEXT:    i32.store8 1($17), $1138; NO-SIMD128-NEXT:    i32.store8 0($17), $0139; NO-SIMD128-NEXT:    i32.const $push0=, 15140; NO-SIMD128-NEXT:    i32.and $push1=, $16, $pop0141; NO-SIMD128-NEXT:    i32.or $push2=, $17, $pop1142; NO-SIMD128-NEXT:    i32.load8_s $push3=, 0($pop2)143; NO-SIMD128-NEXT:    return $pop3144  %elem = extractelement <16 x i8> %v, i32 %i145  %a = sext i8 %elem to i32146  ret i32 %a147}148 149define i32 @extract_undef_v16i8_s(<16 x i8> %v) {150; SIMD128-LABEL: extract_undef_v16i8_s:151; SIMD128:         .functype extract_undef_v16i8_s (v128) -> (i32)152; SIMD128-NEXT:  # %bb.0:153; SIMD128-NEXT:    i8x16.extract_lane_s $push0=, $0, 0154; SIMD128-NEXT:    return $pop0155;156; NO-SIMD128-LABEL: extract_undef_v16i8_s:157; NO-SIMD128:         .functype extract_undef_v16i8_s (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)158; NO-SIMD128-NEXT:  # %bb.0:159; NO-SIMD128-NEXT:    i32.extend8_s $push0=, $0160; NO-SIMD128-NEXT:    return $pop0161  %elem = extractelement <16 x i8> %v, i8 undef162  %a = sext i8 %elem to i32163  ret i32 %a164}165 166define i32 @extract_v16i8_u(<16 x i8> %v) {167; SIMD128-LABEL: extract_v16i8_u:168; SIMD128:         .functype extract_v16i8_u (v128) -> (i32)169; SIMD128-NEXT:  # %bb.0:170; SIMD128-NEXT:    i8x16.extract_lane_u $push0=, $0, 13171; SIMD128-NEXT:    return $pop0172;173; NO-SIMD128-LABEL: extract_v16i8_u:174; NO-SIMD128:         .functype extract_v16i8_u (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)175; NO-SIMD128-NEXT:  # %bb.0:176; NO-SIMD128-NEXT:    i32.const $push0=, 255177; NO-SIMD128-NEXT:    i32.and $push1=, $13, $pop0178; NO-SIMD128-NEXT:    return $pop1179  %elem = extractelement <16 x i8> %v, i8 13180  %a = zext i8 %elem to i32181  ret i32 %a182}183 184define i32 @extract_var_v16i8_u(<16 x i8> %v, i32 %i) {185; SIMD128-LABEL: extract_var_v16i8_u:186; SIMD128:         .functype extract_var_v16i8_u (v128, i32) -> (i32)187; SIMD128-NEXT:  # %bb.0:188; SIMD128-NEXT:    global.get $push4=, __stack_pointer189; SIMD128-NEXT:    i32.const $push5=, 16190; SIMD128-NEXT:    i32.sub $push7=, $pop4, $pop5191; SIMD128-NEXT:    local.tee $push6=, $2=, $pop7192; SIMD128-NEXT:    v128.store 0($pop6), $0193; SIMD128-NEXT:    i32.const $push0=, 15194; SIMD128-NEXT:    i32.and $push1=, $1, $pop0195; SIMD128-NEXT:    i32.or $push2=, $2, $pop1196; SIMD128-NEXT:    i32.load8_u $push3=, 0($pop2)197; SIMD128-NEXT:    return $pop3198;199; NO-SIMD128-LABEL: extract_var_v16i8_u:200; NO-SIMD128:         .functype extract_var_v16i8_u (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)201; NO-SIMD128-NEXT:  # %bb.0:202; NO-SIMD128-NEXT:    global.get $push4=, __stack_pointer203; NO-SIMD128-NEXT:    i32.const $push5=, 16204; NO-SIMD128-NEXT:    i32.sub $push7=, $pop4, $pop5205; NO-SIMD128-NEXT:    local.tee $push6=, $17=, $pop7206; NO-SIMD128-NEXT:    i32.store8 15($pop6), $15207; NO-SIMD128-NEXT:    i32.store8 14($17), $14208; NO-SIMD128-NEXT:    i32.store8 13($17), $13209; NO-SIMD128-NEXT:    i32.store8 12($17), $12210; NO-SIMD128-NEXT:    i32.store8 11($17), $11211; NO-SIMD128-NEXT:    i32.store8 10($17), $10212; NO-SIMD128-NEXT:    i32.store8 9($17), $9213; NO-SIMD128-NEXT:    i32.store8 8($17), $8214; NO-SIMD128-NEXT:    i32.store8 7($17), $7215; NO-SIMD128-NEXT:    i32.store8 6($17), $6216; NO-SIMD128-NEXT:    i32.store8 5($17), $5217; NO-SIMD128-NEXT:    i32.store8 4($17), $4218; NO-SIMD128-NEXT:    i32.store8 3($17), $3219; NO-SIMD128-NEXT:    i32.store8 2($17), $2220; NO-SIMD128-NEXT:    i32.store8 1($17), $1221; NO-SIMD128-NEXT:    i32.store8 0($17), $0222; NO-SIMD128-NEXT:    i32.const $push0=, 15223; NO-SIMD128-NEXT:    i32.and $push1=, $16, $pop0224; NO-SIMD128-NEXT:    i32.or $push2=, $17, $pop1225; NO-SIMD128-NEXT:    i32.load8_u $push3=, 0($pop2)226; NO-SIMD128-NEXT:    return $pop3227  %elem = extractelement <16 x i8> %v, i32 %i228  %a = zext i8 %elem to i32229  ret i32 %a230}231 232define i32 @extract_undef_v16i8_u(<16 x i8> %v) {233; SIMD128-LABEL: extract_undef_v16i8_u:234; SIMD128:         .functype extract_undef_v16i8_u (v128) -> (i32)235; SIMD128-NEXT:  # %bb.0:236; SIMD128-NEXT:    i8x16.extract_lane_u $push0=, $0, 0237; SIMD128-NEXT:    return $pop0238;239; NO-SIMD128-LABEL: extract_undef_v16i8_u:240; NO-SIMD128:         .functype extract_undef_v16i8_u (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)241; NO-SIMD128-NEXT:  # %bb.0:242; NO-SIMD128-NEXT:    i32.const $push0=, 255243; NO-SIMD128-NEXT:    i32.and $push1=, $0, $pop0244; NO-SIMD128-NEXT:    return $pop1245  %elem = extractelement <16 x i8> %v, i8 undef246  %a = zext i8 %elem to i32247  ret i32 %a248}249 250define i8 @extract_v16i8(<16 x i8> %v) {251; SIMD128-LABEL: extract_v16i8:252; SIMD128:         .functype extract_v16i8 (v128) -> (i32)253; SIMD128-NEXT:  # %bb.0:254; SIMD128-NEXT:    i8x16.extract_lane_u $push0=, $0, 13255; SIMD128-NEXT:    return $pop0256;257; NO-SIMD128-LABEL: extract_v16i8:258; NO-SIMD128:         .functype extract_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)259; NO-SIMD128-NEXT:  # %bb.0:260; NO-SIMD128-NEXT:    return $13261  %elem = extractelement <16 x i8> %v, i8 13262  ret i8 %elem263}264 265define i8 @extract_var_v16i8(<16 x i8> %v, i32 %i) {266; SIMD128-LABEL: extract_var_v16i8:267; SIMD128:         .functype extract_var_v16i8 (v128, i32) -> (i32)268; SIMD128-NEXT:  # %bb.0:269; SIMD128-NEXT:    global.get $push4=, __stack_pointer270; SIMD128-NEXT:    i32.const $push5=, 16271; SIMD128-NEXT:    i32.sub $push7=, $pop4, $pop5272; SIMD128-NEXT:    local.tee $push6=, $2=, $pop7273; SIMD128-NEXT:    v128.store 0($pop6), $0274; SIMD128-NEXT:    i32.const $push0=, 15275; SIMD128-NEXT:    i32.and $push1=, $1, $pop0276; SIMD128-NEXT:    i32.or $push2=, $2, $pop1277; SIMD128-NEXT:    i32.load8_u $push3=, 0($pop2)278; SIMD128-NEXT:    return $pop3279;280; NO-SIMD128-LABEL: extract_var_v16i8:281; NO-SIMD128:         .functype extract_var_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)282; NO-SIMD128-NEXT:  # %bb.0:283; NO-SIMD128-NEXT:    global.get $push4=, __stack_pointer284; NO-SIMD128-NEXT:    i32.const $push5=, 16285; NO-SIMD128-NEXT:    i32.sub $push7=, $pop4, $pop5286; NO-SIMD128-NEXT:    local.tee $push6=, $17=, $pop7287; NO-SIMD128-NEXT:    i32.store8 15($pop6), $15288; NO-SIMD128-NEXT:    i32.store8 14($17), $14289; NO-SIMD128-NEXT:    i32.store8 13($17), $13290; NO-SIMD128-NEXT:    i32.store8 12($17), $12291; NO-SIMD128-NEXT:    i32.store8 11($17), $11292; NO-SIMD128-NEXT:    i32.store8 10($17), $10293; NO-SIMD128-NEXT:    i32.store8 9($17), $9294; NO-SIMD128-NEXT:    i32.store8 8($17), $8295; NO-SIMD128-NEXT:    i32.store8 7($17), $7296; NO-SIMD128-NEXT:    i32.store8 6($17), $6297; NO-SIMD128-NEXT:    i32.store8 5($17), $5298; NO-SIMD128-NEXT:    i32.store8 4($17), $4299; NO-SIMD128-NEXT:    i32.store8 3($17), $3300; NO-SIMD128-NEXT:    i32.store8 2($17), $2301; NO-SIMD128-NEXT:    i32.store8 1($17), $1302; NO-SIMD128-NEXT:    i32.store8 0($17), $0303; NO-SIMD128-NEXT:    i32.const $push0=, 15304; NO-SIMD128-NEXT:    i32.and $push1=, $16, $pop0305; NO-SIMD128-NEXT:    i32.or $push2=, $17, $pop1306; NO-SIMD128-NEXT:    i32.load8_u $push3=, 0($pop2)307; NO-SIMD128-NEXT:    return $pop3308  %elem = extractelement <16 x i8> %v, i32 %i309  ret i8 %elem310}311 312define i8 @extract_undef_v16i8(<16 x i8> %v) {313; SIMD128-LABEL: extract_undef_v16i8:314; SIMD128:         .functype extract_undef_v16i8 (v128) -> (i32)315; SIMD128-NEXT:  # %bb.0:316; SIMD128-NEXT:    i8x16.extract_lane_u $push0=, $0, 0317; SIMD128-NEXT:    return $pop0318;319; NO-SIMD128-LABEL: extract_undef_v16i8:320; NO-SIMD128:         .functype extract_undef_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)321; NO-SIMD128-NEXT:  # %bb.0:322; NO-SIMD128-NEXT:    return $0323  %elem = extractelement <16 x i8> %v, i8 undef324  ret i8 %elem325}326 327define <16 x i8> @replace_v16i8(<16 x i8> %v, i8 %x) {328; SIMD128-LABEL: replace_v16i8:329; SIMD128:         .functype replace_v16i8 (v128, i32) -> (v128)330; SIMD128-NEXT:  # %bb.0:331; SIMD128-NEXT:    i8x16.replace_lane $push0=, $0, 11, $1332; SIMD128-NEXT:    return $pop0333;334; NO-SIMD128-LABEL: replace_v16i8:335; NO-SIMD128:         .functype replace_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> ()336; NO-SIMD128-NEXT:  # %bb.0:337; NO-SIMD128-NEXT:    i32.store8 15($0), $16338; NO-SIMD128-NEXT:    i32.store8 14($0), $15339; NO-SIMD128-NEXT:    i32.store8 13($0), $14340; NO-SIMD128-NEXT:    i32.store8 12($0), $13341; NO-SIMD128-NEXT:    i32.store8 11($0), $17342; NO-SIMD128-NEXT:    i32.store8 10($0), $11343; NO-SIMD128-NEXT:    i32.store8 9($0), $10344; NO-SIMD128-NEXT:    i32.store8 8($0), $9345; NO-SIMD128-NEXT:    i32.store8 7($0), $8346; NO-SIMD128-NEXT:    i32.store8 6($0), $7347; NO-SIMD128-NEXT:    i32.store8 5($0), $6348; NO-SIMD128-NEXT:    i32.store8 4($0), $5349; NO-SIMD128-NEXT:    i32.store8 3($0), $4350; NO-SIMD128-NEXT:    i32.store8 2($0), $3351; NO-SIMD128-NEXT:    i32.store8 1($0), $2352; NO-SIMD128-NEXT:    i32.store8 0($0), $1353; NO-SIMD128-NEXT:    return354  %res = insertelement <16 x i8> %v, i8 %x, i32 11355  ret <16 x i8> %res356}357 358define <16 x i8> @replace_var_v16i8(<16 x i8> %v, i32 %i, i8 %x) {359; SIMD128-LABEL: replace_var_v16i8:360; SIMD128:         .functype replace_var_v16i8 (v128, i32, i32) -> (v128)361; SIMD128-NEXT:  # %bb.0:362; SIMD128-NEXT:    global.get $push4=, __stack_pointer363; SIMD128-NEXT:    i32.const $push5=, 16364; SIMD128-NEXT:    i32.sub $push7=, $pop4, $pop5365; SIMD128-NEXT:    local.tee $push6=, $3=, $pop7366; SIMD128-NEXT:    v128.store 0($pop6), $0367; SIMD128-NEXT:    i32.const $push0=, 15368; SIMD128-NEXT:    i32.and $push1=, $1, $pop0369; SIMD128-NEXT:    i32.or $push2=, $3, $pop1370; SIMD128-NEXT:    i32.store8 0($pop2), $2371; SIMD128-NEXT:    v128.load $push3=, 0($3)372; SIMD128-NEXT:    return $pop3373;374; NO-SIMD128-LABEL: replace_var_v16i8:375; NO-SIMD128:         .functype replace_var_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> ()376; NO-SIMD128-NEXT:  # %bb.0:377; NO-SIMD128-NEXT:    global.get $push5=, __stack_pointer378; NO-SIMD128-NEXT:    i32.const $push6=, 16379; NO-SIMD128-NEXT:    i32.sub $push8=, $pop5, $pop6380; NO-SIMD128-NEXT:    local.tee $push7=, $19=, $pop8381; NO-SIMD128-NEXT:    i32.store8 15($pop7), $16382; NO-SIMD128-NEXT:    i32.store8 14($19), $15383; NO-SIMD128-NEXT:    i32.store8 13($19), $14384; NO-SIMD128-NEXT:    i32.store8 12($19), $13385; NO-SIMD128-NEXT:    i32.store8 11($19), $12386; NO-SIMD128-NEXT:    i32.store8 10($19), $11387; NO-SIMD128-NEXT:    i32.store8 9($19), $10388; NO-SIMD128-NEXT:    i32.store8 8($19), $9389; NO-SIMD128-NEXT:    i32.store8 7($19), $8390; NO-SIMD128-NEXT:    i32.store8 6($19), $7391; NO-SIMD128-NEXT:    i32.store8 5($19), $6392; NO-SIMD128-NEXT:    i32.store8 4($19), $5393; NO-SIMD128-NEXT:    i32.store8 3($19), $4394; NO-SIMD128-NEXT:    i32.store8 2($19), $3395; NO-SIMD128-NEXT:    i32.store8 1($19), $2396; NO-SIMD128-NEXT:    i32.store8 0($19), $1397; NO-SIMD128-NEXT:    i32.const $push0=, 15398; NO-SIMD128-NEXT:    i32.and $push1=, $17, $pop0399; NO-SIMD128-NEXT:    i32.or $push2=, $19, $pop1400; NO-SIMD128-NEXT:    i32.store8 0($pop2), $18401; NO-SIMD128-NEXT:    i64.load $push3=, 8($19)402; NO-SIMD128-NEXT:    i64.store 8($0), $pop3403; NO-SIMD128-NEXT:    i64.load $push4=, 0($19)404; NO-SIMD128-NEXT:    i64.store 0($0), $pop4405; NO-SIMD128-NEXT:    return406  %res = insertelement <16 x i8> %v, i8 %x, i32 %i407  ret <16 x i8> %res408}409 410define <16 x i8> @replace_zero_v16i8(<16 x i8> %v, i8 %x) {411; SIMD128-LABEL: replace_zero_v16i8:412; SIMD128:         .functype replace_zero_v16i8 (v128, i32) -> (v128)413; SIMD128-NEXT:  # %bb.0:414; SIMD128-NEXT:    i8x16.replace_lane $push0=, $0, 0, $1415; SIMD128-NEXT:    return $pop0416;417; NO-SIMD128-LABEL: replace_zero_v16i8:418; NO-SIMD128:         .functype replace_zero_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> ()419; NO-SIMD128-NEXT:  # %bb.0:420; NO-SIMD128-NEXT:    i32.store8 15($0), $16421; NO-SIMD128-NEXT:    i32.store8 14($0), $15422; NO-SIMD128-NEXT:    i32.store8 13($0), $14423; NO-SIMD128-NEXT:    i32.store8 12($0), $13424; NO-SIMD128-NEXT:    i32.store8 11($0), $12425; NO-SIMD128-NEXT:    i32.store8 10($0), $11426; NO-SIMD128-NEXT:    i32.store8 9($0), $10427; NO-SIMD128-NEXT:    i32.store8 8($0), $9428; NO-SIMD128-NEXT:    i32.store8 7($0), $8429; NO-SIMD128-NEXT:    i32.store8 6($0), $7430; NO-SIMD128-NEXT:    i32.store8 5($0), $6431; NO-SIMD128-NEXT:    i32.store8 4($0), $5432; NO-SIMD128-NEXT:    i32.store8 3($0), $4433; NO-SIMD128-NEXT:    i32.store8 2($0), $3434; NO-SIMD128-NEXT:    i32.store8 1($0), $2435; NO-SIMD128-NEXT:    i32.store8 0($0), $17436; NO-SIMD128-NEXT:    return437  %res = insertelement <16 x i8> %v, i8 %x, i32 0438  ret <16 x i8> %res439}440 441define <16 x i8> @shuffle_v16i8(<16 x i8> %x, <16 x i8> %y) {442; SIMD128-LABEL: shuffle_v16i8:443; SIMD128:         .functype shuffle_v16i8 (v128, v128) -> (v128)444; SIMD128-NEXT:  # %bb.0:445; SIMD128-NEXT:    i8x16.shuffle $push0=, $0, $1, 0, 17, 2, 19, 4, 21, 6, 23, 8, 25, 10, 27, 12, 29, 14, 31446; SIMD128-NEXT:    return $pop0447;448; NO-SIMD128-LABEL: shuffle_v16i8:449; NO-SIMD128:         .functype shuffle_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> ()450; NO-SIMD128-NEXT:  # %bb.0:451; NO-SIMD128-NEXT:    i32.store8 15($0), $32452; NO-SIMD128-NEXT:    i32.store8 14($0), $15453; NO-SIMD128-NEXT:    i32.store8 13($0), $30454; NO-SIMD128-NEXT:    i32.store8 12($0), $13455; NO-SIMD128-NEXT:    i32.store8 11($0), $28456; NO-SIMD128-NEXT:    i32.store8 10($0), $11457; NO-SIMD128-NEXT:    i32.store8 9($0), $26458; NO-SIMD128-NEXT:    i32.store8 8($0), $9459; NO-SIMD128-NEXT:    i32.store8 7($0), $24460; NO-SIMD128-NEXT:    i32.store8 6($0), $7461; NO-SIMD128-NEXT:    i32.store8 5($0), $22462; NO-SIMD128-NEXT:    i32.store8 4($0), $5463; NO-SIMD128-NEXT:    i32.store8 3($0), $20464; NO-SIMD128-NEXT:    i32.store8 2($0), $3465; NO-SIMD128-NEXT:    i32.store8 1($0), $18466; NO-SIMD128-NEXT:    i32.store8 0($0), $1467; NO-SIMD128-NEXT:    return468  %res = shufflevector <16 x i8> %x, <16 x i8> %y,469    <16 x i32> <i32 0, i32 17, i32 2, i32 19, i32 4, i32 21, i32 6, i32 23,470                i32 8, i32 25, i32 10, i32 27, i32 12, i32 29, i32 14, i32 31>471  ret <16 x i8> %res472}473 474define <16 x i8> @shuffle_undef_v16i8(<16 x i8> %x, <16 x i8> %y) {475; SIMD128-LABEL: shuffle_undef_v16i8:476; SIMD128:         .functype shuffle_undef_v16i8 (v128, v128) -> (v128)477; SIMD128-NEXT:  # %bb.0:478; SIMD128-NEXT:    i8x16.shuffle $push0=, $0, $0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0479; SIMD128-NEXT:    return $pop0480;481; NO-SIMD128-LABEL: shuffle_undef_v16i8:482; NO-SIMD128:         .functype shuffle_undef_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> ()483; NO-SIMD128-NEXT:  # %bb.0:484; NO-SIMD128-NEXT:    i32.store8 0($0), $2485; NO-SIMD128-NEXT:    return486  %res = shufflevector <16 x i8> %x, <16 x i8> %y,487    <16 x i32> <i32 1, i32 undef, i32 undef, i32 undef,488                i32 undef, i32 undef, i32 undef, i32 undef,489                i32 undef, i32 undef, i32 undef, i32 undef,490                i32 undef, i32 undef, i32 undef, i32 undef>491  ret <16 x i8> %res492}493 494define <16 x i8> @build_v16i8(i8 %x0, i8 %x1, i8 %x2, i8 %x3,495; SIMD128-LABEL: build_v16i8:496; SIMD128:         .functype build_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> (v128)497; SIMD128-NEXT:  # %bb.0:498; SIMD128-NEXT:    i8x16.splat $push0=, $0499; SIMD128-NEXT:    i8x16.replace_lane $push1=, $pop0, 1, $1500; SIMD128-NEXT:    i8x16.replace_lane $push2=, $pop1, 2, $2501; SIMD128-NEXT:    i8x16.replace_lane $push3=, $pop2, 3, $3502; SIMD128-NEXT:    i8x16.replace_lane $push4=, $pop3, 4, $4503; SIMD128-NEXT:    i8x16.replace_lane $push5=, $pop4, 5, $5504; SIMD128-NEXT:    i8x16.replace_lane $push6=, $pop5, 6, $6505; SIMD128-NEXT:    i8x16.replace_lane $push7=, $pop6, 7, $7506; SIMD128-NEXT:    i8x16.replace_lane $push8=, $pop7, 8, $8507; SIMD128-NEXT:    i8x16.replace_lane $push9=, $pop8, 9, $9508; SIMD128-NEXT:    i8x16.replace_lane $push10=, $pop9, 10, $10509; SIMD128-NEXT:    i8x16.replace_lane $push11=, $pop10, 11, $11510; SIMD128-NEXT:    i8x16.replace_lane $push12=, $pop11, 12, $12511; SIMD128-NEXT:    i8x16.replace_lane $push13=, $pop12, 13, $13512; SIMD128-NEXT:    i8x16.replace_lane $push14=, $pop13, 14, $14513; SIMD128-NEXT:    i8x16.replace_lane $push15=, $pop14, 15, $15514; SIMD128-NEXT:    return $pop15515;516; NO-SIMD128-LABEL: build_v16i8:517; NO-SIMD128:         .functype build_v16i8 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> ()518; NO-SIMD128-NEXT:  # %bb.0:519; NO-SIMD128-NEXT:    i32.store8 15($0), $16520; NO-SIMD128-NEXT:    i32.store8 14($0), $15521; NO-SIMD128-NEXT:    i32.store8 13($0), $14522; NO-SIMD128-NEXT:    i32.store8 12($0), $13523; NO-SIMD128-NEXT:    i32.store8 11($0), $12524; NO-SIMD128-NEXT:    i32.store8 10($0), $11525; NO-SIMD128-NEXT:    i32.store8 9($0), $10526; NO-SIMD128-NEXT:    i32.store8 8($0), $9527; NO-SIMD128-NEXT:    i32.store8 7($0), $8528; NO-SIMD128-NEXT:    i32.store8 6($0), $7529; NO-SIMD128-NEXT:    i32.store8 5($0), $6530; NO-SIMD128-NEXT:    i32.store8 4($0), $5531; NO-SIMD128-NEXT:    i32.store8 3($0), $4532; NO-SIMD128-NEXT:    i32.store8 2($0), $3533; NO-SIMD128-NEXT:    i32.store8 1($0), $2534; NO-SIMD128-NEXT:    i32.store8 0($0), $1535; NO-SIMD128-NEXT:    return536                              i8 %x4, i8 %x5, i8 %x6, i8 %x7,537                              i8 %x8, i8 %x9, i8 %x10, i8 %x11,538                              i8 %x12, i8 %x13, i8 %x14, i8 %x15) {539  %t0 = insertelement <16 x i8> undef, i8 %x0, i32 0540  %t1 = insertelement <16 x i8> %t0, i8 %x1, i32 1541  %t2 = insertelement <16 x i8> %t1, i8 %x2, i32 2542  %t3 = insertelement <16 x i8> %t2, i8 %x3, i32 3543  %t4 = insertelement <16 x i8> %t3, i8 %x4, i32 4544  %t5 = insertelement <16 x i8> %t4, i8 %x5, i32 5545  %t6 = insertelement <16 x i8> %t5, i8 %x6, i32 6546  %t7 = insertelement <16 x i8> %t6, i8 %x7, i32 7547  %t8 = insertelement <16 x i8> %t7, i8 %x8, i32 8548  %t9 = insertelement <16 x i8> %t8, i8 %x9, i32 9549  %t10 = insertelement <16 x i8> %t9, i8 %x10, i32 10550  %t11 = insertelement <16 x i8> %t10, i8 %x11, i32 11551  %t12 = insertelement <16 x i8> %t11, i8 %x12, i32 12552  %t13 = insertelement <16 x i8> %t12, i8 %x13, i32 13553  %t14 = insertelement <16 x i8> %t13, i8 %x14, i32 14554  %res = insertelement <16 x i8> %t14, i8 %x15, i32 15555  ret <16 x i8> %res556}557 558; ==============================================================================559; 8 x i16560; ==============================================================================561define <8 x i16> @const_v8i16() {562; SIMD128-LABEL: const_v8i16:563; SIMD128:         .functype const_v8i16 () -> (v128)564; SIMD128-NEXT:  # %bb.0:565; SIMD128-NEXT:    v128.const $push0=, 256, 770, 1284, 1798, 2312, 2826, 3340, 3854566; SIMD128-NEXT:    return $pop0567;568; NO-SIMD128-LABEL: const_v8i16:569; NO-SIMD128:         .functype const_v8i16 (i32) -> ()570; NO-SIMD128-NEXT:  # %bb.0:571; NO-SIMD128-NEXT:    i64.const $push0=, 1084818905618843912572; NO-SIMD128-NEXT:    i64.store 8($0), $pop0573; NO-SIMD128-NEXT:    i64.const $push1=, 506097522914230528574; NO-SIMD128-NEXT:    i64.store 0($0), $pop1575; NO-SIMD128-NEXT:    return576  ret <8 x i16> <i16 256, i16 770, i16 1284, i16 1798,577                 i16 2312, i16 2826, i16 3340, i16 3854>578}579 580define <8 x i16> @splat_v8i16(i16 %x) {581; SIMD128-LABEL: splat_v8i16:582; SIMD128:         .functype splat_v8i16 (i32) -> (v128)583; SIMD128-NEXT:  # %bb.0:584; SIMD128-NEXT:    i16x8.splat $push0=, $0585; SIMD128-NEXT:    return $pop0586;587; NO-SIMD128-LABEL: splat_v8i16:588; NO-SIMD128:         .functype splat_v8i16 (i32, i32) -> ()589; NO-SIMD128-NEXT:  # %bb.0:590; NO-SIMD128-NEXT:    i32.store16 14($0), $1591; NO-SIMD128-NEXT:    i32.store16 12($0), $1592; NO-SIMD128-NEXT:    i32.store16 10($0), $1593; NO-SIMD128-NEXT:    i32.store16 8($0), $1594; NO-SIMD128-NEXT:    i32.store16 6($0), $1595; NO-SIMD128-NEXT:    i32.store16 4($0), $1596; NO-SIMD128-NEXT:    i32.store16 2($0), $1597; NO-SIMD128-NEXT:    i32.store16 0($0), $1598; NO-SIMD128-NEXT:    return599  %v = insertelement <8 x i16> undef, i16 %x, i32 0600  %res = shufflevector <8 x i16> %v, <8 x i16> undef,601    <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>602  ret <8 x i16> %res603}604 605define <8 x i16> @const_splat_v8i16() {606; SIMD128-LABEL: const_splat_v8i16:607; SIMD128:         .functype const_splat_v8i16 () -> (v128)608; SIMD128-NEXT:  # %bb.0:609; SIMD128-NEXT:    v128.const $push0=, 42, 42, 42, 42, 42, 42, 42, 42610; SIMD128-NEXT:    return $pop0611;612; NO-SIMD128-LABEL: const_splat_v8i16:613; NO-SIMD128:         .functype const_splat_v8i16 (i32) -> ()614; NO-SIMD128-NEXT:  # %bb.0:615; NO-SIMD128-NEXT:    i64.const $push0=, 11822129413226538616; NO-SIMD128-NEXT:    i64.store 8($0), $pop0617; NO-SIMD128-NEXT:    i64.const $push1=, 11822129413226538618; NO-SIMD128-NEXT:    i64.store 0($0), $pop1619; NO-SIMD128-NEXT:    return620  ret <8 x i16> <i16 42, i16 42, i16 42, i16 42, i16 42, i16 42, i16 42, i16 42>621}622 623define i32 @extract_v8i16_s(<8 x i16> %v) {624; SIMD128-LABEL: extract_v8i16_s:625; SIMD128:         .functype extract_v8i16_s (v128) -> (i32)626; SIMD128-NEXT:  # %bb.0:627; SIMD128-NEXT:    i16x8.extract_lane_s $push0=, $0, 5628; SIMD128-NEXT:    return $pop0629;630; NO-SIMD128-LABEL: extract_v8i16_s:631; NO-SIMD128:         .functype extract_v8i16_s (i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)632; NO-SIMD128-NEXT:  # %bb.0:633; NO-SIMD128-NEXT:    i32.extend16_s $push0=, $5634; NO-SIMD128-NEXT:    return $pop0635  %elem = extractelement <8 x i16> %v, i16 5636  %a = sext i16 %elem to i32637  ret i32 %a638}639 640define i32 @extract_var_v8i16_s(<8 x i16> %v, i32 %i) {641; SIMD128-LABEL: extract_var_v8i16_s:642; SIMD128:         .functype extract_var_v8i16_s (v128, i32) -> (i32)643; SIMD128-NEXT:  # %bb.0:644; SIMD128-NEXT:    global.get $push6=, __stack_pointer645; SIMD128-NEXT:    i32.const $push7=, 16646; SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop7647; SIMD128-NEXT:    local.tee $push8=, $2=, $pop9648; SIMD128-NEXT:    v128.store 0($pop8), $0649; SIMD128-NEXT:    i32.const $push0=, 7650; SIMD128-NEXT:    i32.and $push1=, $1, $pop0651; SIMD128-NEXT:    i32.const $push2=, 1652; SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop2653; SIMD128-NEXT:    i32.or $push4=, $2, $pop3654; SIMD128-NEXT:    i32.load16_s $push5=, 0($pop4)655; SIMD128-NEXT:    return $pop5656;657; NO-SIMD128-LABEL: extract_var_v8i16_s:658; NO-SIMD128:         .functype extract_var_v8i16_s (i32, i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)659; NO-SIMD128-NEXT:  # %bb.0:660; NO-SIMD128-NEXT:    global.get $push6=, __stack_pointer661; NO-SIMD128-NEXT:    i32.const $push7=, 16662; NO-SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop7663; NO-SIMD128-NEXT:    local.tee $push8=, $9=, $pop9664; NO-SIMD128-NEXT:    i32.store16 14($pop8), $7665; NO-SIMD128-NEXT:    i32.store16 12($9), $6666; NO-SIMD128-NEXT:    i32.store16 10($9), $5667; NO-SIMD128-NEXT:    i32.store16 8($9), $4668; NO-SIMD128-NEXT:    i32.store16 6($9), $3669; NO-SIMD128-NEXT:    i32.store16 4($9), $2670; NO-SIMD128-NEXT:    i32.store16 2($9), $1671; NO-SIMD128-NEXT:    i32.store16 0($9), $0672; NO-SIMD128-NEXT:    i32.const $push0=, 7673; NO-SIMD128-NEXT:    i32.and $push1=, $8, $pop0674; NO-SIMD128-NEXT:    i32.const $push2=, 1675; NO-SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop2676; NO-SIMD128-NEXT:    i32.or $push4=, $9, $pop3677; NO-SIMD128-NEXT:    i32.load16_s $push5=, 0($pop4)678; NO-SIMD128-NEXT:    return $pop5679  %elem = extractelement <8 x i16> %v, i32 %i680  %a = sext i16 %elem to i32681  ret i32 %a682}683 684define i32 @extract_undef_v8i16_s(<8 x i16> %v) {685; SIMD128-LABEL: extract_undef_v8i16_s:686; SIMD128:         .functype extract_undef_v8i16_s (v128) -> (i32)687; SIMD128-NEXT:  # %bb.0:688; SIMD128-NEXT:    i16x8.extract_lane_s $push0=, $0, 0689; SIMD128-NEXT:    return $pop0690;691; NO-SIMD128-LABEL: extract_undef_v8i16_s:692; NO-SIMD128:         .functype extract_undef_v8i16_s (i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)693; NO-SIMD128-NEXT:  # %bb.0:694; NO-SIMD128-NEXT:    i32.extend16_s $push0=, $0695; NO-SIMD128-NEXT:    return $pop0696  %elem = extractelement <8 x i16> %v, i16 undef697  %a = sext i16 %elem to i32698  ret i32 %a699}700 701define i32 @extract_v8i16_u(<8 x i16> %v) {702; SIMD128-LABEL: extract_v8i16_u:703; SIMD128:         .functype extract_v8i16_u (v128) -> (i32)704; SIMD128-NEXT:  # %bb.0:705; SIMD128-NEXT:    i16x8.extract_lane_u $push0=, $0, 5706; SIMD128-NEXT:    return $pop0707;708; NO-SIMD128-LABEL: extract_v8i16_u:709; NO-SIMD128:         .functype extract_v8i16_u (i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)710; NO-SIMD128-NEXT:  # %bb.0:711; NO-SIMD128-NEXT:    i32.const $push0=, 65535712; NO-SIMD128-NEXT:    i32.and $push1=, $5, $pop0713; NO-SIMD128-NEXT:    return $pop1714  %elem = extractelement <8 x i16> %v, i16 5715  %a = zext i16 %elem to i32716  ret i32 %a717}718 719define i32 @extract_var_v8i16_u(<8 x i16> %v, i32 %i) {720; SIMD128-LABEL: extract_var_v8i16_u:721; SIMD128:         .functype extract_var_v8i16_u (v128, i32) -> (i32)722; SIMD128-NEXT:  # %bb.0:723; SIMD128-NEXT:    global.get $push6=, __stack_pointer724; SIMD128-NEXT:    i32.const $push7=, 16725; SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop7726; SIMD128-NEXT:    local.tee $push8=, $2=, $pop9727; SIMD128-NEXT:    v128.store 0($pop8), $0728; SIMD128-NEXT:    i32.const $push0=, 7729; SIMD128-NEXT:    i32.and $push1=, $1, $pop0730; SIMD128-NEXT:    i32.const $push2=, 1731; SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop2732; SIMD128-NEXT:    i32.or $push4=, $2, $pop3733; SIMD128-NEXT:    i32.load16_u $push5=, 0($pop4)734; SIMD128-NEXT:    return $pop5735;736; NO-SIMD128-LABEL: extract_var_v8i16_u:737; NO-SIMD128:         .functype extract_var_v8i16_u (i32, i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)738; NO-SIMD128-NEXT:  # %bb.0:739; NO-SIMD128-NEXT:    global.get $push6=, __stack_pointer740; NO-SIMD128-NEXT:    i32.const $push7=, 16741; NO-SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop7742; NO-SIMD128-NEXT:    local.tee $push8=, $9=, $pop9743; NO-SIMD128-NEXT:    i32.store16 14($pop8), $7744; NO-SIMD128-NEXT:    i32.store16 12($9), $6745; NO-SIMD128-NEXT:    i32.store16 10($9), $5746; NO-SIMD128-NEXT:    i32.store16 8($9), $4747; NO-SIMD128-NEXT:    i32.store16 6($9), $3748; NO-SIMD128-NEXT:    i32.store16 4($9), $2749; NO-SIMD128-NEXT:    i32.store16 2($9), $1750; NO-SIMD128-NEXT:    i32.store16 0($9), $0751; NO-SIMD128-NEXT:    i32.const $push0=, 7752; NO-SIMD128-NEXT:    i32.and $push1=, $8, $pop0753; NO-SIMD128-NEXT:    i32.const $push2=, 1754; NO-SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop2755; NO-SIMD128-NEXT:    i32.or $push4=, $9, $pop3756; NO-SIMD128-NEXT:    i32.load16_u $push5=, 0($pop4)757; NO-SIMD128-NEXT:    return $pop5758  %elem = extractelement <8 x i16> %v, i32 %i759  %a = zext i16 %elem to i32760  ret i32 %a761}762 763define i32 @extract_undef_v8i16_u(<8 x i16> %v) {764; SIMD128-LABEL: extract_undef_v8i16_u:765; SIMD128:         .functype extract_undef_v8i16_u (v128) -> (i32)766; SIMD128-NEXT:  # %bb.0:767; SIMD128-NEXT:    i16x8.extract_lane_u $push0=, $0, 0768; SIMD128-NEXT:    return $pop0769;770; NO-SIMD128-LABEL: extract_undef_v8i16_u:771; NO-SIMD128:         .functype extract_undef_v8i16_u (i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)772; NO-SIMD128-NEXT:  # %bb.0:773; NO-SIMD128-NEXT:    i32.const $push0=, 65535774; NO-SIMD128-NEXT:    i32.and $push1=, $0, $pop0775; NO-SIMD128-NEXT:    return $pop1776  %elem = extractelement <8 x i16> %v, i16 undef777  %a = zext i16 %elem to i32778  ret i32 %a779}780 781define i16 @extract_v8i16(<8 x i16> %v) {782; SIMD128-LABEL: extract_v8i16:783; SIMD128:         .functype extract_v8i16 (v128) -> (i32)784; SIMD128-NEXT:  # %bb.0:785; SIMD128-NEXT:    i16x8.extract_lane_u $push0=, $0, 5786; SIMD128-NEXT:    return $pop0787;788; NO-SIMD128-LABEL: extract_v8i16:789; NO-SIMD128:         .functype extract_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)790; NO-SIMD128-NEXT:  # %bb.0:791; NO-SIMD128-NEXT:    return $5792  %elem = extractelement <8 x i16> %v, i16 5793  ret i16 %elem794}795 796define i16 @extract_var_v8i16(<8 x i16> %v, i32 %i) {797; SIMD128-LABEL: extract_var_v8i16:798; SIMD128:         .functype extract_var_v8i16 (v128, i32) -> (i32)799; SIMD128-NEXT:  # %bb.0:800; SIMD128-NEXT:    global.get $push6=, __stack_pointer801; SIMD128-NEXT:    i32.const $push7=, 16802; SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop7803; SIMD128-NEXT:    local.tee $push8=, $2=, $pop9804; SIMD128-NEXT:    v128.store 0($pop8), $0805; SIMD128-NEXT:    i32.const $push0=, 7806; SIMD128-NEXT:    i32.and $push1=, $1, $pop0807; SIMD128-NEXT:    i32.const $push2=, 1808; SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop2809; SIMD128-NEXT:    i32.or $push4=, $2, $pop3810; SIMD128-NEXT:    i32.load16_u $push5=, 0($pop4)811; SIMD128-NEXT:    return $pop5812;813; NO-SIMD128-LABEL: extract_var_v8i16:814; NO-SIMD128:         .functype extract_var_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)815; NO-SIMD128-NEXT:  # %bb.0:816; NO-SIMD128-NEXT:    global.get $push6=, __stack_pointer817; NO-SIMD128-NEXT:    i32.const $push7=, 16818; NO-SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop7819; NO-SIMD128-NEXT:    local.tee $push8=, $9=, $pop9820; NO-SIMD128-NEXT:    i32.store16 14($pop8), $7821; NO-SIMD128-NEXT:    i32.store16 12($9), $6822; NO-SIMD128-NEXT:    i32.store16 10($9), $5823; NO-SIMD128-NEXT:    i32.store16 8($9), $4824; NO-SIMD128-NEXT:    i32.store16 6($9), $3825; NO-SIMD128-NEXT:    i32.store16 4($9), $2826; NO-SIMD128-NEXT:    i32.store16 2($9), $1827; NO-SIMD128-NEXT:    i32.store16 0($9), $0828; NO-SIMD128-NEXT:    i32.const $push0=, 7829; NO-SIMD128-NEXT:    i32.and $push1=, $8, $pop0830; NO-SIMD128-NEXT:    i32.const $push2=, 1831; NO-SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop2832; NO-SIMD128-NEXT:    i32.or $push4=, $9, $pop3833; NO-SIMD128-NEXT:    i32.load16_u $push5=, 0($pop4)834; NO-SIMD128-NEXT:    return $pop5835  %elem = extractelement <8 x i16> %v, i32 %i836  ret i16 %elem837}838 839define i16 @extract_undef_v8i16(<8 x i16> %v) {840; SIMD128-LABEL: extract_undef_v8i16:841; SIMD128:         .functype extract_undef_v8i16 (v128) -> (i32)842; SIMD128-NEXT:  # %bb.0:843; SIMD128-NEXT:    i16x8.extract_lane_u $push0=, $0, 0844; SIMD128-NEXT:    return $pop0845;846; NO-SIMD128-LABEL: extract_undef_v8i16:847; NO-SIMD128:         .functype extract_undef_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32) -> (i32)848; NO-SIMD128-NEXT:  # %bb.0:849; NO-SIMD128-NEXT:    return $0850  %elem = extractelement <8 x i16> %v, i16 undef851  ret i16 %elem852}853 854define <8 x i16> @replace_v8i16(<8 x i16> %v, i16 %x) {855; SIMD128-LABEL: replace_v8i16:856; SIMD128:         .functype replace_v8i16 (v128, i32) -> (v128)857; SIMD128-NEXT:  # %bb.0:858; SIMD128-NEXT:    i16x8.replace_lane $push0=, $0, 7, $1859; SIMD128-NEXT:    return $pop0860;861; NO-SIMD128-LABEL: replace_v8i16:862; NO-SIMD128:         .functype replace_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> ()863; NO-SIMD128-NEXT:  # %bb.0:864; NO-SIMD128-NEXT:    i32.store16 14($0), $9865; NO-SIMD128-NEXT:    i32.store16 12($0), $7866; NO-SIMD128-NEXT:    i32.store16 10($0), $6867; NO-SIMD128-NEXT:    i32.store16 8($0), $5868; NO-SIMD128-NEXT:    i32.store16 6($0), $4869; NO-SIMD128-NEXT:    i32.store16 4($0), $3870; NO-SIMD128-NEXT:    i32.store16 2($0), $2871; NO-SIMD128-NEXT:    i32.store16 0($0), $1872; NO-SIMD128-NEXT:    return873  %res = insertelement <8 x i16> %v, i16 %x, i32 7874  ret <8 x i16> %res875}876 877define <8 x i16> @replace_var_v8i16(<8 x i16> %v, i32 %i, i16 %x) {878; SIMD128-LABEL: replace_var_v8i16:879; SIMD128:         .functype replace_var_v8i16 (v128, i32, i32) -> (v128)880; SIMD128-NEXT:  # %bb.0:881; SIMD128-NEXT:    global.get $push6=, __stack_pointer882; SIMD128-NEXT:    i32.const $push7=, 16883; SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop7884; SIMD128-NEXT:    local.tee $push8=, $3=, $pop9885; SIMD128-NEXT:    v128.store 0($pop8), $0886; SIMD128-NEXT:    i32.const $push0=, 7887; SIMD128-NEXT:    i32.and $push1=, $1, $pop0888; SIMD128-NEXT:    i32.const $push2=, 1889; SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop2890; SIMD128-NEXT:    i32.or $push4=, $3, $pop3891; SIMD128-NEXT:    i32.store16 0($pop4), $2892; SIMD128-NEXT:    v128.load $push5=, 0($3)893; SIMD128-NEXT:    return $pop5894;895; NO-SIMD128-LABEL: replace_var_v8i16:896; NO-SIMD128:         .functype replace_var_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> ()897; NO-SIMD128-NEXT:  # %bb.0:898; NO-SIMD128-NEXT:    global.get $push7=, __stack_pointer899; NO-SIMD128-NEXT:    i32.const $push8=, 16900; NO-SIMD128-NEXT:    i32.sub $push10=, $pop7, $pop8901; NO-SIMD128-NEXT:    local.tee $push9=, $11=, $pop10902; NO-SIMD128-NEXT:    i32.store16 14($pop9), $8903; NO-SIMD128-NEXT:    i32.store16 12($11), $7904; NO-SIMD128-NEXT:    i32.store16 10($11), $6905; NO-SIMD128-NEXT:    i32.store16 8($11), $5906; NO-SIMD128-NEXT:    i32.store16 6($11), $4907; NO-SIMD128-NEXT:    i32.store16 4($11), $3908; NO-SIMD128-NEXT:    i32.store16 2($11), $2909; NO-SIMD128-NEXT:    i32.store16 0($11), $1910; NO-SIMD128-NEXT:    i32.const $push0=, 7911; NO-SIMD128-NEXT:    i32.and $push1=, $9, $pop0912; NO-SIMD128-NEXT:    i32.const $push2=, 1913; NO-SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop2914; NO-SIMD128-NEXT:    i32.or $push4=, $11, $pop3915; NO-SIMD128-NEXT:    i32.store16 0($pop4), $10916; NO-SIMD128-NEXT:    i64.load $push5=, 8($11)917; NO-SIMD128-NEXT:    i64.store 8($0), $pop5918; NO-SIMD128-NEXT:    i64.load $push6=, 0($11)919; NO-SIMD128-NEXT:    i64.store 0($0), $pop6920; NO-SIMD128-NEXT:    return921  %res = insertelement <8 x i16> %v, i16 %x, i32 %i922  ret <8 x i16> %res923}924 925define <8 x i16> @replace_zero_v8i16(<8 x i16> %v, i16 %x) {926; SIMD128-LABEL: replace_zero_v8i16:927; SIMD128:         .functype replace_zero_v8i16 (v128, i32) -> (v128)928; SIMD128-NEXT:  # %bb.0:929; SIMD128-NEXT:    i16x8.replace_lane $push0=, $0, 0, $1930; SIMD128-NEXT:    return $pop0931;932; NO-SIMD128-LABEL: replace_zero_v8i16:933; NO-SIMD128:         .functype replace_zero_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> ()934; NO-SIMD128-NEXT:  # %bb.0:935; NO-SIMD128-NEXT:    i32.store16 14($0), $8936; NO-SIMD128-NEXT:    i32.store16 12($0), $7937; NO-SIMD128-NEXT:    i32.store16 10($0), $6938; NO-SIMD128-NEXT:    i32.store16 8($0), $5939; NO-SIMD128-NEXT:    i32.store16 6($0), $4940; NO-SIMD128-NEXT:    i32.store16 4($0), $3941; NO-SIMD128-NEXT:    i32.store16 2($0), $2942; NO-SIMD128-NEXT:    i32.store16 0($0), $9943; NO-SIMD128-NEXT:    return944  %res = insertelement <8 x i16> %v, i16 %x, i32 0945  ret <8 x i16> %res946}947 948define <8 x i16> @shuffle_v8i16(<8 x i16> %x, <8 x i16> %y) {949; SIMD128-LABEL: shuffle_v8i16:950; SIMD128:         .functype shuffle_v8i16 (v128, v128) -> (v128)951; SIMD128-NEXT:  # %bb.0:952; SIMD128-NEXT:    i8x16.shuffle $push0=, $0, $1, 0, 1, 18, 19, 4, 5, 22, 23, 8, 9, 26, 27, 12, 13, 30, 31953; SIMD128-NEXT:    return $pop0954;955; NO-SIMD128-LABEL: shuffle_v8i16:956; NO-SIMD128:         .functype shuffle_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> ()957; NO-SIMD128-NEXT:  # %bb.0:958; NO-SIMD128-NEXT:    i32.store16 14($0), $16959; NO-SIMD128-NEXT:    i32.store16 12($0), $7960; NO-SIMD128-NEXT:    i32.store16 10($0), $14961; NO-SIMD128-NEXT:    i32.store16 8($0), $5962; NO-SIMD128-NEXT:    i32.store16 6($0), $12963; NO-SIMD128-NEXT:    i32.store16 4($0), $3964; NO-SIMD128-NEXT:    i32.store16 2($0), $10965; NO-SIMD128-NEXT:    i32.store16 0($0), $1966; NO-SIMD128-NEXT:    return967  %res = shufflevector <8 x i16> %x, <8 x i16> %y,968    <8 x i32> <i32 0, i32 9, i32 2, i32 11, i32 4, i32 13, i32 6, i32 15>969  ret <8 x i16> %res970}971 972define <8 x i16> @shuffle_undef_v8i16(<8 x i16> %x, <8 x i16> %y) {973; SIMD128-LABEL: shuffle_undef_v8i16:974; SIMD128:         .functype shuffle_undef_v8i16 (v128, v128) -> (v128)975; SIMD128-NEXT:  # %bb.0:976; SIMD128-NEXT:    i8x16.shuffle $push0=, $0, $0, 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1977; SIMD128-NEXT:    return $pop0978;979; NO-SIMD128-LABEL: shuffle_undef_v8i16:980; NO-SIMD128:         .functype shuffle_undef_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32) -> ()981; NO-SIMD128-NEXT:  # %bb.0:982; NO-SIMD128-NEXT:    i32.store16 0($0), $2983; NO-SIMD128-NEXT:    return984  %res = shufflevector <8 x i16> %x, <8 x i16> %y,985    <8 x i32> <i32 1, i32 undef, i32 undef, i32 undef,986               i32 undef, i32 undef, i32 undef, i32 undef>987  ret <8 x i16> %res988}989 990define <8 x i16> @build_v8i16(i16 %x0, i16 %x1, i16 %x2, i16 %x3,991; SIMD128-LABEL: build_v8i16:992; SIMD128:         .functype build_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32) -> (v128)993; SIMD128-NEXT:  # %bb.0:994; SIMD128-NEXT:    i16x8.splat $push0=, $0995; SIMD128-NEXT:    i16x8.replace_lane $push1=, $pop0, 1, $1996; SIMD128-NEXT:    i16x8.replace_lane $push2=, $pop1, 2, $2997; SIMD128-NEXT:    i16x8.replace_lane $push3=, $pop2, 3, $3998; SIMD128-NEXT:    i16x8.replace_lane $push4=, $pop3, 4, $4999; SIMD128-NEXT:    i16x8.replace_lane $push5=, $pop4, 5, $51000; SIMD128-NEXT:    i16x8.replace_lane $push6=, $pop5, 6, $61001; SIMD128-NEXT:    i16x8.replace_lane $push7=, $pop6, 7, $71002; SIMD128-NEXT:    return $pop71003;1004; NO-SIMD128-LABEL: build_v8i16:1005; NO-SIMD128:         .functype build_v8i16 (i32, i32, i32, i32, i32, i32, i32, i32, i32) -> ()1006; NO-SIMD128-NEXT:  # %bb.0:1007; NO-SIMD128-NEXT:    i32.store16 14($0), $81008; NO-SIMD128-NEXT:    i32.store16 12($0), $71009; NO-SIMD128-NEXT:    i32.store16 10($0), $61010; NO-SIMD128-NEXT:    i32.store16 8($0), $51011; NO-SIMD128-NEXT:    i32.store16 6($0), $41012; NO-SIMD128-NEXT:    i32.store16 4($0), $31013; NO-SIMD128-NEXT:    i32.store16 2($0), $21014; NO-SIMD128-NEXT:    i32.store16 0($0), $11015; NO-SIMD128-NEXT:    return1016                              i16 %x4, i16 %x5, i16 %x6, i16 %x7) {1017  %t0 = insertelement <8 x i16> undef, i16 %x0, i32 01018  %t1 = insertelement <8 x i16> %t0, i16 %x1, i32 11019  %t2 = insertelement <8 x i16> %t1, i16 %x2, i32 21020  %t3 = insertelement <8 x i16> %t2, i16 %x3, i32 31021  %t4 = insertelement <8 x i16> %t3, i16 %x4, i32 41022  %t5 = insertelement <8 x i16> %t4, i16 %x5, i32 51023  %t6 = insertelement <8 x i16> %t5, i16 %x6, i32 61024  %res = insertelement <8 x i16> %t6, i16 %x7, i32 71025  ret <8 x i16> %res1026}1027 1028; ==============================================================================1029; 4 x i321030; ==============================================================================1031define <4 x i32> @const_v4i32() {1032; SIMD128-LABEL: const_v4i32:1033; SIMD128:         .functype const_v4i32 () -> (v128)1034; SIMD128-NEXT:  # %bb.0:1035; SIMD128-NEXT:    v128.const $push0=, 50462976, 117835012, 185207048, 2525790841036; SIMD128-NEXT:    return $pop01037;1038; NO-SIMD128-LABEL: const_v4i32:1039; NO-SIMD128:         .functype const_v4i32 (i32) -> ()1040; NO-SIMD128-NEXT:  # %bb.0:1041; NO-SIMD128-NEXT:    i64.const $push0=, 10848189056188439121042; NO-SIMD128-NEXT:    i64.store 8($0), $pop01043; NO-SIMD128-NEXT:    i64.const $push1=, 5060975229142305281044; NO-SIMD128-NEXT:    i64.store 0($0), $pop11045; NO-SIMD128-NEXT:    return1046  ret <4 x i32> <i32 50462976, i32 117835012, i32 185207048, i32 252579084>1047}1048 1049define <4 x i32> @splat_v4i32(i32 %x) {1050; SIMD128-LABEL: splat_v4i32:1051; SIMD128:         .functype splat_v4i32 (i32) -> (v128)1052; SIMD128-NEXT:  # %bb.0:1053; SIMD128-NEXT:    i32x4.splat $push0=, $01054; SIMD128-NEXT:    return $pop01055;1056; NO-SIMD128-LABEL: splat_v4i32:1057; NO-SIMD128:         .functype splat_v4i32 (i32, i32) -> ()1058; NO-SIMD128-NEXT:  # %bb.0:1059; NO-SIMD128-NEXT:    i32.store 12($0), $11060; NO-SIMD128-NEXT:    i32.store 8($0), $11061; NO-SIMD128-NEXT:    i32.store 4($0), $11062; NO-SIMD128-NEXT:    i32.store 0($0), $11063; NO-SIMD128-NEXT:    return1064  %v = insertelement <4 x i32> undef, i32 %x, i32 01065  %res = shufflevector <4 x i32> %v, <4 x i32> undef,1066    <4 x i32> <i32 0, i32 0, i32 0, i32 0>1067  ret <4 x i32> %res1068}1069 1070define <4 x i32> @const_splat_v4i32() {1071; SIMD128-LABEL: const_splat_v4i32:1072; SIMD128:         .functype const_splat_v4i32 () -> (v128)1073; SIMD128-NEXT:  # %bb.0:1074; SIMD128-NEXT:    v128.const $push0=, 42, 42, 42, 421075; SIMD128-NEXT:    return $pop01076;1077; NO-SIMD128-LABEL: const_splat_v4i32:1078; NO-SIMD128:         .functype const_splat_v4i32 (i32) -> ()1079; NO-SIMD128-NEXT:  # %bb.0:1080; NO-SIMD128-NEXT:    i64.const $push0=, 1803886264741081; NO-SIMD128-NEXT:    i64.store 8($0), $pop01082; NO-SIMD128-NEXT:    i64.const $push1=, 1803886264741083; NO-SIMD128-NEXT:    i64.store 0($0), $pop11084; NO-SIMD128-NEXT:    return1085  ret <4 x i32> <i32 42, i32 42, i32 42, i32 42>1086}1087 1088define i32 @extract_v4i32(<4 x i32> %v) {1089; SIMD128-LABEL: extract_v4i32:1090; SIMD128:         .functype extract_v4i32 (v128) -> (i32)1091; SIMD128-NEXT:  # %bb.0:1092; SIMD128-NEXT:    i32x4.extract_lane $push0=, $0, 31093; SIMD128-NEXT:    return $pop01094;1095; NO-SIMD128-LABEL: extract_v4i32:1096; NO-SIMD128:         .functype extract_v4i32 (i32, i32, i32, i32) -> (i32)1097; NO-SIMD128-NEXT:  # %bb.0:1098; NO-SIMD128-NEXT:    return $31099  %elem = extractelement <4 x i32> %v, i32 31100  ret i32 %elem1101}1102 1103define i32 @extract_var_v4i32(<4 x i32> %v, i32 %i) {1104; SIMD128-LABEL: extract_var_v4i32:1105; SIMD128:         .functype extract_var_v4i32 (v128, i32) -> (i32)1106; SIMD128-NEXT:  # %bb.0:1107; SIMD128-NEXT:    global.get $push6=, __stack_pointer1108; SIMD128-NEXT:    i32.const $push7=, 161109; SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop71110; SIMD128-NEXT:    local.tee $push8=, $2=, $pop91111; SIMD128-NEXT:    v128.store 0($pop8), $01112; SIMD128-NEXT:    i32.const $push0=, 31113; SIMD128-NEXT:    i32.and $push1=, $1, $pop01114; SIMD128-NEXT:    i32.const $push2=, 21115; SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop21116; SIMD128-NEXT:    i32.or $push4=, $2, $pop31117; SIMD128-NEXT:    i32.load $push5=, 0($pop4)1118; SIMD128-NEXT:    return $pop51119;1120; NO-SIMD128-LABEL: extract_var_v4i32:1121; NO-SIMD128:         .functype extract_var_v4i32 (i32, i32, i32, i32, i32) -> (i32)1122; NO-SIMD128-NEXT:  # %bb.0:1123; NO-SIMD128-NEXT:    global.get $push6=, __stack_pointer1124; NO-SIMD128-NEXT:    i32.const $push7=, 161125; NO-SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop71126; NO-SIMD128-NEXT:    local.tee $push8=, $5=, $pop91127; NO-SIMD128-NEXT:    i32.store 12($pop8), $31128; NO-SIMD128-NEXT:    i32.store 8($5), $21129; NO-SIMD128-NEXT:    i32.store 4($5), $11130; NO-SIMD128-NEXT:    i32.store 0($5), $01131; NO-SIMD128-NEXT:    i32.const $push0=, 31132; NO-SIMD128-NEXT:    i32.and $push1=, $4, $pop01133; NO-SIMD128-NEXT:    i32.const $push2=, 21134; NO-SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop21135; NO-SIMD128-NEXT:    i32.or $push4=, $5, $pop31136; NO-SIMD128-NEXT:    i32.load $push5=, 0($pop4)1137; NO-SIMD128-NEXT:    return $pop51138  %elem = extractelement <4 x i32> %v, i32 %i1139  ret i32 %elem1140}1141 1142define i32 @extract_zero_v4i32(<4 x i32> %v) {1143; SIMD128-LABEL: extract_zero_v4i32:1144; SIMD128:         .functype extract_zero_v4i32 (v128) -> (i32)1145; SIMD128-NEXT:  # %bb.0:1146; SIMD128-NEXT:    i32x4.extract_lane $push0=, $0, 01147; SIMD128-NEXT:    return $pop01148;1149; NO-SIMD128-LABEL: extract_zero_v4i32:1150; NO-SIMD128:         .functype extract_zero_v4i32 (i32, i32, i32, i32) -> (i32)1151; NO-SIMD128-NEXT:  # %bb.0:1152; NO-SIMD128-NEXT:    return $01153  %elem = extractelement <4 x i32> %v, i32 01154  ret i32 %elem1155}1156 1157define <4 x i32> @replace_v4i32(<4 x i32> %v, i32 %x) {1158; SIMD128-LABEL: replace_v4i32:1159; SIMD128:         .functype replace_v4i32 (v128, i32) -> (v128)1160; SIMD128-NEXT:  # %bb.0:1161; SIMD128-NEXT:    i32x4.replace_lane $push0=, $0, 2, $11162; SIMD128-NEXT:    return $pop01163;1164; NO-SIMD128-LABEL: replace_v4i32:1165; NO-SIMD128:         .functype replace_v4i32 (i32, i32, i32, i32, i32, i32) -> ()1166; NO-SIMD128-NEXT:  # %bb.0:1167; NO-SIMD128-NEXT:    i32.store 12($0), $41168; NO-SIMD128-NEXT:    i32.store 8($0), $51169; NO-SIMD128-NEXT:    i32.store 4($0), $21170; NO-SIMD128-NEXT:    i32.store 0($0), $11171; NO-SIMD128-NEXT:    return1172  %res = insertelement <4 x i32> %v, i32 %x, i32 21173  ret <4 x i32> %res1174}1175 1176define <4 x i32> @replace_var_v4i32(<4 x i32> %v, i32 %i, i32 %x) {1177; SIMD128-LABEL: replace_var_v4i32:1178; SIMD128:         .functype replace_var_v4i32 (v128, i32, i32) -> (v128)1179; SIMD128-NEXT:  # %bb.0:1180; SIMD128-NEXT:    global.get $push6=, __stack_pointer1181; SIMD128-NEXT:    i32.const $push7=, 161182; SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop71183; SIMD128-NEXT:    local.tee $push8=, $3=, $pop91184; SIMD128-NEXT:    v128.store 0($pop8), $01185; SIMD128-NEXT:    i32.const $push0=, 31186; SIMD128-NEXT:    i32.and $push1=, $1, $pop01187; SIMD128-NEXT:    i32.const $push2=, 21188; SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop21189; SIMD128-NEXT:    i32.or $push4=, $3, $pop31190; SIMD128-NEXT:    i32.store 0($pop4), $21191; SIMD128-NEXT:    v128.load $push5=, 0($3)1192; SIMD128-NEXT:    return $pop51193;1194; NO-SIMD128-LABEL: replace_var_v4i32:1195; NO-SIMD128:         .functype replace_var_v4i32 (i32, i32, i32, i32, i32, i32, i32) -> ()1196; NO-SIMD128-NEXT:  # %bb.0:1197; NO-SIMD128-NEXT:    global.get $push7=, __stack_pointer1198; NO-SIMD128-NEXT:    i32.const $push8=, 161199; NO-SIMD128-NEXT:    i32.sub $push10=, $pop7, $pop81200; NO-SIMD128-NEXT:    local.tee $push9=, $7=, $pop101201; NO-SIMD128-NEXT:    i32.store 12($pop9), $41202; NO-SIMD128-NEXT:    i32.store 8($7), $31203; NO-SIMD128-NEXT:    i32.store 4($7), $21204; NO-SIMD128-NEXT:    i32.store 0($7), $11205; NO-SIMD128-NEXT:    i32.const $push0=, 31206; NO-SIMD128-NEXT:    i32.and $push1=, $5, $pop01207; NO-SIMD128-NEXT:    i32.const $push2=, 21208; NO-SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop21209; NO-SIMD128-NEXT:    i32.or $push4=, $7, $pop31210; NO-SIMD128-NEXT:    i32.store 0($pop4), $61211; NO-SIMD128-NEXT:    i64.load $push5=, 8($7)1212; NO-SIMD128-NEXT:    i64.store 8($0), $pop51213; NO-SIMD128-NEXT:    i64.load $push6=, 0($7)1214; NO-SIMD128-NEXT:    i64.store 0($0), $pop61215; NO-SIMD128-NEXT:    return1216  %res = insertelement <4 x i32> %v, i32 %x, i32 %i1217  ret <4 x i32> %res1218}1219 1220define <4 x i32> @replace_zero_v4i32(<4 x i32> %v, i32 %x) {1221; SIMD128-LABEL: replace_zero_v4i32:1222; SIMD128:         .functype replace_zero_v4i32 (v128, i32) -> (v128)1223; SIMD128-NEXT:  # %bb.0:1224; SIMD128-NEXT:    i32x4.replace_lane $push0=, $0, 0, $11225; SIMD128-NEXT:    return $pop01226;1227; NO-SIMD128-LABEL: replace_zero_v4i32:1228; NO-SIMD128:         .functype replace_zero_v4i32 (i32, i32, i32, i32, i32, i32) -> ()1229; NO-SIMD128-NEXT:  # %bb.0:1230; NO-SIMD128-NEXT:    i32.store 12($0), $41231; NO-SIMD128-NEXT:    i32.store 8($0), $31232; NO-SIMD128-NEXT:    i32.store 4($0), $21233; NO-SIMD128-NEXT:    i32.store 0($0), $51234; NO-SIMD128-NEXT:    return1235  %res = insertelement <4 x i32> %v, i32 %x, i32 01236  ret <4 x i32> %res1237}1238 1239define <4 x i32> @shuffle_v4i32(<4 x i32> %x, <4 x i32> %y) {1240; SIMD128-LABEL: shuffle_v4i32:1241; SIMD128:         .functype shuffle_v4i32 (v128, v128) -> (v128)1242; SIMD128-NEXT:  # %bb.0:1243; SIMD128-NEXT:    i8x16.shuffle $push0=, $0, $1, 0, 1, 2, 3, 20, 21, 22, 23, 8, 9, 10, 11, 28, 29, 30, 311244; SIMD128-NEXT:    return $pop01245;1246; NO-SIMD128-LABEL: shuffle_v4i32:1247; NO-SIMD128:         .functype shuffle_v4i32 (i32, i32, i32, i32, i32, i32, i32, i32, i32) -> ()1248; NO-SIMD128-NEXT:  # %bb.0:1249; NO-SIMD128-NEXT:    i32.store 12($0), $81250; NO-SIMD128-NEXT:    i32.store 8($0), $31251; NO-SIMD128-NEXT:    i32.store 4($0), $61252; NO-SIMD128-NEXT:    i32.store 0($0), $11253; NO-SIMD128-NEXT:    return1254  %res = shufflevector <4 x i32> %x, <4 x i32> %y,1255    <4 x i32> <i32 0, i32 5, i32 2, i32 7>1256  ret <4 x i32> %res1257}1258 1259define <4 x i32> @shuffle_undef_v4i32(<4 x i32> %x, <4 x i32> %y) {1260; SIMD128-LABEL: shuffle_undef_v4i32:1261; SIMD128:         .functype shuffle_undef_v4i32 (v128, v128) -> (v128)1262; SIMD128-NEXT:  # %bb.0:1263; SIMD128-NEXT:    i8x16.shuffle $push0=, $0, $0, 4, 5, 6, 7, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 31264; SIMD128-NEXT:    return $pop01265;1266; NO-SIMD128-LABEL: shuffle_undef_v4i32:1267; NO-SIMD128:         .functype shuffle_undef_v4i32 (i32, i32, i32, i32, i32, i32, i32, i32, i32) -> ()1268; NO-SIMD128-NEXT:  # %bb.0:1269; NO-SIMD128-NEXT:    i32.store 0($0), $21270; NO-SIMD128-NEXT:    return1271  %res = shufflevector <4 x i32> %x, <4 x i32> %y,1272    <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef>1273  ret <4 x i32> %res1274}1275 1276define <4 x i32> @build_v4i32(i32 %x0, i32 %x1, i32 %x2, i32 %x3) {1277; SIMD128-LABEL: build_v4i32:1278; SIMD128:         .functype build_v4i32 (i32, i32, i32, i32) -> (v128)1279; SIMD128-NEXT:  # %bb.0:1280; SIMD128-NEXT:    i32x4.splat $push0=, $01281; SIMD128-NEXT:    i32x4.replace_lane $push1=, $pop0, 1, $11282; SIMD128-NEXT:    i32x4.replace_lane $push2=, $pop1, 2, $21283; SIMD128-NEXT:    i32x4.replace_lane $push3=, $pop2, 3, $31284; SIMD128-NEXT:    return $pop31285;1286; NO-SIMD128-LABEL: build_v4i32:1287; NO-SIMD128:         .functype build_v4i32 (i32, i32, i32, i32, i32) -> ()1288; NO-SIMD128-NEXT:  # %bb.0:1289; NO-SIMD128-NEXT:    i32.store 12($0), $41290; NO-SIMD128-NEXT:    i32.store 8($0), $31291; NO-SIMD128-NEXT:    i32.store 4($0), $21292; NO-SIMD128-NEXT:    i32.store 0($0), $11293; NO-SIMD128-NEXT:    return1294  %t0 = insertelement <4 x i32> undef, i32 %x0, i32 01295  %t1 = insertelement <4 x i32> %t0, i32 %x1, i32 11296  %t2 = insertelement <4 x i32> %t1, i32 %x2, i32 21297  %res = insertelement <4 x i32> %t2, i32 %x3, i32 31298  ret <4 x i32> %res1299}1300 1301; ==============================================================================1302; 2 x i641303; ==============================================================================1304define <2 x i64> @const_v2i64() {1305; SIMD128-LABEL: const_v2i64:1306; SIMD128:         .functype const_v2i64 () -> (v128)1307; SIMD128-NEXT:  # %bb.0:1308; SIMD128-NEXT:    v128.const $push0=, 506097522914230528, 10848189056188439121309; SIMD128-NEXT:    return $pop01310;1311; NO-SIMD128-LABEL: const_v2i64:1312; NO-SIMD128:         .functype const_v2i64 (i32) -> ()1313; NO-SIMD128-NEXT:  # %bb.0:1314; NO-SIMD128-NEXT:    i64.const $push0=, 10848189056188439121315; NO-SIMD128-NEXT:    i64.store 8($0), $pop01316; NO-SIMD128-NEXT:    i64.const $push1=, 5060975229142305281317; NO-SIMD128-NEXT:    i64.store 0($0), $pop11318; NO-SIMD128-NEXT:    return1319  ret <2 x i64> <i64 506097522914230528, i64 1084818905618843912>1320}1321 1322define <2 x i64> @splat_v2i64(i64 %x) {1323; SIMD128-LABEL: splat_v2i64:1324; SIMD128:         .functype splat_v2i64 (i64) -> (v128)1325; SIMD128-NEXT:  # %bb.0:1326; SIMD128-NEXT:    i64x2.splat $push0=, $01327; SIMD128-NEXT:    return $pop01328;1329; NO-SIMD128-LABEL: splat_v2i64:1330; NO-SIMD128:         .functype splat_v2i64 (i32, i64) -> ()1331; NO-SIMD128-NEXT:  # %bb.0:1332; NO-SIMD128-NEXT:    i64.store 8($0), $11333; NO-SIMD128-NEXT:    i64.store 0($0), $11334; NO-SIMD128-NEXT:    return1335  %t1 = insertelement <2 x i64> zeroinitializer, i64 %x, i32 01336  %res = insertelement <2 x i64> %t1, i64 %x, i32 11337  ret <2 x i64> %res1338}1339 1340define <2 x i64> @const_splat_v2i64() {1341; SIMD128-LABEL: const_splat_v2i64:1342; SIMD128:         .functype const_splat_v2i64 () -> (v128)1343; SIMD128-NEXT:  # %bb.0:1344; SIMD128-NEXT:    v128.const $push0=, 42, 421345; SIMD128-NEXT:    return $pop01346;1347; NO-SIMD128-LABEL: const_splat_v2i64:1348; NO-SIMD128:         .functype const_splat_v2i64 (i32) -> ()1349; NO-SIMD128-NEXT:  # %bb.0:1350; NO-SIMD128-NEXT:    i64.const $push0=, 421351; NO-SIMD128-NEXT:    i64.store 8($0), $pop01352; NO-SIMD128-NEXT:    i64.const $push1=, 421353; NO-SIMD128-NEXT:    i64.store 0($0), $pop11354; NO-SIMD128-NEXT:    return1355  ret <2 x i64> <i64 42, i64 42>1356}1357 1358define i64 @extract_v2i64(<2 x i64> %v) {1359; SIMD128-LABEL: extract_v2i64:1360; SIMD128:         .functype extract_v2i64 (v128) -> (i64)1361; SIMD128-NEXT:  # %bb.0:1362; SIMD128-NEXT:    i64x2.extract_lane $push0=, $0, 11363; SIMD128-NEXT:    return $pop01364;1365; NO-SIMD128-LABEL: extract_v2i64:1366; NO-SIMD128:         .functype extract_v2i64 (i64, i64) -> (i64)1367; NO-SIMD128-NEXT:  # %bb.0:1368; NO-SIMD128-NEXT:    return $11369  %elem = extractelement <2 x i64> %v, i64 11370  ret i64 %elem1371}1372 1373define i64 @extract_var_v2i64(<2 x i64> %v, i32 %i) {1374; SIMD128-LABEL: extract_var_v2i64:1375; SIMD128:         .functype extract_var_v2i64 (v128, i32) -> (i64)1376; SIMD128-NEXT:  # %bb.0:1377; SIMD128-NEXT:    global.get $push6=, __stack_pointer1378; SIMD128-NEXT:    i32.const $push7=, 161379; SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop71380; SIMD128-NEXT:    local.tee $push8=, $2=, $pop91381; SIMD128-NEXT:    v128.store 0($pop8), $01382; SIMD128-NEXT:    i32.const $push0=, 11383; SIMD128-NEXT:    i32.and $push1=, $1, $pop01384; SIMD128-NEXT:    i32.const $push2=, 31385; SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop21386; SIMD128-NEXT:    i32.or $push4=, $2, $pop31387; SIMD128-NEXT:    i64.load $push5=, 0($pop4)1388; SIMD128-NEXT:    return $pop51389;1390; NO-SIMD128-LABEL: extract_var_v2i64:1391; NO-SIMD128:         .functype extract_var_v2i64 (i64, i64, i32) -> (i64)1392; NO-SIMD128-NEXT:  # %bb.0:1393; NO-SIMD128-NEXT:    global.get $push6=, __stack_pointer1394; NO-SIMD128-NEXT:    i32.const $push7=, 161395; NO-SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop71396; NO-SIMD128-NEXT:    local.tee $push8=, $3=, $pop91397; NO-SIMD128-NEXT:    i64.store 8($pop8), $11398; NO-SIMD128-NEXT:    i64.store 0($3), $01399; NO-SIMD128-NEXT:    i32.const $push0=, 11400; NO-SIMD128-NEXT:    i32.and $push1=, $2, $pop01401; NO-SIMD128-NEXT:    i32.const $push2=, 31402; NO-SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop21403; NO-SIMD128-NEXT:    i32.or $push4=, $3, $pop31404; NO-SIMD128-NEXT:    i64.load $push5=, 0($pop4)1405; NO-SIMD128-NEXT:    return $pop51406  %elem = extractelement <2 x i64> %v, i32 %i1407  ret i64 %elem1408}1409 1410define i64 @extract_zero_v2i64(<2 x i64> %v) {1411; SIMD128-LABEL: extract_zero_v2i64:1412; SIMD128:         .functype extract_zero_v2i64 (v128) -> (i64)1413; SIMD128-NEXT:  # %bb.0:1414; SIMD128-NEXT:    i64x2.extract_lane $push0=, $0, 01415; SIMD128-NEXT:    return $pop01416;1417; NO-SIMD128-LABEL: extract_zero_v2i64:1418; NO-SIMD128:         .functype extract_zero_v2i64 (i64, i64) -> (i64)1419; NO-SIMD128-NEXT:  # %bb.0:1420; NO-SIMD128-NEXT:    return $01421  %elem = extractelement <2 x i64> %v, i64 01422  ret i64 %elem1423}1424 1425define <2 x i64> @replace_v2i64(<2 x i64> %v, i64 %x) {1426; SIMD128-LABEL: replace_v2i64:1427; SIMD128:         .functype replace_v2i64 (v128, i64) -> (v128)1428; SIMD128-NEXT:  # %bb.0:1429; SIMD128-NEXT:    i64x2.replace_lane $push0=, $0, 0, $11430; SIMD128-NEXT:    return $pop01431;1432; NO-SIMD128-LABEL: replace_v2i64:1433; NO-SIMD128:         .functype replace_v2i64 (i32, i64, i64, i64) -> ()1434; NO-SIMD128-NEXT:  # %bb.0:1435; NO-SIMD128-NEXT:    i64.store 8($0), $21436; NO-SIMD128-NEXT:    i64.store 0($0), $31437; NO-SIMD128-NEXT:    return1438  %res = insertelement <2 x i64> %v, i64 %x, i32 01439  ret <2 x i64> %res1440}1441 1442define <2 x i64> @replace_var_v2i64(<2 x i64> %v, i32 %i, i64 %x) {1443; SIMD128-LABEL: replace_var_v2i64:1444; SIMD128:         .functype replace_var_v2i64 (v128, i32, i64) -> (v128)1445; SIMD128-NEXT:  # %bb.0:1446; SIMD128-NEXT:    global.get $push6=, __stack_pointer1447; SIMD128-NEXT:    i32.const $push7=, 161448; SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop71449; SIMD128-NEXT:    local.tee $push8=, $3=, $pop91450; SIMD128-NEXT:    v128.store 0($pop8), $01451; SIMD128-NEXT:    i32.const $push0=, 11452; SIMD128-NEXT:    i32.and $push1=, $1, $pop01453; SIMD128-NEXT:    i32.const $push2=, 31454; SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop21455; SIMD128-NEXT:    i32.or $push4=, $3, $pop31456; SIMD128-NEXT:    i64.store 0($pop4), $21457; SIMD128-NEXT:    v128.load $push5=, 0($3)1458; SIMD128-NEXT:    return $pop51459;1460; NO-SIMD128-LABEL: replace_var_v2i64:1461; NO-SIMD128:         .functype replace_var_v2i64 (i32, i64, i64, i32, i64) -> ()1462; NO-SIMD128-NEXT:  # %bb.0:1463; NO-SIMD128-NEXT:    global.get $push7=, __stack_pointer1464; NO-SIMD128-NEXT:    i32.const $push8=, 161465; NO-SIMD128-NEXT:    i32.sub $push10=, $pop7, $pop81466; NO-SIMD128-NEXT:    local.tee $push9=, $5=, $pop101467; NO-SIMD128-NEXT:    i64.store 8($pop9), $21468; NO-SIMD128-NEXT:    i64.store 0($5), $11469; NO-SIMD128-NEXT:    i32.const $push0=, 11470; NO-SIMD128-NEXT:    i32.and $push1=, $3, $pop01471; NO-SIMD128-NEXT:    i32.const $push2=, 31472; NO-SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop21473; NO-SIMD128-NEXT:    i32.or $push4=, $5, $pop31474; NO-SIMD128-NEXT:    i64.store 0($pop4), $41475; NO-SIMD128-NEXT:    i64.load $push5=, 8($5)1476; NO-SIMD128-NEXT:    i64.store 8($0), $pop51477; NO-SIMD128-NEXT:    i64.load $push6=, 0($5)1478; NO-SIMD128-NEXT:    i64.store 0($0), $pop61479; NO-SIMD128-NEXT:    return1480  %res = insertelement <2 x i64> %v, i64 %x, i32 %i1481  ret <2 x i64> %res1482}1483 1484define <2 x i64> @replace_zero_v2i64(<2 x i64> %v, i64 %x) {1485; SIMD128-LABEL: replace_zero_v2i64:1486; SIMD128:         .functype replace_zero_v2i64 (v128, i64) -> (v128)1487; SIMD128-NEXT:  # %bb.0:1488; SIMD128-NEXT:    i64x2.replace_lane $push0=, $0, 0, $11489; SIMD128-NEXT:    return $pop01490;1491; NO-SIMD128-LABEL: replace_zero_v2i64:1492; NO-SIMD128:         .functype replace_zero_v2i64 (i32, i64, i64, i64) -> ()1493; NO-SIMD128-NEXT:  # %bb.0:1494; NO-SIMD128-NEXT:    i64.store 8($0), $21495; NO-SIMD128-NEXT:    i64.store 0($0), $31496; NO-SIMD128-NEXT:    return1497  %res = insertelement <2 x i64> %v, i64 %x, i32 01498  ret <2 x i64> %res1499}1500 1501define <2 x i64> @shuffle_v2i64(<2 x i64> %x, <2 x i64> %y) {1502; SIMD128-LABEL: shuffle_v2i64:1503; SIMD128:         .functype shuffle_v2i64 (v128, v128) -> (v128)1504; SIMD128-NEXT:  # %bb.0:1505; SIMD128-NEXT:    i8x16.shuffle $push0=, $0, $1, 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 311506; SIMD128-NEXT:    return $pop01507;1508; NO-SIMD128-LABEL: shuffle_v2i64:1509; NO-SIMD128:         .functype shuffle_v2i64 (i32, i64, i64, i64, i64) -> ()1510; NO-SIMD128-NEXT:  # %bb.0:1511; NO-SIMD128-NEXT:    i64.store 8($0), $41512; NO-SIMD128-NEXT:    i64.store 0($0), $11513; NO-SIMD128-NEXT:    return1514  %res = shufflevector <2 x i64> %x, <2 x i64> %y, <2 x i32> <i32 0, i32 3>1515  ret <2 x i64> %res1516}1517 1518define <2 x i64> @shuffle_undef_v2i64(<2 x i64> %x, <2 x i64> %y) {1519; SIMD128-LABEL: shuffle_undef_v2i64:1520; SIMD128:         .functype shuffle_undef_v2i64 (v128, v128) -> (v128)1521; SIMD128-NEXT:  # %bb.0:1522; SIMD128-NEXT:    i8x16.shuffle $push0=, $0, $0, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 71523; SIMD128-NEXT:    return $pop01524;1525; NO-SIMD128-LABEL: shuffle_undef_v2i64:1526; NO-SIMD128:         .functype shuffle_undef_v2i64 (i32, i64, i64, i64, i64) -> ()1527; NO-SIMD128-NEXT:  # %bb.0:1528; NO-SIMD128-NEXT:    i64.store 0($0), $21529; NO-SIMD128-NEXT:    return1530  %res = shufflevector <2 x i64> %x, <2 x i64> %y,1531    <2 x i32> <i32 1, i32 undef>1532  ret <2 x i64> %res1533}1534 1535define <2 x i64> @build_v2i64(i64 %x0, i64 %x1) {1536; SIMD128-LABEL: build_v2i64:1537; SIMD128:         .functype build_v2i64 (i64, i64) -> (v128)1538; SIMD128-NEXT:  # %bb.0:1539; SIMD128-NEXT:    i64x2.splat $push0=, $01540; SIMD128-NEXT:    i64x2.replace_lane $push1=, $pop0, 1, $11541; SIMD128-NEXT:    return $pop11542;1543; NO-SIMD128-LABEL: build_v2i64:1544; NO-SIMD128:         .functype build_v2i64 (i32, i64, i64) -> ()1545; NO-SIMD128-NEXT:  # %bb.0:1546; NO-SIMD128-NEXT:    i64.store 8($0), $21547; NO-SIMD128-NEXT:    i64.store 0($0), $11548; NO-SIMD128-NEXT:    return1549  %t0 = insertelement <2 x i64> undef, i64 %x0, i32 01550  %res = insertelement <2 x i64> %t0, i64 %x1, i32 11551  ret <2 x i64> %res1552}1553 1554; ==============================================================================1555; 4 x f321556; ==============================================================================1557define <4 x float> @const_v4f32() {1558; SIMD128-LABEL: const_v4f32:1559; SIMD128:         .functype const_v4f32 () -> (v128)1560; SIMD128-NEXT:  # %bb.0:1561; SIMD128-NEXT:    v128.const $push0=, 0x1.0402p-121, 0x1.0c0a08p-113, 0x1.14121p-105, 0x1.1c1a18p-971562; SIMD128-NEXT:    return $pop01563;1564; NO-SIMD128-LABEL: const_v4f32:1565; NO-SIMD128:         .functype const_v4f32 (i32) -> ()1566; NO-SIMD128-NEXT:  # %bb.0:1567; NO-SIMD128-NEXT:    i64.const $push0=, 10848189056188439121568; NO-SIMD128-NEXT:    i64.store 8($0), $pop01569; NO-SIMD128-NEXT:    i64.const $push1=, 5060975229142305281570; NO-SIMD128-NEXT:    i64.store 0($0), $pop11571; NO-SIMD128-NEXT:    return1572  ret <4 x float> <float 0x3860402000000000, float 0x38e0c0a080000000,1573                   float 0x3961412100000000, float 0x39e1c1a180000000>1574}1575 1576define <4 x float> @splat_v4f32(float %x) {1577; SIMD128-LABEL: splat_v4f32:1578; SIMD128:         .functype splat_v4f32 (f32) -> (v128)1579; SIMD128-NEXT:  # %bb.0:1580; SIMD128-NEXT:    f32x4.splat $push0=, $01581; SIMD128-NEXT:    return $pop01582;1583; NO-SIMD128-LABEL: splat_v4f32:1584; NO-SIMD128:         .functype splat_v4f32 (i32, f32) -> ()1585; NO-SIMD128-NEXT:  # %bb.0:1586; NO-SIMD128-NEXT:    f32.store 12($0), $11587; NO-SIMD128-NEXT:    f32.store 8($0), $11588; NO-SIMD128-NEXT:    f32.store 4($0), $11589; NO-SIMD128-NEXT:    f32.store 0($0), $11590; NO-SIMD128-NEXT:    return1591  %v = insertelement <4 x float> undef, float %x, i32 01592  %res = shufflevector <4 x float> %v, <4 x float> undef,1593    <4 x i32> <i32 0, i32 0, i32 0, i32 0>1594  ret <4 x float> %res1595}1596 1597define <4 x float> @const_splat_v4f32() {1598; SIMD128-LABEL: const_splat_v4f32:1599; SIMD128:         .functype const_splat_v4f32 () -> (v128)1600; SIMD128-NEXT:  # %bb.0:1601; SIMD128-NEXT:    v128.const $push0=, 0x1.5p5, 0x1.5p5, 0x1.5p5, 0x1.5p51602; SIMD128-NEXT:    return $pop01603;1604; NO-SIMD128-LABEL: const_splat_v4f32:1605; NO-SIMD128:         .functype const_splat_v4f32 (i32) -> ()1606; NO-SIMD128-NEXT:  # %bb.0:1607; NO-SIMD128-NEXT:    i64.const $push0=, 47670602066815877121608; NO-SIMD128-NEXT:    i64.store 8($0), $pop01609; NO-SIMD128-NEXT:    i64.const $push1=, 47670602066815877121610; NO-SIMD128-NEXT:    i64.store 0($0), $pop11611; NO-SIMD128-NEXT:    return1612  ret <4 x float> <float 42., float 42., float 42., float 42.>1613}1614 1615define float @extract_v4f32(<4 x float> %v) {1616; SIMD128-LABEL: extract_v4f32:1617; SIMD128:         .functype extract_v4f32 (v128) -> (f32)1618; SIMD128-NEXT:  # %bb.0:1619; SIMD128-NEXT:    f32x4.extract_lane $push0=, $0, 31620; SIMD128-NEXT:    return $pop01621;1622; NO-SIMD128-LABEL: extract_v4f32:1623; NO-SIMD128:         .functype extract_v4f32 (f32, f32, f32, f32) -> (f32)1624; NO-SIMD128-NEXT:  # %bb.0:1625; NO-SIMD128-NEXT:    return $31626  %elem = extractelement <4 x float> %v, i32 31627  ret float %elem1628}1629 1630define float @extract_var_v4f32(<4 x float> %v, i32 %i) {1631; SIMD128-LABEL: extract_var_v4f32:1632; SIMD128:         .functype extract_var_v4f32 (v128, i32) -> (f32)1633; SIMD128-NEXT:  # %bb.0:1634; SIMD128-NEXT:    global.get $push6=, __stack_pointer1635; SIMD128-NEXT:    i32.const $push7=, 161636; SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop71637; SIMD128-NEXT:    local.tee $push8=, $2=, $pop91638; SIMD128-NEXT:    v128.store 0($pop8), $01639; SIMD128-NEXT:    i32.const $push0=, 31640; SIMD128-NEXT:    i32.and $push1=, $1, $pop01641; SIMD128-NEXT:    i32.const $push2=, 21642; SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop21643; SIMD128-NEXT:    i32.or $push4=, $2, $pop31644; SIMD128-NEXT:    f32.load $push5=, 0($pop4)1645; SIMD128-NEXT:    return $pop51646;1647; NO-SIMD128-LABEL: extract_var_v4f32:1648; NO-SIMD128:         .functype extract_var_v4f32 (f32, f32, f32, f32, i32) -> (f32)1649; NO-SIMD128-NEXT:  # %bb.0:1650; NO-SIMD128-NEXT:    global.get $push6=, __stack_pointer1651; NO-SIMD128-NEXT:    i32.const $push7=, 161652; NO-SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop71653; NO-SIMD128-NEXT:    local.tee $push8=, $5=, $pop91654; NO-SIMD128-NEXT:    f32.store 12($pop8), $31655; NO-SIMD128-NEXT:    f32.store 8($5), $21656; NO-SIMD128-NEXT:    f32.store 4($5), $11657; NO-SIMD128-NEXT:    f32.store 0($5), $01658; NO-SIMD128-NEXT:    i32.const $push0=, 31659; NO-SIMD128-NEXT:    i32.and $push1=, $4, $pop01660; NO-SIMD128-NEXT:    i32.const $push2=, 21661; NO-SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop21662; NO-SIMD128-NEXT:    i32.or $push4=, $5, $pop31663; NO-SIMD128-NEXT:    f32.load $push5=, 0($pop4)1664; NO-SIMD128-NEXT:    return $pop51665  %elem = extractelement <4 x float> %v, i32 %i1666  ret float %elem1667}1668 1669define float @extract_zero_v4f32(<4 x float> %v) {1670; SIMD128-LABEL: extract_zero_v4f32:1671; SIMD128:         .functype extract_zero_v4f32 (v128) -> (f32)1672; SIMD128-NEXT:  # %bb.0:1673; SIMD128-NEXT:    f32x4.extract_lane $push0=, $0, 01674; SIMD128-NEXT:    return $pop01675;1676; NO-SIMD128-LABEL: extract_zero_v4f32:1677; NO-SIMD128:         .functype extract_zero_v4f32 (f32, f32, f32, f32) -> (f32)1678; NO-SIMD128-NEXT:  # %bb.0:1679; NO-SIMD128-NEXT:    return $01680  %elem = extractelement <4 x float> %v, i32 01681  ret float %elem1682}1683 1684define <4 x float> @replace_v4f32(<4 x float> %v, float %x) {1685; SIMD128-LABEL: replace_v4f32:1686; SIMD128:         .functype replace_v4f32 (v128, f32) -> (v128)1687; SIMD128-NEXT:  # %bb.0:1688; SIMD128-NEXT:    f32x4.replace_lane $push0=, $0, 2, $11689; SIMD128-NEXT:    return $pop01690;1691; NO-SIMD128-LABEL: replace_v4f32:1692; NO-SIMD128:         .functype replace_v4f32 (i32, f32, f32, f32, f32, f32) -> ()1693; NO-SIMD128-NEXT:  # %bb.0:1694; NO-SIMD128-NEXT:    f32.store 12($0), $41695; NO-SIMD128-NEXT:    f32.store 8($0), $51696; NO-SIMD128-NEXT:    f32.store 4($0), $21697; NO-SIMD128-NEXT:    f32.store 0($0), $11698; NO-SIMD128-NEXT:    return1699  %res = insertelement <4 x float> %v, float %x, i32 21700  ret <4 x float> %res1701}1702 1703define <4 x float> @replace_var_v4f32(<4 x float> %v, i32 %i, float %x) {1704; SIMD128-LABEL: replace_var_v4f32:1705; SIMD128:         .functype replace_var_v4f32 (v128, i32, f32) -> (v128)1706; SIMD128-NEXT:  # %bb.0:1707; SIMD128-NEXT:    global.get $push6=, __stack_pointer1708; SIMD128-NEXT:    i32.const $push7=, 161709; SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop71710; SIMD128-NEXT:    local.tee $push8=, $3=, $pop91711; SIMD128-NEXT:    v128.store 0($pop8), $01712; SIMD128-NEXT:    i32.const $push0=, 31713; SIMD128-NEXT:    i32.and $push1=, $1, $pop01714; SIMD128-NEXT:    i32.const $push2=, 21715; SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop21716; SIMD128-NEXT:    i32.or $push4=, $3, $pop31717; SIMD128-NEXT:    f32.store 0($pop4), $21718; SIMD128-NEXT:    v128.load $push5=, 0($3)1719; SIMD128-NEXT:    return $pop51720;1721; NO-SIMD128-LABEL: replace_var_v4f32:1722; NO-SIMD128:         .functype replace_var_v4f32 (i32, f32, f32, f32, f32, i32, f32) -> ()1723; NO-SIMD128-NEXT:  # %bb.0:1724; NO-SIMD128-NEXT:    global.get $push7=, __stack_pointer1725; NO-SIMD128-NEXT:    i32.const $push8=, 161726; NO-SIMD128-NEXT:    i32.sub $push10=, $pop7, $pop81727; NO-SIMD128-NEXT:    local.tee $push9=, $7=, $pop101728; NO-SIMD128-NEXT:    f32.store 12($pop9), $41729; NO-SIMD128-NEXT:    f32.store 8($7), $31730; NO-SIMD128-NEXT:    f32.store 4($7), $21731; NO-SIMD128-NEXT:    f32.store 0($7), $11732; NO-SIMD128-NEXT:    i32.const $push0=, 31733; NO-SIMD128-NEXT:    i32.and $push1=, $5, $pop01734; NO-SIMD128-NEXT:    i32.const $push2=, 21735; NO-SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop21736; NO-SIMD128-NEXT:    i32.or $push4=, $7, $pop31737; NO-SIMD128-NEXT:    f32.store 0($pop4), $61738; NO-SIMD128-NEXT:    i64.load $push5=, 8($7)1739; NO-SIMD128-NEXT:    i64.store 8($0), $pop51740; NO-SIMD128-NEXT:    i64.load $push6=, 0($7)1741; NO-SIMD128-NEXT:    i64.store 0($0), $pop61742; NO-SIMD128-NEXT:    return1743  %res = insertelement <4 x float> %v, float %x, i32 %i1744  ret <4 x float> %res1745}1746 1747define <4 x float> @replace_zero_v4f32(<4 x float> %v, float %x) {1748; SIMD128-LABEL: replace_zero_v4f32:1749; SIMD128:         .functype replace_zero_v4f32 (v128, f32) -> (v128)1750; SIMD128-NEXT:  # %bb.0:1751; SIMD128-NEXT:    f32x4.replace_lane $push0=, $0, 0, $11752; SIMD128-NEXT:    return $pop01753;1754; NO-SIMD128-LABEL: replace_zero_v4f32:1755; NO-SIMD128:         .functype replace_zero_v4f32 (i32, f32, f32, f32, f32, f32) -> ()1756; NO-SIMD128-NEXT:  # %bb.0:1757; NO-SIMD128-NEXT:    f32.store 12($0), $41758; NO-SIMD128-NEXT:    f32.store 8($0), $31759; NO-SIMD128-NEXT:    f32.store 4($0), $21760; NO-SIMD128-NEXT:    f32.store 0($0), $51761; NO-SIMD128-NEXT:    return1762  %res = insertelement <4 x float> %v, float %x, i32 01763  ret <4 x float> %res1764}1765 1766define <4 x float> @shuffle_v4f32(<4 x float> %x, <4 x float> %y) {1767; SIMD128-LABEL: shuffle_v4f32:1768; SIMD128:         .functype shuffle_v4f32 (v128, v128) -> (v128)1769; SIMD128-NEXT:  # %bb.0:1770; SIMD128-NEXT:    i8x16.shuffle $push0=, $0, $1, 0, 1, 2, 3, 20, 21, 22, 23, 8, 9, 10, 11, 28, 29, 30, 311771; SIMD128-NEXT:    return $pop01772;1773; NO-SIMD128-LABEL: shuffle_v4f32:1774; NO-SIMD128:         .functype shuffle_v4f32 (i32, f32, f32, f32, f32, f32, f32, f32, f32) -> ()1775; NO-SIMD128-NEXT:  # %bb.0:1776; NO-SIMD128-NEXT:    f32.store 12($0), $81777; NO-SIMD128-NEXT:    f32.store 8($0), $31778; NO-SIMD128-NEXT:    f32.store 4($0), $61779; NO-SIMD128-NEXT:    f32.store 0($0), $11780; NO-SIMD128-NEXT:    return1781  %res = shufflevector <4 x float> %x, <4 x float> %y,1782    <4 x i32> <i32 0, i32 5, i32 2, i32 7>1783  ret <4 x float> %res1784}1785 1786define <4 x float> @shuffle_undef_v4f32(<4 x float> %x, <4 x float> %y) {1787; SIMD128-LABEL: shuffle_undef_v4f32:1788; SIMD128:         .functype shuffle_undef_v4f32 (v128, v128) -> (v128)1789; SIMD128-NEXT:  # %bb.0:1790; SIMD128-NEXT:    i8x16.shuffle $push0=, $0, $0, 4, 5, 6, 7, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 31791; SIMD128-NEXT:    return $pop01792;1793; NO-SIMD128-LABEL: shuffle_undef_v4f32:1794; NO-SIMD128:         .functype shuffle_undef_v4f32 (i32, f32, f32, f32, f32, f32, f32, f32, f32) -> ()1795; NO-SIMD128-NEXT:  # %bb.0:1796; NO-SIMD128-NEXT:    f32.store 0($0), $21797; NO-SIMD128-NEXT:    return1798  %res = shufflevector <4 x float> %x, <4 x float> %y,1799    <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef>1800  ret <4 x float> %res1801}1802 1803define <4 x float> @build_v4f32(float %x0, float %x1, float %x2, float %x3) {1804; SIMD128-LABEL: build_v4f32:1805; SIMD128:         .functype build_v4f32 (f32, f32, f32, f32) -> (v128)1806; SIMD128-NEXT:  # %bb.0:1807; SIMD128-NEXT:    f32x4.splat $push0=, $01808; SIMD128-NEXT:    f32x4.replace_lane $push1=, $pop0, 1, $11809; SIMD128-NEXT:    f32x4.replace_lane $push2=, $pop1, 2, $21810; SIMD128-NEXT:    f32x4.replace_lane $push3=, $pop2, 3, $31811; SIMD128-NEXT:    return $pop31812;1813; NO-SIMD128-LABEL: build_v4f32:1814; NO-SIMD128:         .functype build_v4f32 (i32, f32, f32, f32, f32) -> ()1815; NO-SIMD128-NEXT:  # %bb.0:1816; NO-SIMD128-NEXT:    f32.store 12($0), $41817; NO-SIMD128-NEXT:    f32.store 8($0), $31818; NO-SIMD128-NEXT:    f32.store 4($0), $21819; NO-SIMD128-NEXT:    f32.store 0($0), $11820; NO-SIMD128-NEXT:    return1821  %t0 = insertelement <4 x float> undef, float %x0, i32 01822  %t1 = insertelement <4 x float> %t0, float %x1, i32 11823  %t2 = insertelement <4 x float> %t1, float %x2, i32 21824  %res = insertelement <4 x float> %t2, float %x3, i32 31825  ret <4 x float> %res1826}1827 1828; ==============================================================================1829; 2 x f641830; ==============================================================================1831define <2 x double> @const_v2f64() {1832; SIMD128-LABEL: const_v2f64:1833; SIMD128:         .functype const_v2f64 () -> (v128)1834; SIMD128-NEXT:  # %bb.0:1835; SIMD128-NEXT:    v128.const $push0=, 0x1.60504030201p-911, 0x1.e0d0c0b0a0908p-7831836; SIMD128-NEXT:    return $pop01837;1838; NO-SIMD128-LABEL: const_v2f64:1839; NO-SIMD128:         .functype const_v2f64 (i32) -> ()1840; NO-SIMD128-NEXT:  # %bb.0:1841; NO-SIMD128-NEXT:    i64.const $push0=, 10848189056188439121842; NO-SIMD128-NEXT:    i64.store 8($0), $pop01843; NO-SIMD128-NEXT:    i64.const $push1=, 5060975229142305281844; NO-SIMD128-NEXT:    i64.store 0($0), $pop11845; NO-SIMD128-NEXT:    return1846  ret <2 x double> <double 0x0706050403020100, double 0x0F0E0D0C0B0A0908>1847}1848 1849define <2 x double> @splat_v2f64(double %x) {1850; SIMD128-LABEL: splat_v2f64:1851; SIMD128:         .functype splat_v2f64 (f64) -> (v128)1852; SIMD128-NEXT:  # %bb.0:1853; SIMD128-NEXT:    f64x2.splat $push0=, $01854; SIMD128-NEXT:    return $pop01855;1856; NO-SIMD128-LABEL: splat_v2f64:1857; NO-SIMD128:         .functype splat_v2f64 (i32, f64) -> ()1858; NO-SIMD128-NEXT:  # %bb.0:1859; NO-SIMD128-NEXT:    f64.store 8($0), $11860; NO-SIMD128-NEXT:    f64.store 0($0), $11861; NO-SIMD128-NEXT:    return1862  %t1 = insertelement <2 x double> zeroinitializer, double %x, i3 01863  %res = insertelement <2 x double> %t1, double %x, i32 11864  ret <2 x double> %res1865}1866 1867define <2 x double> @const_splat_v2f64() {1868; SIMD128-LABEL: const_splat_v2f64:1869; SIMD128:         .functype const_splat_v2f64 () -> (v128)1870; SIMD128-NEXT:  # %bb.0:1871; SIMD128-NEXT:    v128.const $push0=, 0x1.5p5, 0x1.5p51872; SIMD128-NEXT:    return $pop01873;1874; NO-SIMD128-LABEL: const_splat_v2f64:1875; NO-SIMD128:         .functype const_splat_v2f64 (i32) -> ()1876; NO-SIMD128-NEXT:  # %bb.0:1877; NO-SIMD128-NEXT:    i64.const $push0=, 46311077918204231681878; NO-SIMD128-NEXT:    i64.store 8($0), $pop01879; NO-SIMD128-NEXT:    i64.const $push1=, 46311077918204231681880; NO-SIMD128-NEXT:    i64.store 0($0), $pop11881; NO-SIMD128-NEXT:    return1882  ret <2 x double> <double 42., double 42.>1883}1884 1885define double @extract_v2f64(<2 x double> %v) {1886; SIMD128-LABEL: extract_v2f64:1887; SIMD128:         .functype extract_v2f64 (v128) -> (f64)1888; SIMD128-NEXT:  # %bb.0:1889; SIMD128-NEXT:    f64x2.extract_lane $push0=, $0, 11890; SIMD128-NEXT:    return $pop01891;1892; NO-SIMD128-LABEL: extract_v2f64:1893; NO-SIMD128:         .functype extract_v2f64 (f64, f64) -> (f64)1894; NO-SIMD128-NEXT:  # %bb.0:1895; NO-SIMD128-NEXT:    return $11896  %elem = extractelement <2 x double> %v, i32 11897  ret double %elem1898}1899 1900define double @extract_var_v2f64(<2 x double> %v, i32 %i) {1901; SIMD128-LABEL: extract_var_v2f64:1902; SIMD128:         .functype extract_var_v2f64 (v128, i32) -> (f64)1903; SIMD128-NEXT:  # %bb.0:1904; SIMD128-NEXT:    global.get $push6=, __stack_pointer1905; SIMD128-NEXT:    i32.const $push7=, 161906; SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop71907; SIMD128-NEXT:    local.tee $push8=, $2=, $pop91908; SIMD128-NEXT:    v128.store 0($pop8), $01909; SIMD128-NEXT:    i32.const $push0=, 11910; SIMD128-NEXT:    i32.and $push1=, $1, $pop01911; SIMD128-NEXT:    i32.const $push2=, 31912; SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop21913; SIMD128-NEXT:    i32.or $push4=, $2, $pop31914; SIMD128-NEXT:    f64.load $push5=, 0($pop4)1915; SIMD128-NEXT:    return $pop51916;1917; NO-SIMD128-LABEL: extract_var_v2f64:1918; NO-SIMD128:         .functype extract_var_v2f64 (f64, f64, i32) -> (f64)1919; NO-SIMD128-NEXT:  # %bb.0:1920; NO-SIMD128-NEXT:    global.get $push6=, __stack_pointer1921; NO-SIMD128-NEXT:    i32.const $push7=, 161922; NO-SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop71923; NO-SIMD128-NEXT:    local.tee $push8=, $3=, $pop91924; NO-SIMD128-NEXT:    f64.store 8($pop8), $11925; NO-SIMD128-NEXT:    f64.store 0($3), $01926; NO-SIMD128-NEXT:    i32.const $push0=, 11927; NO-SIMD128-NEXT:    i32.and $push1=, $2, $pop01928; NO-SIMD128-NEXT:    i32.const $push2=, 31929; NO-SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop21930; NO-SIMD128-NEXT:    i32.or $push4=, $3, $pop31931; NO-SIMD128-NEXT:    f64.load $push5=, 0($pop4)1932; NO-SIMD128-NEXT:    return $pop51933  %elem = extractelement <2 x double> %v, i32 %i1934  ret double %elem1935}1936 1937define double @extract_zero_v2f64(<2 x double> %v) {1938; SIMD128-LABEL: extract_zero_v2f64:1939; SIMD128:         .functype extract_zero_v2f64 (v128) -> (f64)1940; SIMD128-NEXT:  # %bb.0:1941; SIMD128-NEXT:    f64x2.extract_lane $push0=, $0, 01942; SIMD128-NEXT:    return $pop01943;1944; NO-SIMD128-LABEL: extract_zero_v2f64:1945; NO-SIMD128:         .functype extract_zero_v2f64 (f64, f64) -> (f64)1946; NO-SIMD128-NEXT:  # %bb.0:1947; NO-SIMD128-NEXT:    return $01948  %elem = extractelement <2 x double> %v, i32 01949  ret double %elem1950}1951 1952define <2 x double> @replace_v2f64(<2 x double> %v, double %x) {1953; SIMD128-LABEL: replace_v2f64:1954; SIMD128:         .functype replace_v2f64 (v128, f64) -> (v128)1955; SIMD128-NEXT:  # %bb.0:1956; SIMD128-NEXT:    f64x2.replace_lane $push0=, $0, 0, $11957; SIMD128-NEXT:    return $pop01958;1959; NO-SIMD128-LABEL: replace_v2f64:1960; NO-SIMD128:         .functype replace_v2f64 (i32, f64, f64, f64) -> ()1961; NO-SIMD128-NEXT:  # %bb.0:1962; NO-SIMD128-NEXT:    f64.store 8($0), $21963; NO-SIMD128-NEXT:    f64.store 0($0), $31964; NO-SIMD128-NEXT:    return1965  %res = insertelement <2 x double> %v, double %x, i32 01966  ret <2 x double> %res1967}1968 1969define <2 x double> @replace_var_v2f64(<2 x double> %v, i32 %i, double %x) {1970; SIMD128-LABEL: replace_var_v2f64:1971; SIMD128:         .functype replace_var_v2f64 (v128, i32, f64) -> (v128)1972; SIMD128-NEXT:  # %bb.0:1973; SIMD128-NEXT:    global.get $push6=, __stack_pointer1974; SIMD128-NEXT:    i32.const $push7=, 161975; SIMD128-NEXT:    i32.sub $push9=, $pop6, $pop71976; SIMD128-NEXT:    local.tee $push8=, $3=, $pop91977; SIMD128-NEXT:    v128.store 0($pop8), $01978; SIMD128-NEXT:    i32.const $push0=, 11979; SIMD128-NEXT:    i32.and $push1=, $1, $pop01980; SIMD128-NEXT:    i32.const $push2=, 31981; SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop21982; SIMD128-NEXT:    i32.or $push4=, $3, $pop31983; SIMD128-NEXT:    f64.store 0($pop4), $21984; SIMD128-NEXT:    v128.load $push5=, 0($3)1985; SIMD128-NEXT:    return $pop51986;1987; NO-SIMD128-LABEL: replace_var_v2f64:1988; NO-SIMD128:         .functype replace_var_v2f64 (i32, f64, f64, i32, f64) -> ()1989; NO-SIMD128-NEXT:  # %bb.0:1990; NO-SIMD128-NEXT:    global.get $push7=, __stack_pointer1991; NO-SIMD128-NEXT:    i32.const $push8=, 161992; NO-SIMD128-NEXT:    i32.sub $push10=, $pop7, $pop81993; NO-SIMD128-NEXT:    local.tee $push9=, $5=, $pop101994; NO-SIMD128-NEXT:    f64.store 8($pop9), $21995; NO-SIMD128-NEXT:    f64.store 0($5), $11996; NO-SIMD128-NEXT:    i32.const $push0=, 11997; NO-SIMD128-NEXT:    i32.and $push1=, $3, $pop01998; NO-SIMD128-NEXT:    i32.const $push2=, 31999; NO-SIMD128-NEXT:    i32.shl $push3=, $pop1, $pop22000; NO-SIMD128-NEXT:    i32.or $push4=, $5, $pop32001; NO-SIMD128-NEXT:    f64.store 0($pop4), $42002; NO-SIMD128-NEXT:    f64.load $push5=, 8($5)2003; NO-SIMD128-NEXT:    f64.store 8($0), $pop52004; NO-SIMD128-NEXT:    f64.load $push6=, 0($5)2005; NO-SIMD128-NEXT:    f64.store 0($0), $pop62006; NO-SIMD128-NEXT:    return2007  %res = insertelement <2 x double> %v, double %x, i32 %i2008  ret <2 x double> %res2009}2010 2011define <2 x double> @replace_zero_v2f64(<2 x double> %v, double %x) {2012; SIMD128-LABEL: replace_zero_v2f64:2013; SIMD128:         .functype replace_zero_v2f64 (v128, f64) -> (v128)2014; SIMD128-NEXT:  # %bb.0:2015; SIMD128-NEXT:    f64x2.replace_lane $push0=, $0, 0, $12016; SIMD128-NEXT:    return $pop02017;2018; NO-SIMD128-LABEL: replace_zero_v2f64:2019; NO-SIMD128:         .functype replace_zero_v2f64 (i32, f64, f64, f64) -> ()2020; NO-SIMD128-NEXT:  # %bb.0:2021; NO-SIMD128-NEXT:    f64.store 8($0), $22022; NO-SIMD128-NEXT:    f64.store 0($0), $32023; NO-SIMD128-NEXT:    return2024  %res = insertelement <2 x double> %v, double %x, i32 02025  ret <2 x double> %res2026}2027 2028define <2 x double> @shuffle_v2f64(<2 x double> %x, <2 x double> %y) {2029; SIMD128-LABEL: shuffle_v2f64:2030; SIMD128:         .functype shuffle_v2f64 (v128, v128) -> (v128)2031; SIMD128-NEXT:  # %bb.0:2032; SIMD128-NEXT:    i8x16.shuffle $push0=, $0, $1, 0, 1, 2, 3, 4, 5, 6, 7, 24, 25, 26, 27, 28, 29, 30, 312033; SIMD128-NEXT:    return $pop02034;2035; NO-SIMD128-LABEL: shuffle_v2f64:2036; NO-SIMD128:         .functype shuffle_v2f64 (i32, f64, f64, f64, f64) -> ()2037; NO-SIMD128-NEXT:  # %bb.0:2038; NO-SIMD128-NEXT:    f64.store 8($0), $42039; NO-SIMD128-NEXT:    f64.store 0($0), $12040; NO-SIMD128-NEXT:    return2041  %res = shufflevector <2 x double> %x, <2 x double> %y,2042    <2 x i32> <i32 0, i32 3>2043  ret <2 x double> %res2044}2045 2046define <2 x double> @shuffle_undef_v2f64(<2 x double> %x, <2 x double> %y) {2047; SIMD128-LABEL: shuffle_undef_v2f64:2048; SIMD128:         .functype shuffle_undef_v2f64 (v128, v128) -> (v128)2049; SIMD128-NEXT:  # %bb.0:2050; SIMD128-NEXT:    i8x16.shuffle $push0=, $0, $0, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3, 4, 5, 6, 72051; SIMD128-NEXT:    return $pop02052;2053; NO-SIMD128-LABEL: shuffle_undef_v2f64:2054; NO-SIMD128:         .functype shuffle_undef_v2f64 (i32, f64, f64, f64, f64) -> ()2055; NO-SIMD128-NEXT:  # %bb.0:2056; NO-SIMD128-NEXT:    f64.store 0($0), $22057; NO-SIMD128-NEXT:    return2058  %res = shufflevector <2 x double> %x, <2 x double> %y,2059    <2 x i32> <i32 1, i32 undef>2060  ret <2 x double> %res2061}2062 2063define <2 x double> @build_v2f64(double %x0, double %x1) {2064; SIMD128-LABEL: build_v2f64:2065; SIMD128:         .functype build_v2f64 (f64, f64) -> (v128)2066; SIMD128-NEXT:  # %bb.0:2067; SIMD128-NEXT:    f64x2.splat $push0=, $02068; SIMD128-NEXT:    f64x2.replace_lane $push1=, $pop0, 1, $12069; SIMD128-NEXT:    return $pop12070;2071; NO-SIMD128-LABEL: build_v2f64:2072; NO-SIMD128:         .functype build_v2f64 (i32, f64, f64) -> ()2073; NO-SIMD128-NEXT:  # %bb.0:2074; NO-SIMD128-NEXT:    f64.store 8($0), $22075; NO-SIMD128-NEXT:    f64.store 0($0), $12076; NO-SIMD128-NEXT:    return2077  %t0 = insertelement <2 x double> undef, double %x0, i32 02078  %res = insertelement <2 x double> %t0, double %x1, i32 12079  ret <2 x double> %res2080}2081