3410 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+sse2,-bmi2,+slow-shld | FileCheck %s --check-prefixes=ALL,X64,X64-NO-BMI2,X64-NO-SHLD,X64-NO-BMI2-NO-SHLD3; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+sse2,-bmi2,-slow-shld | FileCheck %s --check-prefixes=ALL,X64,X64-NO-BMI2,X64-SHLD,X64-NO-BMI2-HAVE-SHLD4; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+sse2,+bmi2,+slow-shld | FileCheck %s --check-prefixes=ALL,X64,X64-BMI2,X64-NO-SHLD,X64-HAVE-BMI2-NO-SHLD5; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mattr=+sse2,+bmi2,-slow-shld | FileCheck %s --check-prefixes=ALL,X64,X64-BMI2,X64-SHLD,X64-HAVE-BMI2-HAVE-SHLD6; RUN: llc < %s -mtriple=i686-unknown-linux-gnu -mattr=+sse2,-bmi2,+slow-shld | FileCheck %s --check-prefixes=ALL,X86,X86-NO-BMI2,X86-NO-SHLD,X86-NO-BMI2-NO-SHLD7; RUN: llc < %s -mtriple=i686-unknown-linux-gnu -mattr=+sse2,-bmi2,-slow-shld | FileCheck %s --check-prefixes=ALL,X86,X86-NO-BMI2,X86-SHLD,X86-NO-BMI2-HAVE-SHLD8; RUN: llc < %s -mtriple=i686-unknown-linux-gnu -mattr=+sse2,+bmi2,+slow-shld | FileCheck %s --check-prefixes=ALL,X86,X86-BMI2,X86-NO-SHLD,X86-HAVE-BMI2-NO-SHLD9; RUN: llc < %s -mtriple=i686-unknown-linux-gnu -mattr=+sse2,+bmi2,-slow-shld | FileCheck %s --check-prefixes=ALL,X86,X86-BMI2,X86-SHLD,X86-HAVE-BMI2-HAVE-SHLD10 11define void @load_1byte_chunk_of_2byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {12; X64-NO-BMI2-LABEL: load_1byte_chunk_of_2byte_alloca_with_zero_upper_half:13; X64-NO-BMI2: # %bb.0:14; X64-NO-BMI2-NEXT: movzbl (%rdi), %eax15; X64-NO-BMI2-NEXT: leal (,%rsi,8), %ecx16; X64-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx17; X64-NO-BMI2-NEXT: shrl %cl, %eax18; X64-NO-BMI2-NEXT: movb %al, (%rdx)19; X64-NO-BMI2-NEXT: retq20;21; X64-BMI2-LABEL: load_1byte_chunk_of_2byte_alloca_with_zero_upper_half:22; X64-BMI2: # %bb.0:23; X64-BMI2-NEXT: movzbl (%rdi), %eax24; X64-BMI2-NEXT: shll $3, %esi25; X64-BMI2-NEXT: shrxl %esi, %eax, %eax26; X64-BMI2-NEXT: movb %al, (%rdx)27; X64-BMI2-NEXT: retq28;29; X86-NO-BMI2-LABEL: load_1byte_chunk_of_2byte_alloca_with_zero_upper_half:30; X86-NO-BMI2: # %bb.0:31; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %edx32; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx33; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %eax34; X86-NO-BMI2-NEXT: movzbl (%eax), %eax35; X86-NO-BMI2-NEXT: shll $3, %ecx36; X86-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx37; X86-NO-BMI2-NEXT: shrl %cl, %eax38; X86-NO-BMI2-NEXT: movb %al, (%edx)39; X86-NO-BMI2-NEXT: retl40;41; X86-BMI2-LABEL: load_1byte_chunk_of_2byte_alloca_with_zero_upper_half:42; X86-BMI2: # %bb.0:43; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %eax44; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx45; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %edx46; X86-BMI2-NEXT: movzbl (%edx), %edx47; X86-BMI2-NEXT: shll $3, %ecx48; X86-BMI2-NEXT: shrxl %ecx, %edx, %ecx49; X86-BMI2-NEXT: movb %cl, (%eax)50; X86-BMI2-NEXT: retl51 %init1 = load i8, ptr %src, align 152 %intermediate.sroa.0.0.vec.insert = insertelement <2 x i8> <i8 poison, i8 0>, i8 %init1, i64 053 %intermediate.val.frozen = freeze <2 x i8> %intermediate.sroa.0.0.vec.insert54 %intermediate.val.frozen.bits = bitcast <2 x i8> %intermediate.val.frozen to i1655 %byteOff.tr = trunc i64 %byteOff to i1656 %byteOff.numbits.wide = shl i16 %byteOff.tr, 357 %intermediate.val.frozen.bits.positioned = lshr i16 %intermediate.val.frozen.bits, %byteOff.numbits.wide58 %intermediate.val.frozen.bits.positioned.extracted = trunc i16 %intermediate.val.frozen.bits.positioned to i859 %1 = insertelement <1 x i8> poison, i8 %intermediate.val.frozen.bits.positioned.extracted, i64 060 store <1 x i8> %1, ptr %dst, align 161 ret void62}63 64define void @load_1byte_chunk_of_4byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {65; X64-NO-BMI2-LABEL: load_1byte_chunk_of_4byte_alloca_with_zero_upper_half:66; X64-NO-BMI2: # %bb.0:67; X64-NO-BMI2-NEXT: movzwl (%rdi), %eax68; X64-NO-BMI2-NEXT: leal (,%rsi,8), %ecx69; X64-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx70; X64-NO-BMI2-NEXT: shrl %cl, %eax71; X64-NO-BMI2-NEXT: movb %al, (%rdx)72; X64-NO-BMI2-NEXT: retq73;74; X64-BMI2-LABEL: load_1byte_chunk_of_4byte_alloca_with_zero_upper_half:75; X64-BMI2: # %bb.0:76; X64-BMI2-NEXT: movzwl (%rdi), %eax77; X64-BMI2-NEXT: shll $3, %esi78; X64-BMI2-NEXT: shrxl %esi, %eax, %eax79; X64-BMI2-NEXT: movb %al, (%rdx)80; X64-BMI2-NEXT: retq81;82; X86-NO-BMI2-LABEL: load_1byte_chunk_of_4byte_alloca_with_zero_upper_half:83; X86-NO-BMI2: # %bb.0:84; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %edx85; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx86; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %eax87; X86-NO-BMI2-NEXT: movzwl (%eax), %eax88; X86-NO-BMI2-NEXT: shll $3, %ecx89; X86-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx90; X86-NO-BMI2-NEXT: shrl %cl, %eax91; X86-NO-BMI2-NEXT: movb %al, (%edx)92; X86-NO-BMI2-NEXT: retl93;94; X86-BMI2-LABEL: load_1byte_chunk_of_4byte_alloca_with_zero_upper_half:95; X86-BMI2: # %bb.0:96; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %eax97; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx98; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %edx99; X86-BMI2-NEXT: movzwl (%edx), %edx100; X86-BMI2-NEXT: shll $3, %ecx101; X86-BMI2-NEXT: shrxl %ecx, %edx, %ecx102; X86-BMI2-NEXT: movb %cl, (%eax)103; X86-BMI2-NEXT: retl104 %init = load <2 x i8>, ptr %src, align 1105 %intermediate.sroa.0.0.vec.expand = shufflevector <2 x i8> %init, <2 x i8> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>106 %intermediate.sroa.0.0.vecblend = shufflevector <4 x i8> %intermediate.sroa.0.0.vec.expand, <4 x i8> <i8 poison, i8 poison, i8 0, i8 0>, <4 x i32> <i32 0, i32 1, i32 6, i32 7>107 %intermediate.val.frozen = freeze <4 x i8> %intermediate.sroa.0.0.vecblend108 %intermediate.val.frozen.bits = bitcast <4 x i8> %intermediate.val.frozen to i32109 %byteOff.tr = trunc i64 %byteOff to i32110 %byteOff.numbits.wide = shl i32 %byteOff.tr, 3111 %intermediate.val.frozen.bits.positioned = lshr i32 %intermediate.val.frozen.bits, %byteOff.numbits.wide112 %intermediate.val.frozen.bits.positioned.extracted = trunc i32 %intermediate.val.frozen.bits.positioned to i8113 %1 = insertelement <1 x i8> poison, i8 %intermediate.val.frozen.bits.positioned.extracted, i64 0114 store <1 x i8> %1, ptr %dst, align 1115 ret void116}117 118define void @load_2byte_chunk_of_4byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {119; X64-NO-BMI2-LABEL: load_2byte_chunk_of_4byte_alloca_with_zero_upper_half:120; X64-NO-BMI2: # %bb.0:121; X64-NO-BMI2-NEXT: movzwl (%rdi), %eax122; X64-NO-BMI2-NEXT: leal (,%rsi,8), %ecx123; X64-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx124; X64-NO-BMI2-NEXT: shrl %cl, %eax125; X64-NO-BMI2-NEXT: movw %ax, (%rdx)126; X64-NO-BMI2-NEXT: retq127;128; X64-BMI2-LABEL: load_2byte_chunk_of_4byte_alloca_with_zero_upper_half:129; X64-BMI2: # %bb.0:130; X64-BMI2-NEXT: movzwl (%rdi), %eax131; X64-BMI2-NEXT: shll $3, %esi132; X64-BMI2-NEXT: shrxl %esi, %eax, %eax133; X64-BMI2-NEXT: movw %ax, (%rdx)134; X64-BMI2-NEXT: retq135;136; X86-NO-BMI2-LABEL: load_2byte_chunk_of_4byte_alloca_with_zero_upper_half:137; X86-NO-BMI2: # %bb.0:138; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %eax139; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx140; X86-NO-BMI2-NEXT: movl {{[0-9]+}}(%esp), %edx141; X86-NO-BMI2-NEXT: movzwl (%edx), %edx142; X86-NO-BMI2-NEXT: shll $3, %ecx143; X86-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx144; X86-NO-BMI2-NEXT: shrl %cl, %edx145; X86-NO-BMI2-NEXT: movw %dx, (%eax)146; X86-NO-BMI2-NEXT: retl147;148; X86-BMI2-LABEL: load_2byte_chunk_of_4byte_alloca_with_zero_upper_half:149; X86-BMI2: # %bb.0:150; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %eax151; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %ecx152; X86-BMI2-NEXT: movl {{[0-9]+}}(%esp), %edx153; X86-BMI2-NEXT: movzwl (%edx), %edx154; X86-BMI2-NEXT: shll $3, %ecx155; X86-BMI2-NEXT: shrxl %ecx, %edx, %ecx156; X86-BMI2-NEXT: movw %cx, (%eax)157; X86-BMI2-NEXT: retl158 %init = load <2 x i8>, ptr %src, align 1159 %intermediate.sroa.0.0.vec.expand = shufflevector <2 x i8> %init, <2 x i8> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>160 %intermediate.sroa.0.0.vecblend = shufflevector <4 x i8> %intermediate.sroa.0.0.vec.expand, <4 x i8> <i8 poison, i8 poison, i8 0, i8 0>, <4 x i32> <i32 0, i32 1, i32 6, i32 7>161 %intermediate.val.frozen = freeze <4 x i8> %intermediate.sroa.0.0.vecblend162 %intermediate.val.frozen.bits = bitcast <4 x i8> %intermediate.val.frozen to i32163 %byteOff.tr = trunc i64 %byteOff to i32164 %byteOff.numbits.wide = shl i32 %byteOff.tr, 3165 %intermediate.val.frozen.bits.positioned = lshr i32 %intermediate.val.frozen.bits, %byteOff.numbits.wide166 %intermediate.val.frozen.bits.positioned.extracted = trunc i32 %intermediate.val.frozen.bits.positioned to i16167 store i16 %intermediate.val.frozen.bits.positioned.extracted, ptr %dst, align 2168 ret void169}170 171define void @load_1byte_chunk_of_8byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {172; X64-NO-BMI2-LABEL: load_1byte_chunk_of_8byte_alloca_with_zero_upper_half:173; X64-NO-BMI2: # %bb.0:174; X64-NO-BMI2-NEXT: leal (,%rsi,8), %ecx175; X64-NO-BMI2-NEXT: movl (%rdi), %eax176; X64-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx177; X64-NO-BMI2-NEXT: shrq %cl, %rax178; X64-NO-BMI2-NEXT: movb %al, (%rdx)179; X64-NO-BMI2-NEXT: retq180;181; X64-BMI2-LABEL: load_1byte_chunk_of_8byte_alloca_with_zero_upper_half:182; X64-BMI2: # %bb.0:183; X64-BMI2-NEXT: shll $3, %esi184; X64-BMI2-NEXT: movl (%rdi), %eax185; X64-BMI2-NEXT: shrxq %rsi, %rax, %rax186; X64-BMI2-NEXT: movb %al, (%rdx)187; X64-BMI2-NEXT: retq188;189; X86-NO-BMI2-NO-SHLD-LABEL: load_1byte_chunk_of_8byte_alloca_with_zero_upper_half:190; X86-NO-BMI2-NO-SHLD: # %bb.0:191; X86-NO-BMI2-NO-SHLD-NEXT: pushl %ebx192; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax193; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx194; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx195; X86-NO-BMI2-NO-SHLD-NEXT: movl (%edx), %edx196; X86-NO-BMI2-NO-SHLD-NEXT: shll $3, %ecx197; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %edx198; X86-NO-BMI2-NO-SHLD-NEXT: xorl %ebx, %ebx199; X86-NO-BMI2-NO-SHLD-NEXT: testb $32, %cl200; X86-NO-BMI2-NO-SHLD-NEXT: cmovel %edx, %ebx201; X86-NO-BMI2-NO-SHLD-NEXT: movb %bl, (%eax)202; X86-NO-BMI2-NO-SHLD-NEXT: popl %ebx203; X86-NO-BMI2-NO-SHLD-NEXT: retl204;205; X86-SHLD-LABEL: load_1byte_chunk_of_8byte_alloca_with_zero_upper_half:206; X86-SHLD: # %bb.0:207; X86-SHLD-NEXT: pushl %esi208; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax209; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx210; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx211; X86-SHLD-NEXT: movl (%edx), %edx212; X86-SHLD-NEXT: shll $3, %ecx213; X86-SHLD-NEXT: xorl %esi, %esi214; X86-SHLD-NEXT: shrdl %cl, %esi, %edx215; X86-SHLD-NEXT: testb $32, %cl216; X86-SHLD-NEXT: cmovnel %esi, %edx217; X86-SHLD-NEXT: movb %dl, (%eax)218; X86-SHLD-NEXT: popl %esi219; X86-SHLD-NEXT: retl220;221; X86-HAVE-BMI2-NO-SHLD-LABEL: load_1byte_chunk_of_8byte_alloca_with_zero_upper_half:222; X86-HAVE-BMI2-NO-SHLD: # %bb.0:223; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %ebx224; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax225; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx226; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx227; X86-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %ecx228; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ecx, (%edx), %edx229; X86-HAVE-BMI2-NO-SHLD-NEXT: xorl %ebx, %ebx230; X86-HAVE-BMI2-NO-SHLD-NEXT: testb $32, %cl231; X86-HAVE-BMI2-NO-SHLD-NEXT: cmovel %edx, %ebx232; X86-HAVE-BMI2-NO-SHLD-NEXT: movb %bl, (%eax)233; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %ebx234; X86-HAVE-BMI2-NO-SHLD-NEXT: retl235 %init = load <4 x i8>, ptr %src, align 1236 %intermediate.sroa.0.0.vec.expand = shufflevector <4 x i8> %init, <4 x i8> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef>237 %intermediate.sroa.0.0.vecblend = shufflevector <8 x i8> %intermediate.sroa.0.0.vec.expand, <8 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0>, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15>238 %byteOff.numbits = shl nuw nsw i64 %byteOff, 3239 %intermediate.val.frozen = freeze <8 x i8> %intermediate.sroa.0.0.vecblend240 %intermediate.val.frozen.bits = bitcast <8 x i8> %intermediate.val.frozen to i64241 %intermediate.val.frozen.bits.positioned = lshr i64 %intermediate.val.frozen.bits, %byteOff.numbits242 %intermediate.val.frozen.bits.positioned.extracted = trunc i64 %intermediate.val.frozen.bits.positioned to i8243 %1 = insertelement <1 x i8> poison, i8 %intermediate.val.frozen.bits.positioned.extracted, i64 0244 store <1 x i8> %1, ptr %dst, align 1245 ret void246}247 248define void @load_2byte_chunk_of_8byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {249; X64-NO-BMI2-LABEL: load_2byte_chunk_of_8byte_alloca_with_zero_upper_half:250; X64-NO-BMI2: # %bb.0:251; X64-NO-BMI2-NEXT: leal (,%rsi,8), %ecx252; X64-NO-BMI2-NEXT: movl (%rdi), %eax253; X64-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx254; X64-NO-BMI2-NEXT: shrq %cl, %rax255; X64-NO-BMI2-NEXT: movw %ax, (%rdx)256; X64-NO-BMI2-NEXT: retq257;258; X64-BMI2-LABEL: load_2byte_chunk_of_8byte_alloca_with_zero_upper_half:259; X64-BMI2: # %bb.0:260; X64-BMI2-NEXT: shll $3, %esi261; X64-BMI2-NEXT: movl (%rdi), %eax262; X64-BMI2-NEXT: shrxq %rsi, %rax, %rax263; X64-BMI2-NEXT: movw %ax, (%rdx)264; X64-BMI2-NEXT: retq265;266; X86-NO-BMI2-NO-SHLD-LABEL: load_2byte_chunk_of_8byte_alloca_with_zero_upper_half:267; X86-NO-BMI2-NO-SHLD: # %bb.0:268; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi269; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax270; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx271; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx272; X86-NO-BMI2-NO-SHLD-NEXT: movl (%edx), %edx273; X86-NO-BMI2-NO-SHLD-NEXT: shll $3, %ecx274; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %edx275; X86-NO-BMI2-NO-SHLD-NEXT: xorl %esi, %esi276; X86-NO-BMI2-NO-SHLD-NEXT: testb $32, %cl277; X86-NO-BMI2-NO-SHLD-NEXT: cmovel %edx, %esi278; X86-NO-BMI2-NO-SHLD-NEXT: movw %si, (%eax)279; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi280; X86-NO-BMI2-NO-SHLD-NEXT: retl281;282; X86-SHLD-LABEL: load_2byte_chunk_of_8byte_alloca_with_zero_upper_half:283; X86-SHLD: # %bb.0:284; X86-SHLD-NEXT: pushl %esi285; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax286; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx287; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx288; X86-SHLD-NEXT: movl (%edx), %edx289; X86-SHLD-NEXT: shll $3, %ecx290; X86-SHLD-NEXT: xorl %esi, %esi291; X86-SHLD-NEXT: shrdl %cl, %esi, %edx292; X86-SHLD-NEXT: testb $32, %cl293; X86-SHLD-NEXT: cmovnel %esi, %edx294; X86-SHLD-NEXT: movw %dx, (%eax)295; X86-SHLD-NEXT: popl %esi296; X86-SHLD-NEXT: retl297;298; X86-HAVE-BMI2-NO-SHLD-LABEL: load_2byte_chunk_of_8byte_alloca_with_zero_upper_half:299; X86-HAVE-BMI2-NO-SHLD: # %bb.0:300; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi301; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx302; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax303; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx304; X86-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %eax305; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %eax, (%edx), %edx306; X86-HAVE-BMI2-NO-SHLD-NEXT: xorl %esi, %esi307; X86-HAVE-BMI2-NO-SHLD-NEXT: testb $32, %al308; X86-HAVE-BMI2-NO-SHLD-NEXT: cmovel %edx, %esi309; X86-HAVE-BMI2-NO-SHLD-NEXT: movw %si, (%ecx)310; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi311; X86-HAVE-BMI2-NO-SHLD-NEXT: retl312 %init = load <4 x i8>, ptr %src, align 1313 %intermediate.sroa.0.0.vec.expand = shufflevector <4 x i8> %init, <4 x i8> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef>314 %intermediate.sroa.0.0.vecblend = shufflevector <8 x i8> %intermediate.sroa.0.0.vec.expand, <8 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0>, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15>315 %byteOff.numbits = shl nuw nsw i64 %byteOff, 3316 %intermediate.val.frozen = freeze <8 x i8> %intermediate.sroa.0.0.vecblend317 %intermediate.val.frozen.bits = bitcast <8 x i8> %intermediate.val.frozen to i64318 %intermediate.val.frozen.bits.positioned = lshr i64 %intermediate.val.frozen.bits, %byteOff.numbits319 %intermediate.val.frozen.bits.positioned.extracted = trunc i64 %intermediate.val.frozen.bits.positioned to i16320 store i16 %intermediate.val.frozen.bits.positioned.extracted, ptr %dst, align 2321 ret void322}323 324define void @load_4byte_chunk_of_8byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {325; X64-NO-BMI2-LABEL: load_4byte_chunk_of_8byte_alloca_with_zero_upper_half:326; X64-NO-BMI2: # %bb.0:327; X64-NO-BMI2-NEXT: leal (,%rsi,8), %ecx328; X64-NO-BMI2-NEXT: movl (%rdi), %eax329; X64-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx330; X64-NO-BMI2-NEXT: shrq %cl, %rax331; X64-NO-BMI2-NEXT: movl %eax, (%rdx)332; X64-NO-BMI2-NEXT: retq333;334; X64-BMI2-LABEL: load_4byte_chunk_of_8byte_alloca_with_zero_upper_half:335; X64-BMI2: # %bb.0:336; X64-BMI2-NEXT: shll $3, %esi337; X64-BMI2-NEXT: movl (%rdi), %eax338; X64-BMI2-NEXT: shrxq %rsi, %rax, %rax339; X64-BMI2-NEXT: movl %eax, (%rdx)340; X64-BMI2-NEXT: retq341;342; X86-NO-BMI2-NO-SHLD-LABEL: load_4byte_chunk_of_8byte_alloca_with_zero_upper_half:343; X86-NO-BMI2-NO-SHLD: # %bb.0:344; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi345; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax346; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx347; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx348; X86-NO-BMI2-NO-SHLD-NEXT: movl (%edx), %edx349; X86-NO-BMI2-NO-SHLD-NEXT: shll $3, %ecx350; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %edx351; X86-NO-BMI2-NO-SHLD-NEXT: xorl %esi, %esi352; X86-NO-BMI2-NO-SHLD-NEXT: testb $32, %cl353; X86-NO-BMI2-NO-SHLD-NEXT: cmovel %edx, %esi354; X86-NO-BMI2-NO-SHLD-NEXT: movl %esi, (%eax)355; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi356; X86-NO-BMI2-NO-SHLD-NEXT: retl357;358; X86-SHLD-LABEL: load_4byte_chunk_of_8byte_alloca_with_zero_upper_half:359; X86-SHLD: # %bb.0:360; X86-SHLD-NEXT: pushl %esi361; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax362; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx363; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx364; X86-SHLD-NEXT: movl (%edx), %edx365; X86-SHLD-NEXT: shll $3, %ecx366; X86-SHLD-NEXT: xorl %esi, %esi367; X86-SHLD-NEXT: shrdl %cl, %esi, %edx368; X86-SHLD-NEXT: testb $32, %cl369; X86-SHLD-NEXT: cmovnel %esi, %edx370; X86-SHLD-NEXT: movl %edx, (%eax)371; X86-SHLD-NEXT: popl %esi372; X86-SHLD-NEXT: retl373;374; X86-HAVE-BMI2-NO-SHLD-LABEL: load_4byte_chunk_of_8byte_alloca_with_zero_upper_half:375; X86-HAVE-BMI2-NO-SHLD: # %bb.0:376; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi377; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx378; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax379; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx380; X86-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %eax381; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %eax, (%edx), %edx382; X86-HAVE-BMI2-NO-SHLD-NEXT: xorl %esi, %esi383; X86-HAVE-BMI2-NO-SHLD-NEXT: testb $32, %al384; X86-HAVE-BMI2-NO-SHLD-NEXT: cmovel %edx, %esi385; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %esi, (%ecx)386; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi387; X86-HAVE-BMI2-NO-SHLD-NEXT: retl388 %init = load <4 x i8>, ptr %src, align 1389 %intermediate.sroa.0.0.vec.expand = shufflevector <4 x i8> %init, <4 x i8> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 undef, i32 undef, i32 undef, i32 undef>390 %intermediate.sroa.0.0.vecblend = shufflevector <8 x i8> %intermediate.sroa.0.0.vec.expand, <8 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0>, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 12, i32 13, i32 14, i32 15>391 %byteOff.numbits = shl nuw nsw i64 %byteOff, 3392 %intermediate.val.frozen = freeze <8 x i8> %intermediate.sroa.0.0.vecblend393 %intermediate.val.frozen.bits = bitcast <8 x i8> %intermediate.val.frozen to i64394 %intermediate.val.frozen.bits.positioned = lshr i64 %intermediate.val.frozen.bits, %byteOff.numbits395 %intermediate.val.frozen.bits.positioned.extracted = trunc i64 %intermediate.val.frozen.bits.positioned to i32396 store i32 %intermediate.val.frozen.bits.positioned.extracted, ptr %dst, align 4397 ret void398}399 400define void @load_1byte_chunk_of_16byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {401; X64-NO-BMI2-NO-SHLD-LABEL: load_1byte_chunk_of_16byte_alloca_with_zero_upper_half:402; X64-NO-BMI2-NO-SHLD: # %bb.0:403; X64-NO-BMI2-NO-SHLD-NEXT: movq %rsi, %rcx404; X64-NO-BMI2-NO-SHLD-NEXT: movq (%rdi), %rax405; X64-NO-BMI2-NO-SHLD-NEXT: shll $3, %ecx406; X64-NO-BMI2-NO-SHLD-NEXT: shrq %cl, %rax407; X64-NO-BMI2-NO-SHLD-NEXT: xorl %esi, %esi408; X64-NO-BMI2-NO-SHLD-NEXT: testb $64, %cl409; X64-NO-BMI2-NO-SHLD-NEXT: cmoveq %rax, %rsi410; X64-NO-BMI2-NO-SHLD-NEXT: movb %sil, (%rdx)411; X64-NO-BMI2-NO-SHLD-NEXT: retq412;413; X64-SHLD-LABEL: load_1byte_chunk_of_16byte_alloca_with_zero_upper_half:414; X64-SHLD: # %bb.0:415; X64-SHLD-NEXT: movq %rsi, %rcx416; X64-SHLD-NEXT: movq (%rdi), %rax417; X64-SHLD-NEXT: shll $3, %ecx418; X64-SHLD-NEXT: xorl %esi, %esi419; X64-SHLD-NEXT: shrdq %cl, %rsi, %rax420; X64-SHLD-NEXT: testb $64, %cl421; X64-SHLD-NEXT: cmovneq %rsi, %rax422; X64-SHLD-NEXT: movb %al, (%rdx)423; X64-SHLD-NEXT: retq424;425; X64-HAVE-BMI2-NO-SHLD-LABEL: load_1byte_chunk_of_16byte_alloca_with_zero_upper_half:426; X64-HAVE-BMI2-NO-SHLD: # %bb.0:427; X64-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %esi428; X64-HAVE-BMI2-NO-SHLD-NEXT: shrxq %rsi, (%rdi), %rax429; X64-HAVE-BMI2-NO-SHLD-NEXT: xorl %ecx, %ecx430; X64-HAVE-BMI2-NO-SHLD-NEXT: testb $64, %sil431; X64-HAVE-BMI2-NO-SHLD-NEXT: cmoveq %rax, %rcx432; X64-HAVE-BMI2-NO-SHLD-NEXT: movb %cl, (%rdx)433; X64-HAVE-BMI2-NO-SHLD-NEXT: retq434;435; X86-NO-BMI2-NO-SHLD-LABEL: load_1byte_chunk_of_16byte_alloca_with_zero_upper_half:436; X86-NO-BMI2-NO-SHLD: # %bb.0:437; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi438; X86-NO-BMI2-NO-SHLD-NEXT: subl $40, %esp439; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx440; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax441; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx442; X86-NO-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = mem[0],zero443; X86-NO-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero444; X86-NO-BMI2-NO-SHLD-NEXT: shll $3, %ecx445; X86-NO-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm1446; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)447; X86-NO-BMI2-NO-SHLD-NEXT: movdqa %xmm0, (%esp)448; X86-NO-BMI2-NO-SHLD-NEXT: movl %ecx, %edx449; X86-NO-BMI2-NO-SHLD-NEXT: shrb $3, %dl450; X86-NO-BMI2-NO-SHLD-NEXT: andb $12, %dl451; X86-NO-BMI2-NO-SHLD-NEXT: movzbl %dl, %edx452; X86-NO-BMI2-NO-SHLD-NEXT: movl (%esp,%edx), %esi453; X86-NO-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx), %edx454; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi455; X86-NO-BMI2-NO-SHLD-NEXT: notb %cl456; X86-NO-BMI2-NO-SHLD-NEXT: addl %edx, %edx457; X86-NO-BMI2-NO-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx458; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %edx459; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %edx460; X86-NO-BMI2-NO-SHLD-NEXT: movb %dl, (%eax)461; X86-NO-BMI2-NO-SHLD-NEXT: addl $40, %esp462; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi463; X86-NO-BMI2-NO-SHLD-NEXT: retl464;465; X86-SHLD-LABEL: load_1byte_chunk_of_16byte_alloca_with_zero_upper_half:466; X86-SHLD: # %bb.0:467; X86-SHLD-NEXT: pushl %ebx468; X86-SHLD-NEXT: subl $40, %esp469; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx470; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax471; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx472; X86-SHLD-NEXT: movq {{.*#+}} xmm0 = mem[0],zero473; X86-SHLD-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero474; X86-SHLD-NEXT: shll $3, %ecx475; X86-SHLD-NEXT: xorps %xmm1, %xmm1476; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)477; X86-SHLD-NEXT: movdqa %xmm0, (%esp)478; X86-SHLD-NEXT: movl %ecx, %edx479; X86-SHLD-NEXT: shrb $3, %dl480; X86-SHLD-NEXT: andb $12, %dl481; X86-SHLD-NEXT: movzbl %dl, %edx482; X86-SHLD-NEXT: movl (%esp,%edx), %ebx483; X86-SHLD-NEXT: movl 4(%esp,%edx), %edx484; X86-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx485; X86-SHLD-NEXT: shrdl %cl, %edx, %ebx486; X86-SHLD-NEXT: movb %bl, (%eax)487; X86-SHLD-NEXT: addl $40, %esp488; X86-SHLD-NEXT: popl %ebx489; X86-SHLD-NEXT: retl490;491; X86-HAVE-BMI2-NO-SHLD-LABEL: load_1byte_chunk_of_16byte_alloca_with_zero_upper_half:492; X86-HAVE-BMI2-NO-SHLD: # %bb.0:493; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi494; X86-HAVE-BMI2-NO-SHLD-NEXT: subl $40, %esp495; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx496; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax497; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx498; X86-HAVE-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = mem[0],zero499; X86-HAVE-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero500; X86-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %ecx501; X86-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm1502; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)503; X86-HAVE-BMI2-NO-SHLD-NEXT: movdqa %xmm0, (%esp)504; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, %edx505; X86-HAVE-BMI2-NO-SHLD-NEXT: shrb $3, %dl506; X86-HAVE-BMI2-NO-SHLD-NEXT: andb $12, %dl507; X86-HAVE-BMI2-NO-SHLD-NEXT: movzbl %dl, %edx508; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ecx, (%esp,%edx), %esi509; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %cl510; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx), %edx511; X86-HAVE-BMI2-NO-SHLD-NEXT: addl %edx, %edx512; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %edx, %ecx513; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %ecx514; X86-HAVE-BMI2-NO-SHLD-NEXT: movb %cl, (%eax)515; X86-HAVE-BMI2-NO-SHLD-NEXT: addl $40, %esp516; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi517; X86-HAVE-BMI2-NO-SHLD-NEXT: retl518 %init = load <8 x i8>, ptr %src, align 1519 %intermediate.sroa.0.0.vec.expand = shufflevector <8 x i8> %init, <8 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>520 %intermediate.sroa.0.0.vecblend = shufflevector <16 x i8> %intermediate.sroa.0.0.vec.expand, <16 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>521 %byteOff.numbits = shl nuw nsw i64 %byteOff, 3522 %intermediate.val.frozen = freeze <16 x i8> %intermediate.sroa.0.0.vecblend523 %intermediate.val.frozen.bits = bitcast <16 x i8> %intermediate.val.frozen to i128524 %byteOff.numbits.wide = zext i64 %byteOff.numbits to i128525 %intermediate.val.frozen.bits.positioned = lshr i128 %intermediate.val.frozen.bits, %byteOff.numbits.wide526 %intermediate.val.frozen.bits.positioned.extracted = trunc i128 %intermediate.val.frozen.bits.positioned to i8527 %1 = insertelement <1 x i8> poison, i8 %intermediate.val.frozen.bits.positioned.extracted, i64 0528 store <1 x i8> %1, ptr %dst, align 1529 ret void530}531 532define void @load_2byte_chunk_of_16byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {533; X64-NO-BMI2-NO-SHLD-LABEL: load_2byte_chunk_of_16byte_alloca_with_zero_upper_half:534; X64-NO-BMI2-NO-SHLD: # %bb.0:535; X64-NO-BMI2-NO-SHLD-NEXT: movq %rsi, %rcx536; X64-NO-BMI2-NO-SHLD-NEXT: movq (%rdi), %rax537; X64-NO-BMI2-NO-SHLD-NEXT: shll $3, %ecx538; X64-NO-BMI2-NO-SHLD-NEXT: shrq %cl, %rax539; X64-NO-BMI2-NO-SHLD-NEXT: xorl %esi, %esi540; X64-NO-BMI2-NO-SHLD-NEXT: testb $64, %cl541; X64-NO-BMI2-NO-SHLD-NEXT: cmoveq %rax, %rsi542; X64-NO-BMI2-NO-SHLD-NEXT: movw %si, (%rdx)543; X64-NO-BMI2-NO-SHLD-NEXT: retq544;545; X64-SHLD-LABEL: load_2byte_chunk_of_16byte_alloca_with_zero_upper_half:546; X64-SHLD: # %bb.0:547; X64-SHLD-NEXT: movq %rsi, %rcx548; X64-SHLD-NEXT: movq (%rdi), %rax549; X64-SHLD-NEXT: shll $3, %ecx550; X64-SHLD-NEXT: xorl %esi, %esi551; X64-SHLD-NEXT: shrdq %cl, %rsi, %rax552; X64-SHLD-NEXT: testb $64, %cl553; X64-SHLD-NEXT: cmovneq %rsi, %rax554; X64-SHLD-NEXT: movw %ax, (%rdx)555; X64-SHLD-NEXT: retq556;557; X64-HAVE-BMI2-NO-SHLD-LABEL: load_2byte_chunk_of_16byte_alloca_with_zero_upper_half:558; X64-HAVE-BMI2-NO-SHLD: # %bb.0:559; X64-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %esi560; X64-HAVE-BMI2-NO-SHLD-NEXT: shrxq %rsi, (%rdi), %rax561; X64-HAVE-BMI2-NO-SHLD-NEXT: xorl %ecx, %ecx562; X64-HAVE-BMI2-NO-SHLD-NEXT: testb $64, %sil563; X64-HAVE-BMI2-NO-SHLD-NEXT: cmoveq %rax, %rcx564; X64-HAVE-BMI2-NO-SHLD-NEXT: movw %cx, (%rdx)565; X64-HAVE-BMI2-NO-SHLD-NEXT: retq566;567; X86-NO-BMI2-NO-SHLD-LABEL: load_2byte_chunk_of_16byte_alloca_with_zero_upper_half:568; X86-NO-BMI2-NO-SHLD: # %bb.0:569; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi570; X86-NO-BMI2-NO-SHLD-NEXT: subl $40, %esp571; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx572; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax573; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx574; X86-NO-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = mem[0],zero575; X86-NO-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero576; X86-NO-BMI2-NO-SHLD-NEXT: shll $3, %ecx577; X86-NO-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm1578; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)579; X86-NO-BMI2-NO-SHLD-NEXT: movdqa %xmm0, (%esp)580; X86-NO-BMI2-NO-SHLD-NEXT: movl %ecx, %edx581; X86-NO-BMI2-NO-SHLD-NEXT: shrb $3, %dl582; X86-NO-BMI2-NO-SHLD-NEXT: andb $12, %dl583; X86-NO-BMI2-NO-SHLD-NEXT: movzbl %dl, %edx584; X86-NO-BMI2-NO-SHLD-NEXT: movl (%esp,%edx), %esi585; X86-NO-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx), %edx586; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi587; X86-NO-BMI2-NO-SHLD-NEXT: notb %cl588; X86-NO-BMI2-NO-SHLD-NEXT: addl %edx, %edx589; X86-NO-BMI2-NO-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx590; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %edx591; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %edx592; X86-NO-BMI2-NO-SHLD-NEXT: movw %dx, (%eax)593; X86-NO-BMI2-NO-SHLD-NEXT: addl $40, %esp594; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi595; X86-NO-BMI2-NO-SHLD-NEXT: retl596;597; X86-SHLD-LABEL: load_2byte_chunk_of_16byte_alloca_with_zero_upper_half:598; X86-SHLD: # %bb.0:599; X86-SHLD-NEXT: pushl %esi600; X86-SHLD-NEXT: subl $40, %esp601; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx602; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax603; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx604; X86-SHLD-NEXT: movq {{.*#+}} xmm0 = mem[0],zero605; X86-SHLD-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero606; X86-SHLD-NEXT: shll $3, %ecx607; X86-SHLD-NEXT: xorps %xmm1, %xmm1608; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)609; X86-SHLD-NEXT: movdqa %xmm0, (%esp)610; X86-SHLD-NEXT: movl %ecx, %edx611; X86-SHLD-NEXT: shrb $3, %dl612; X86-SHLD-NEXT: andb $12, %dl613; X86-SHLD-NEXT: movzbl %dl, %edx614; X86-SHLD-NEXT: movl (%esp,%edx), %esi615; X86-SHLD-NEXT: movl 4(%esp,%edx), %edx616; X86-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx617; X86-SHLD-NEXT: shrdl %cl, %edx, %esi618; X86-SHLD-NEXT: movw %si, (%eax)619; X86-SHLD-NEXT: addl $40, %esp620; X86-SHLD-NEXT: popl %esi621; X86-SHLD-NEXT: retl622;623; X86-HAVE-BMI2-NO-SHLD-LABEL: load_2byte_chunk_of_16byte_alloca_with_zero_upper_half:624; X86-HAVE-BMI2-NO-SHLD: # %bb.0:625; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi626; X86-HAVE-BMI2-NO-SHLD-NEXT: subl $40, %esp627; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx628; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax629; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx630; X86-HAVE-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = mem[0],zero631; X86-HAVE-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero632; X86-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %ecx633; X86-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm1634; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)635; X86-HAVE-BMI2-NO-SHLD-NEXT: movdqa %xmm0, (%esp)636; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, %edx637; X86-HAVE-BMI2-NO-SHLD-NEXT: shrb $3, %dl638; X86-HAVE-BMI2-NO-SHLD-NEXT: andb $12, %dl639; X86-HAVE-BMI2-NO-SHLD-NEXT: movzbl %dl, %edx640; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ecx, (%esp,%edx), %esi641; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %cl642; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx), %edx643; X86-HAVE-BMI2-NO-SHLD-NEXT: addl %edx, %edx644; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %edx, %ecx645; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %ecx646; X86-HAVE-BMI2-NO-SHLD-NEXT: movw %cx, (%eax)647; X86-HAVE-BMI2-NO-SHLD-NEXT: addl $40, %esp648; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi649; X86-HAVE-BMI2-NO-SHLD-NEXT: retl650 %init = load <8 x i8>, ptr %src, align 1651 %intermediate.sroa.0.0.vec.expand = shufflevector <8 x i8> %init, <8 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>652 %intermediate.sroa.0.0.vecblend = shufflevector <16 x i8> %intermediate.sroa.0.0.vec.expand, <16 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>653 %byteOff.numbits = shl nuw nsw i64 %byteOff, 3654 %intermediate.val.frozen = freeze <16 x i8> %intermediate.sroa.0.0.vecblend655 %intermediate.val.frozen.bits = bitcast <16 x i8> %intermediate.val.frozen to i128656 %byteOff.numbits.wide = zext i64 %byteOff.numbits to i128657 %intermediate.val.frozen.bits.positioned = lshr i128 %intermediate.val.frozen.bits, %byteOff.numbits.wide658 %intermediate.val.frozen.bits.positioned.extracted = trunc i128 %intermediate.val.frozen.bits.positioned to i16659 store i16 %intermediate.val.frozen.bits.positioned.extracted, ptr %dst, align 2660 ret void661}662 663define void @load_4byte_chunk_of_16byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {664; X64-NO-BMI2-NO-SHLD-LABEL: load_4byte_chunk_of_16byte_alloca_with_zero_upper_half:665; X64-NO-BMI2-NO-SHLD: # %bb.0:666; X64-NO-BMI2-NO-SHLD-NEXT: movq %rsi, %rcx667; X64-NO-BMI2-NO-SHLD-NEXT: movq (%rdi), %rax668; X64-NO-BMI2-NO-SHLD-NEXT: shll $3, %ecx669; X64-NO-BMI2-NO-SHLD-NEXT: shrq %cl, %rax670; X64-NO-BMI2-NO-SHLD-NEXT: xorl %esi, %esi671; X64-NO-BMI2-NO-SHLD-NEXT: testb $64, %cl672; X64-NO-BMI2-NO-SHLD-NEXT: cmoveq %rax, %rsi673; X64-NO-BMI2-NO-SHLD-NEXT: movl %esi, (%rdx)674; X64-NO-BMI2-NO-SHLD-NEXT: retq675;676; X64-SHLD-LABEL: load_4byte_chunk_of_16byte_alloca_with_zero_upper_half:677; X64-SHLD: # %bb.0:678; X64-SHLD-NEXT: movq %rsi, %rcx679; X64-SHLD-NEXT: movq (%rdi), %rax680; X64-SHLD-NEXT: shll $3, %ecx681; X64-SHLD-NEXT: xorl %esi, %esi682; X64-SHLD-NEXT: shrdq %cl, %rsi, %rax683; X64-SHLD-NEXT: testb $64, %cl684; X64-SHLD-NEXT: cmovneq %rsi, %rax685; X64-SHLD-NEXT: movl %eax, (%rdx)686; X64-SHLD-NEXT: retq687;688; X64-HAVE-BMI2-NO-SHLD-LABEL: load_4byte_chunk_of_16byte_alloca_with_zero_upper_half:689; X64-HAVE-BMI2-NO-SHLD: # %bb.0:690; X64-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %esi691; X64-HAVE-BMI2-NO-SHLD-NEXT: shrxq %rsi, (%rdi), %rax692; X64-HAVE-BMI2-NO-SHLD-NEXT: xorl %ecx, %ecx693; X64-HAVE-BMI2-NO-SHLD-NEXT: testb $64, %sil694; X64-HAVE-BMI2-NO-SHLD-NEXT: cmoveq %rax, %rcx695; X64-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, (%rdx)696; X64-HAVE-BMI2-NO-SHLD-NEXT: retq697;698; X86-NO-BMI2-NO-SHLD-LABEL: load_4byte_chunk_of_16byte_alloca_with_zero_upper_half:699; X86-NO-BMI2-NO-SHLD: # %bb.0:700; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi701; X86-NO-BMI2-NO-SHLD-NEXT: subl $40, %esp702; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx703; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax704; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx705; X86-NO-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = mem[0],zero706; X86-NO-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero707; X86-NO-BMI2-NO-SHLD-NEXT: shll $3, %ecx708; X86-NO-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm1709; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)710; X86-NO-BMI2-NO-SHLD-NEXT: movdqa %xmm0, (%esp)711; X86-NO-BMI2-NO-SHLD-NEXT: movl %ecx, %edx712; X86-NO-BMI2-NO-SHLD-NEXT: shrb $3, %dl713; X86-NO-BMI2-NO-SHLD-NEXT: andb $12, %dl714; X86-NO-BMI2-NO-SHLD-NEXT: movzbl %dl, %edx715; X86-NO-BMI2-NO-SHLD-NEXT: movl (%esp,%edx), %esi716; X86-NO-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx), %edx717; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi718; X86-NO-BMI2-NO-SHLD-NEXT: notb %cl719; X86-NO-BMI2-NO-SHLD-NEXT: addl %edx, %edx720; X86-NO-BMI2-NO-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx721; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %edx722; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %edx723; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, (%eax)724; X86-NO-BMI2-NO-SHLD-NEXT: addl $40, %esp725; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi726; X86-NO-BMI2-NO-SHLD-NEXT: retl727;728; X86-SHLD-LABEL: load_4byte_chunk_of_16byte_alloca_with_zero_upper_half:729; X86-SHLD: # %bb.0:730; X86-SHLD-NEXT: pushl %esi731; X86-SHLD-NEXT: subl $40, %esp732; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx733; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax734; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx735; X86-SHLD-NEXT: movq {{.*#+}} xmm0 = mem[0],zero736; X86-SHLD-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero737; X86-SHLD-NEXT: shll $3, %ecx738; X86-SHLD-NEXT: xorps %xmm1, %xmm1739; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)740; X86-SHLD-NEXT: movdqa %xmm0, (%esp)741; X86-SHLD-NEXT: movl %ecx, %edx742; X86-SHLD-NEXT: shrb $3, %dl743; X86-SHLD-NEXT: andb $12, %dl744; X86-SHLD-NEXT: movzbl %dl, %edx745; X86-SHLD-NEXT: movl (%esp,%edx), %esi746; X86-SHLD-NEXT: movl 4(%esp,%edx), %edx747; X86-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx748; X86-SHLD-NEXT: shrdl %cl, %edx, %esi749; X86-SHLD-NEXT: movl %esi, (%eax)750; X86-SHLD-NEXT: addl $40, %esp751; X86-SHLD-NEXT: popl %esi752; X86-SHLD-NEXT: retl753;754; X86-HAVE-BMI2-NO-SHLD-LABEL: load_4byte_chunk_of_16byte_alloca_with_zero_upper_half:755; X86-HAVE-BMI2-NO-SHLD: # %bb.0:756; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi757; X86-HAVE-BMI2-NO-SHLD-NEXT: subl $40, %esp758; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx759; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax760; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx761; X86-HAVE-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = mem[0],zero762; X86-HAVE-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero763; X86-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %ecx764; X86-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm1765; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)766; X86-HAVE-BMI2-NO-SHLD-NEXT: movdqa %xmm0, (%esp)767; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, %edx768; X86-HAVE-BMI2-NO-SHLD-NEXT: shrb $3, %dl769; X86-HAVE-BMI2-NO-SHLD-NEXT: andb $12, %dl770; X86-HAVE-BMI2-NO-SHLD-NEXT: movzbl %dl, %edx771; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ecx, (%esp,%edx), %esi772; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %cl773; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx), %edx774; X86-HAVE-BMI2-NO-SHLD-NEXT: addl %edx, %edx775; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %edx, %ecx776; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %ecx777; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, (%eax)778; X86-HAVE-BMI2-NO-SHLD-NEXT: addl $40, %esp779; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi780; X86-HAVE-BMI2-NO-SHLD-NEXT: retl781 %init = load <8 x i8>, ptr %src, align 1782 %intermediate.sroa.0.0.vec.expand = shufflevector <8 x i8> %init, <8 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>783 %intermediate.sroa.0.0.vecblend = shufflevector <16 x i8> %intermediate.sroa.0.0.vec.expand, <16 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>784 %byteOff.numbits = shl nuw nsw i64 %byteOff, 3785 %intermediate.val.frozen = freeze <16 x i8> %intermediate.sroa.0.0.vecblend786 %intermediate.val.frozen.bits = bitcast <16 x i8> %intermediate.val.frozen to i128787 %byteOff.numbits.wide = zext i64 %byteOff.numbits to i128788 %intermediate.val.frozen.bits.positioned = lshr i128 %intermediate.val.frozen.bits, %byteOff.numbits.wide789 %intermediate.val.frozen.bits.positioned.extracted = trunc i128 %intermediate.val.frozen.bits.positioned to i32790 store i32 %intermediate.val.frozen.bits.positioned.extracted, ptr %dst, align 4791 ret void792}793 794define void @load_8byte_chunk_of_16byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {795; X64-NO-BMI2-NO-SHLD-LABEL: load_8byte_chunk_of_16byte_alloca_with_zero_upper_half:796; X64-NO-BMI2-NO-SHLD: # %bb.0:797; X64-NO-BMI2-NO-SHLD-NEXT: movq %rsi, %rcx798; X64-NO-BMI2-NO-SHLD-NEXT: movq (%rdi), %rax799; X64-NO-BMI2-NO-SHLD-NEXT: shll $3, %ecx800; X64-NO-BMI2-NO-SHLD-NEXT: shrq %cl, %rax801; X64-NO-BMI2-NO-SHLD-NEXT: xorl %esi, %esi802; X64-NO-BMI2-NO-SHLD-NEXT: testb $64, %cl803; X64-NO-BMI2-NO-SHLD-NEXT: cmoveq %rax, %rsi804; X64-NO-BMI2-NO-SHLD-NEXT: movq %rsi, (%rdx)805; X64-NO-BMI2-NO-SHLD-NEXT: retq806;807; X64-SHLD-LABEL: load_8byte_chunk_of_16byte_alloca_with_zero_upper_half:808; X64-SHLD: # %bb.0:809; X64-SHLD-NEXT: movq %rsi, %rcx810; X64-SHLD-NEXT: movq (%rdi), %rax811; X64-SHLD-NEXT: shll $3, %ecx812; X64-SHLD-NEXT: xorl %esi, %esi813; X64-SHLD-NEXT: shrdq %cl, %rsi, %rax814; X64-SHLD-NEXT: testb $64, %cl815; X64-SHLD-NEXT: cmovneq %rsi, %rax816; X64-SHLD-NEXT: movq %rax, (%rdx)817; X64-SHLD-NEXT: retq818;819; X64-HAVE-BMI2-NO-SHLD-LABEL: load_8byte_chunk_of_16byte_alloca_with_zero_upper_half:820; X64-HAVE-BMI2-NO-SHLD: # %bb.0:821; X64-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %esi822; X64-HAVE-BMI2-NO-SHLD-NEXT: shrxq %rsi, (%rdi), %rax823; X64-HAVE-BMI2-NO-SHLD-NEXT: xorl %ecx, %ecx824; X64-HAVE-BMI2-NO-SHLD-NEXT: testb $64, %sil825; X64-HAVE-BMI2-NO-SHLD-NEXT: cmoveq %rax, %rcx826; X64-HAVE-BMI2-NO-SHLD-NEXT: movq %rcx, (%rdx)827; X64-HAVE-BMI2-NO-SHLD-NEXT: retq828;829; X86-NO-BMI2-NO-SHLD-LABEL: load_8byte_chunk_of_16byte_alloca_with_zero_upper_half:830; X86-NO-BMI2-NO-SHLD: # %bb.0:831; X86-NO-BMI2-NO-SHLD-NEXT: pushl %ebp832; X86-NO-BMI2-NO-SHLD-NEXT: pushl %ebx833; X86-NO-BMI2-NO-SHLD-NEXT: pushl %edi834; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi835; X86-NO-BMI2-NO-SHLD-NEXT: subl $44, %esp836; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax837; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx838; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx839; X86-NO-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = mem[0],zero840; X86-NO-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero841; X86-NO-BMI2-NO-SHLD-NEXT: shll $3, %eax842; X86-NO-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm1843; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)844; X86-NO-BMI2-NO-SHLD-NEXT: movdqa %xmm0, (%esp)845; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx846; X86-NO-BMI2-NO-SHLD-NEXT: shrb $3, %cl847; X86-NO-BMI2-NO-SHLD-NEXT: andb $12, %cl848; X86-NO-BMI2-NO-SHLD-NEXT: movzbl %cl, %ebx849; X86-NO-BMI2-NO-SHLD-NEXT: movl (%esp,%ebx), %ebp850; X86-NO-BMI2-NO-SHLD-NEXT: movl 4(%esp,%ebx), %esi851; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx852; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %ebp853; X86-NO-BMI2-NO-SHLD-NEXT: notb %cl854; X86-NO-BMI2-NO-SHLD-NEXT: leal (%esi,%esi), %edi855; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %edi856; X86-NO-BMI2-NO-SHLD-NEXT: orl %ebp, %edi857; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx858; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi859; X86-NO-BMI2-NO-SHLD-NEXT: andb $24, %al860; X86-NO-BMI2-NO-SHLD-NEXT: notb %al861; X86-NO-BMI2-NO-SHLD-NEXT: movl 8(%esp,%ebx), %ebx862; X86-NO-BMI2-NO-SHLD-NEXT: addl %ebx, %ebx863; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx864; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %ebx865; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %ebx866; X86-NO-BMI2-NO-SHLD-NEXT: movl %ebx, 4(%edx)867; X86-NO-BMI2-NO-SHLD-NEXT: movl %edi, (%edx)868; X86-NO-BMI2-NO-SHLD-NEXT: addl $44, %esp869; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi870; X86-NO-BMI2-NO-SHLD-NEXT: popl %edi871; X86-NO-BMI2-NO-SHLD-NEXT: popl %ebx872; X86-NO-BMI2-NO-SHLD-NEXT: popl %ebp873; X86-NO-BMI2-NO-SHLD-NEXT: retl874;875; X86-SHLD-LABEL: load_8byte_chunk_of_16byte_alloca_with_zero_upper_half:876; X86-SHLD: # %bb.0:877; X86-SHLD-NEXT: pushl %ebx878; X86-SHLD-NEXT: pushl %edi879; X86-SHLD-NEXT: pushl %esi880; X86-SHLD-NEXT: subl $32, %esp881; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx882; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax883; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx884; X86-SHLD-NEXT: movq {{.*#+}} xmm0 = mem[0],zero885; X86-SHLD-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero886; X86-SHLD-NEXT: shll $3, %ecx887; X86-SHLD-NEXT: xorps %xmm1, %xmm1888; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)889; X86-SHLD-NEXT: movdqa %xmm0, (%esp)890; X86-SHLD-NEXT: movl %ecx, %edx891; X86-SHLD-NEXT: shrb $3, %dl892; X86-SHLD-NEXT: andb $12, %dl893; X86-SHLD-NEXT: movzbl %dl, %edx894; X86-SHLD-NEXT: movl 8(%esp,%edx), %esi895; X86-SHLD-NEXT: movl (%esp,%edx), %edi896; X86-SHLD-NEXT: movl 4(%esp,%edx), %edx897; X86-SHLD-NEXT: movl %edx, %ebx898; X86-SHLD-NEXT: shrdl %cl, %esi, %ebx899; X86-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx900; X86-SHLD-NEXT: shrdl %cl, %edx, %edi901; X86-SHLD-NEXT: movl %ebx, 4(%eax)902; X86-SHLD-NEXT: movl %edi, (%eax)903; X86-SHLD-NEXT: addl $32, %esp904; X86-SHLD-NEXT: popl %esi905; X86-SHLD-NEXT: popl %edi906; X86-SHLD-NEXT: popl %ebx907; X86-SHLD-NEXT: retl908;909; X86-HAVE-BMI2-NO-SHLD-LABEL: load_8byte_chunk_of_16byte_alloca_with_zero_upper_half:910; X86-HAVE-BMI2-NO-SHLD: # %bb.0:911; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %ebp912; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %ebx913; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %edi914; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi915; X86-HAVE-BMI2-NO-SHLD-NEXT: subl $44, %esp916; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx917; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax918; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx919; X86-HAVE-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = mem[0],zero920; X86-HAVE-BMI2-NO-SHLD-NEXT: movq {{.*#+}} xmm0 = xmm0[0],zero921; X86-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %ecx922; X86-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm1923; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)924; X86-HAVE-BMI2-NO-SHLD-NEXT: movdqa %xmm0, (%esp)925; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, %edx926; X86-HAVE-BMI2-NO-SHLD-NEXT: shrb $3, %dl927; X86-HAVE-BMI2-NO-SHLD-NEXT: andb $12, %dl928; X86-HAVE-BMI2-NO-SHLD-NEXT: movzbl %dl, %edx929; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ecx, (%esp,%edx), %esi930; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, %ebx931; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %bl932; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx), %edi933; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 8(%esp,%edx), %ebp934; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%edi,%edi), %edx935; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ebx, %edx, %edx936; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %edx937; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ecx, %edi, %esi938; X86-HAVE-BMI2-NO-SHLD-NEXT: andb $24, %cl939; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %cl940; X86-HAVE-BMI2-NO-SHLD-NEXT: addl %ebp, %ebp941; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %ebp, %ecx942; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %ecx943; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, 4(%eax)944; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %edx, (%eax)945; X86-HAVE-BMI2-NO-SHLD-NEXT: addl $44, %esp946; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi947; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %edi948; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %ebx949; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %ebp950; X86-HAVE-BMI2-NO-SHLD-NEXT: retl951 %init = load <8 x i8>, ptr %src, align 1952 %intermediate.sroa.0.0.vec.expand = shufflevector <8 x i8> %init, <8 x i8> poison, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>953 %intermediate.sroa.0.0.vecblend = shufflevector <16 x i8> %intermediate.sroa.0.0.vec.expand, <16 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31>954 %byteOff.numbits = shl nuw nsw i64 %byteOff, 3955 %intermediate.val.frozen = freeze <16 x i8> %intermediate.sroa.0.0.vecblend956 %intermediate.val.frozen.bits = bitcast <16 x i8> %intermediate.val.frozen to i128957 %byteOff.numbits.wide = zext i64 %byteOff.numbits to i128958 %intermediate.val.frozen.bits.positioned = lshr i128 %intermediate.val.frozen.bits, %byteOff.numbits.wide959 %intermediate.val.frozen.bits.positioned.extracted = trunc i128 %intermediate.val.frozen.bits.positioned to i64960 store i64 %intermediate.val.frozen.bits.positioned.extracted, ptr %dst, align 8961 ret void962}963 964define void @load_1byte_chunk_of_32byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {965; X64-LABEL: load_1byte_chunk_of_32byte_alloca_with_zero_upper_half:966; X64: # %bb.0:967; X64-NEXT: movups (%rdi), %xmm0968; X64-NEXT: xorps %xmm1, %xmm1969; X64-NEXT: leal (,%rsi,8), %eax970; X64-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)971; X64-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)972; X64-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)973; X64-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)974; X64-NEXT: shrb $6, %al975; X64-NEXT: movzbl %al, %eax976; X64-NEXT: leaq -72(%rsp,%rax,8), %rax977; X64-NEXT: andl $7, %esi978; X64-NEXT: movzbl (%rsi,%rax), %eax979; X64-NEXT: movb %al, (%rdx)980; X64-NEXT: retq981;982; X86-NO-BMI2-NO-SHLD-LABEL: load_1byte_chunk_of_32byte_alloca_with_zero_upper_half:983; X86-NO-BMI2-NO-SHLD: # %bb.0:984; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi985; X86-NO-BMI2-NO-SHLD-NEXT: subl $72, %esp986; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx987; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax988; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx989; X86-NO-BMI2-NO-SHLD-NEXT: movups (%edx), %xmm0990; X86-NO-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm1991; X86-NO-BMI2-NO-SHLD-NEXT: shll $3, %ecx992; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)993; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)994; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)995; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)996; X86-NO-BMI2-NO-SHLD-NEXT: movl %ecx, %edx997; X86-NO-BMI2-NO-SHLD-NEXT: shrb $5, %dl998; X86-NO-BMI2-NO-SHLD-NEXT: movzbl %dl, %edx999; X86-NO-BMI2-NO-SHLD-NEXT: movl (%esp,%edx,4), %esi1000; X86-NO-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx,4), %edx1001; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi1002; X86-NO-BMI2-NO-SHLD-NEXT: notb %cl1003; X86-NO-BMI2-NO-SHLD-NEXT: addl %edx, %edx1004; X86-NO-BMI2-NO-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx1005; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %edx1006; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %edx1007; X86-NO-BMI2-NO-SHLD-NEXT: movb %dl, (%eax)1008; X86-NO-BMI2-NO-SHLD-NEXT: addl $72, %esp1009; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi1010; X86-NO-BMI2-NO-SHLD-NEXT: retl1011;1012; X86-SHLD-LABEL: load_1byte_chunk_of_32byte_alloca_with_zero_upper_half:1013; X86-SHLD: # %bb.0:1014; X86-SHLD-NEXT: pushl %ebx1015; X86-SHLD-NEXT: subl $72, %esp1016; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1017; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1018; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx1019; X86-SHLD-NEXT: movups (%edx), %xmm01020; X86-SHLD-NEXT: xorps %xmm1, %xmm11021; X86-SHLD-NEXT: shll $3, %ecx1022; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1023; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1024; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1025; X86-SHLD-NEXT: movaps %xmm0, (%esp)1026; X86-SHLD-NEXT: movl %ecx, %edx1027; X86-SHLD-NEXT: shrb $5, %dl1028; X86-SHLD-NEXT: movzbl %dl, %edx1029; X86-SHLD-NEXT: movl (%esp,%edx,4), %ebx1030; X86-SHLD-NEXT: movl 4(%esp,%edx,4), %edx1031; X86-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx1032; X86-SHLD-NEXT: shrdl %cl, %edx, %ebx1033; X86-SHLD-NEXT: movb %bl, (%eax)1034; X86-SHLD-NEXT: addl $72, %esp1035; X86-SHLD-NEXT: popl %ebx1036; X86-SHLD-NEXT: retl1037;1038; X86-HAVE-BMI2-NO-SHLD-LABEL: load_1byte_chunk_of_32byte_alloca_with_zero_upper_half:1039; X86-HAVE-BMI2-NO-SHLD: # %bb.0:1040; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi1041; X86-HAVE-BMI2-NO-SHLD-NEXT: subl $72, %esp1042; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1043; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1044; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx1045; X86-HAVE-BMI2-NO-SHLD-NEXT: movups (%edx), %xmm01046; X86-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm11047; X86-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %ecx1048; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1049; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1050; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1051; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)1052; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, %edx1053; X86-HAVE-BMI2-NO-SHLD-NEXT: shrb $5, %dl1054; X86-HAVE-BMI2-NO-SHLD-NEXT: movzbl %dl, %edx1055; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ecx, (%esp,%edx,4), %esi1056; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %cl1057; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx,4), %edx1058; X86-HAVE-BMI2-NO-SHLD-NEXT: addl %edx, %edx1059; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %edx, %ecx1060; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %ecx1061; X86-HAVE-BMI2-NO-SHLD-NEXT: movb %cl, (%eax)1062; X86-HAVE-BMI2-NO-SHLD-NEXT: addl $72, %esp1063; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi1064; X86-HAVE-BMI2-NO-SHLD-NEXT: retl1065 %init = load <16 x i8>, ptr %src, align 11066 %intermediate.sroa.0.0.vec.expand = shufflevector <16 x i8> %init, <16 x i8> poison, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>1067 %intermediate.sroa.0.0.vecblend = shufflevector <32 x i8> %intermediate.sroa.0.0.vec.expand, <32 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58, i32 59, i32 60, i32 61, i32 62, i32 63>1068 %byteOff.numbits = shl nuw nsw i64 %byteOff, 31069 %intermediate.val.frozen = freeze <32 x i8> %intermediate.sroa.0.0.vecblend1070 %intermediate.val.frozen.bits = bitcast <32 x i8> %intermediate.val.frozen to i2561071 %byteOff.numbits.wide = zext i64 %byteOff.numbits to i2561072 %intermediate.val.frozen.bits.positioned = lshr i256 %intermediate.val.frozen.bits, %byteOff.numbits.wide1073 %intermediate.val.frozen.bits.positioned.extracted = trunc i256 %intermediate.val.frozen.bits.positioned to i81074 %1 = insertelement <1 x i8> poison, i8 %intermediate.val.frozen.bits.positioned.extracted, i64 01075 store <1 x i8> %1, ptr %dst, align 11076 ret void1077}1078 1079define void @load_2byte_chunk_of_32byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {1080; X64-NO-BMI2-LABEL: load_2byte_chunk_of_32byte_alloca_with_zero_upper_half:1081; X64-NO-BMI2: # %bb.0:1082; X64-NO-BMI2-NEXT: movups (%rdi), %xmm01083; X64-NO-BMI2-NEXT: xorps %xmm1, %xmm11084; X64-NO-BMI2-NEXT: leal (,%rsi,8), %ecx1085; X64-NO-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1086; X64-NO-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1087; X64-NO-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1088; X64-NO-BMI2-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)1089; X64-NO-BMI2-NEXT: movl %ecx, %eax1090; X64-NO-BMI2-NEXT: shrb $6, %al1091; X64-NO-BMI2-NEXT: movzbl %al, %eax1092; X64-NO-BMI2-NEXT: movq -72(%rsp,%rax,8), %rsi1093; X64-NO-BMI2-NEXT: shrq %cl, %rsi1094; X64-NO-BMI2-NEXT: movl -64(%rsp,%rax,8), %eax1095; X64-NO-BMI2-NEXT: addl %eax, %eax1096; X64-NO-BMI2-NEXT: andb $56, %cl1097; X64-NO-BMI2-NEXT: notb %cl1098; X64-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx1099; X64-NO-BMI2-NEXT: shlq %cl, %rax1100; X64-NO-BMI2-NEXT: orl %esi, %eax1101; X64-NO-BMI2-NEXT: movw %ax, (%rdx)1102; X64-NO-BMI2-NEXT: retq1103;1104; X64-BMI2-LABEL: load_2byte_chunk_of_32byte_alloca_with_zero_upper_half:1105; X64-BMI2: # %bb.0:1106; X64-BMI2-NEXT: movups (%rdi), %xmm01107; X64-BMI2-NEXT: xorps %xmm1, %xmm11108; X64-BMI2-NEXT: shll $3, %esi1109; X64-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1110; X64-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1111; X64-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1112; X64-BMI2-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)1113; X64-BMI2-NEXT: movl %esi, %eax1114; X64-BMI2-NEXT: shrb $6, %al1115; X64-BMI2-NEXT: movzbl %al, %eax1116; X64-BMI2-NEXT: shrxq %rsi, -72(%rsp,%rax,8), %rcx1117; X64-BMI2-NEXT: # kill: def $sil killed $sil killed $rsi def $rsi1118; X64-BMI2-NEXT: andb $56, %sil1119; X64-BMI2-NEXT: notb %sil1120; X64-BMI2-NEXT: movl -64(%rsp,%rax,8), %eax1121; X64-BMI2-NEXT: addl %eax, %eax1122; X64-BMI2-NEXT: shlxq %rsi, %rax, %rax1123; X64-BMI2-NEXT: orl %eax, %ecx1124; X64-BMI2-NEXT: movw %cx, (%rdx)1125; X64-BMI2-NEXT: retq1126;1127; X86-NO-BMI2-NO-SHLD-LABEL: load_2byte_chunk_of_32byte_alloca_with_zero_upper_half:1128; X86-NO-BMI2-NO-SHLD: # %bb.0:1129; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi1130; X86-NO-BMI2-NO-SHLD-NEXT: subl $72, %esp1131; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1132; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1133; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx1134; X86-NO-BMI2-NO-SHLD-NEXT: movups (%edx), %xmm01135; X86-NO-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm11136; X86-NO-BMI2-NO-SHLD-NEXT: shll $3, %ecx1137; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1138; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1139; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1140; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)1141; X86-NO-BMI2-NO-SHLD-NEXT: movl %ecx, %edx1142; X86-NO-BMI2-NO-SHLD-NEXT: shrb $5, %dl1143; X86-NO-BMI2-NO-SHLD-NEXT: movzbl %dl, %edx1144; X86-NO-BMI2-NO-SHLD-NEXT: movl (%esp,%edx,4), %esi1145; X86-NO-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx,4), %edx1146; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi1147; X86-NO-BMI2-NO-SHLD-NEXT: notb %cl1148; X86-NO-BMI2-NO-SHLD-NEXT: addl %edx, %edx1149; X86-NO-BMI2-NO-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx1150; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %edx1151; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %edx1152; X86-NO-BMI2-NO-SHLD-NEXT: movw %dx, (%eax)1153; X86-NO-BMI2-NO-SHLD-NEXT: addl $72, %esp1154; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi1155; X86-NO-BMI2-NO-SHLD-NEXT: retl1156;1157; X86-SHLD-LABEL: load_2byte_chunk_of_32byte_alloca_with_zero_upper_half:1158; X86-SHLD: # %bb.0:1159; X86-SHLD-NEXT: pushl %esi1160; X86-SHLD-NEXT: subl $72, %esp1161; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1162; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1163; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx1164; X86-SHLD-NEXT: movups (%edx), %xmm01165; X86-SHLD-NEXT: xorps %xmm1, %xmm11166; X86-SHLD-NEXT: shll $3, %ecx1167; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1168; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1169; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1170; X86-SHLD-NEXT: movaps %xmm0, (%esp)1171; X86-SHLD-NEXT: movl %ecx, %edx1172; X86-SHLD-NEXT: shrb $5, %dl1173; X86-SHLD-NEXT: movzbl %dl, %edx1174; X86-SHLD-NEXT: movl (%esp,%edx,4), %esi1175; X86-SHLD-NEXT: movl 4(%esp,%edx,4), %edx1176; X86-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx1177; X86-SHLD-NEXT: shrdl %cl, %edx, %esi1178; X86-SHLD-NEXT: movw %si, (%eax)1179; X86-SHLD-NEXT: addl $72, %esp1180; X86-SHLD-NEXT: popl %esi1181; X86-SHLD-NEXT: retl1182;1183; X86-HAVE-BMI2-NO-SHLD-LABEL: load_2byte_chunk_of_32byte_alloca_with_zero_upper_half:1184; X86-HAVE-BMI2-NO-SHLD: # %bb.0:1185; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi1186; X86-HAVE-BMI2-NO-SHLD-NEXT: subl $72, %esp1187; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1188; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1189; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx1190; X86-HAVE-BMI2-NO-SHLD-NEXT: movups (%edx), %xmm01191; X86-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm11192; X86-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %ecx1193; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1194; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1195; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1196; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)1197; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, %edx1198; X86-HAVE-BMI2-NO-SHLD-NEXT: shrb $5, %dl1199; X86-HAVE-BMI2-NO-SHLD-NEXT: movzbl %dl, %edx1200; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ecx, (%esp,%edx,4), %esi1201; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %cl1202; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx,4), %edx1203; X86-HAVE-BMI2-NO-SHLD-NEXT: addl %edx, %edx1204; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %edx, %ecx1205; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %ecx1206; X86-HAVE-BMI2-NO-SHLD-NEXT: movw %cx, (%eax)1207; X86-HAVE-BMI2-NO-SHLD-NEXT: addl $72, %esp1208; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi1209; X86-HAVE-BMI2-NO-SHLD-NEXT: retl1210 %init = load <16 x i8>, ptr %src, align 11211 %intermediate.sroa.0.0.vec.expand = shufflevector <16 x i8> %init, <16 x i8> poison, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>1212 %intermediate.sroa.0.0.vecblend = shufflevector <32 x i8> %intermediate.sroa.0.0.vec.expand, <32 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58, i32 59, i32 60, i32 61, i32 62, i32 63>1213 %byteOff.numbits = shl nuw nsw i64 %byteOff, 31214 %intermediate.val.frozen = freeze <32 x i8> %intermediate.sroa.0.0.vecblend1215 %intermediate.val.frozen.bits = bitcast <32 x i8> %intermediate.val.frozen to i2561216 %byteOff.numbits.wide = zext i64 %byteOff.numbits to i2561217 %intermediate.val.frozen.bits.positioned = lshr i256 %intermediate.val.frozen.bits, %byteOff.numbits.wide1218 %intermediate.val.frozen.bits.positioned.extracted = trunc i256 %intermediate.val.frozen.bits.positioned to i161219 store i16 %intermediate.val.frozen.bits.positioned.extracted, ptr %dst, align 21220 ret void1221}1222 1223define void @load_4byte_chunk_of_32byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {1224; X64-NO-BMI2-LABEL: load_4byte_chunk_of_32byte_alloca_with_zero_upper_half:1225; X64-NO-BMI2: # %bb.0:1226; X64-NO-BMI2-NEXT: movups (%rdi), %xmm01227; X64-NO-BMI2-NEXT: xorps %xmm1, %xmm11228; X64-NO-BMI2-NEXT: leal (,%rsi,8), %ecx1229; X64-NO-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1230; X64-NO-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1231; X64-NO-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1232; X64-NO-BMI2-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)1233; X64-NO-BMI2-NEXT: movl %ecx, %eax1234; X64-NO-BMI2-NEXT: shrb $6, %al1235; X64-NO-BMI2-NEXT: movzbl %al, %eax1236; X64-NO-BMI2-NEXT: movq -72(%rsp,%rax,8), %rsi1237; X64-NO-BMI2-NEXT: shrq %cl, %rsi1238; X64-NO-BMI2-NEXT: movl -64(%rsp,%rax,8), %eax1239; X64-NO-BMI2-NEXT: addl %eax, %eax1240; X64-NO-BMI2-NEXT: andb $56, %cl1241; X64-NO-BMI2-NEXT: notb %cl1242; X64-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx1243; X64-NO-BMI2-NEXT: shlq %cl, %rax1244; X64-NO-BMI2-NEXT: orl %esi, %eax1245; X64-NO-BMI2-NEXT: movl %eax, (%rdx)1246; X64-NO-BMI2-NEXT: retq1247;1248; X64-BMI2-LABEL: load_4byte_chunk_of_32byte_alloca_with_zero_upper_half:1249; X64-BMI2: # %bb.0:1250; X64-BMI2-NEXT: movups (%rdi), %xmm01251; X64-BMI2-NEXT: xorps %xmm1, %xmm11252; X64-BMI2-NEXT: shll $3, %esi1253; X64-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1254; X64-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1255; X64-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1256; X64-BMI2-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)1257; X64-BMI2-NEXT: movl %esi, %eax1258; X64-BMI2-NEXT: shrb $6, %al1259; X64-BMI2-NEXT: movzbl %al, %eax1260; X64-BMI2-NEXT: shrxq %rsi, -72(%rsp,%rax,8), %rcx1261; X64-BMI2-NEXT: # kill: def $sil killed $sil killed $rsi def $rsi1262; X64-BMI2-NEXT: andb $56, %sil1263; X64-BMI2-NEXT: notb %sil1264; X64-BMI2-NEXT: movl -64(%rsp,%rax,8), %eax1265; X64-BMI2-NEXT: addl %eax, %eax1266; X64-BMI2-NEXT: shlxq %rsi, %rax, %rax1267; X64-BMI2-NEXT: orl %eax, %ecx1268; X64-BMI2-NEXT: movl %ecx, (%rdx)1269; X64-BMI2-NEXT: retq1270;1271; X86-NO-BMI2-NO-SHLD-LABEL: load_4byte_chunk_of_32byte_alloca_with_zero_upper_half:1272; X86-NO-BMI2-NO-SHLD: # %bb.0:1273; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi1274; X86-NO-BMI2-NO-SHLD-NEXT: subl $72, %esp1275; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1276; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1277; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx1278; X86-NO-BMI2-NO-SHLD-NEXT: movups (%edx), %xmm01279; X86-NO-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm11280; X86-NO-BMI2-NO-SHLD-NEXT: shll $3, %ecx1281; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1282; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1283; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1284; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)1285; X86-NO-BMI2-NO-SHLD-NEXT: movl %ecx, %edx1286; X86-NO-BMI2-NO-SHLD-NEXT: shrb $5, %dl1287; X86-NO-BMI2-NO-SHLD-NEXT: movzbl %dl, %edx1288; X86-NO-BMI2-NO-SHLD-NEXT: movl (%esp,%edx,4), %esi1289; X86-NO-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx,4), %edx1290; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi1291; X86-NO-BMI2-NO-SHLD-NEXT: notb %cl1292; X86-NO-BMI2-NO-SHLD-NEXT: addl %edx, %edx1293; X86-NO-BMI2-NO-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx1294; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %edx1295; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %edx1296; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, (%eax)1297; X86-NO-BMI2-NO-SHLD-NEXT: addl $72, %esp1298; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi1299; X86-NO-BMI2-NO-SHLD-NEXT: retl1300;1301; X86-SHLD-LABEL: load_4byte_chunk_of_32byte_alloca_with_zero_upper_half:1302; X86-SHLD: # %bb.0:1303; X86-SHLD-NEXT: pushl %esi1304; X86-SHLD-NEXT: subl $72, %esp1305; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1306; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1307; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx1308; X86-SHLD-NEXT: movups (%edx), %xmm01309; X86-SHLD-NEXT: xorps %xmm1, %xmm11310; X86-SHLD-NEXT: shll $3, %ecx1311; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1312; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1313; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1314; X86-SHLD-NEXT: movaps %xmm0, (%esp)1315; X86-SHLD-NEXT: movl %ecx, %edx1316; X86-SHLD-NEXT: shrb $5, %dl1317; X86-SHLD-NEXT: movzbl %dl, %edx1318; X86-SHLD-NEXT: movl (%esp,%edx,4), %esi1319; X86-SHLD-NEXT: movl 4(%esp,%edx,4), %edx1320; X86-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx1321; X86-SHLD-NEXT: shrdl %cl, %edx, %esi1322; X86-SHLD-NEXT: movl %esi, (%eax)1323; X86-SHLD-NEXT: addl $72, %esp1324; X86-SHLD-NEXT: popl %esi1325; X86-SHLD-NEXT: retl1326;1327; X86-HAVE-BMI2-NO-SHLD-LABEL: load_4byte_chunk_of_32byte_alloca_with_zero_upper_half:1328; X86-HAVE-BMI2-NO-SHLD: # %bb.0:1329; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi1330; X86-HAVE-BMI2-NO-SHLD-NEXT: subl $72, %esp1331; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1332; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1333; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx1334; X86-HAVE-BMI2-NO-SHLD-NEXT: movups (%edx), %xmm01335; X86-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm11336; X86-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %ecx1337; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1338; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1339; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1340; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)1341; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, %edx1342; X86-HAVE-BMI2-NO-SHLD-NEXT: shrb $5, %dl1343; X86-HAVE-BMI2-NO-SHLD-NEXT: movzbl %dl, %edx1344; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ecx, (%esp,%edx,4), %esi1345; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %cl1346; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx,4), %edx1347; X86-HAVE-BMI2-NO-SHLD-NEXT: addl %edx, %edx1348; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %edx, %ecx1349; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %ecx1350; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, (%eax)1351; X86-HAVE-BMI2-NO-SHLD-NEXT: addl $72, %esp1352; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi1353; X86-HAVE-BMI2-NO-SHLD-NEXT: retl1354 %init = load <16 x i8>, ptr %src, align 11355 %intermediate.sroa.0.0.vec.expand = shufflevector <16 x i8> %init, <16 x i8> poison, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>1356 %intermediate.sroa.0.0.vecblend = shufflevector <32 x i8> %intermediate.sroa.0.0.vec.expand, <32 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58, i32 59, i32 60, i32 61, i32 62, i32 63>1357 %byteOff.numbits = shl nuw nsw i64 %byteOff, 31358 %intermediate.val.frozen = freeze <32 x i8> %intermediate.sroa.0.0.vecblend1359 %intermediate.val.frozen.bits = bitcast <32 x i8> %intermediate.val.frozen to i2561360 %byteOff.numbits.wide = zext i64 %byteOff.numbits to i2561361 %intermediate.val.frozen.bits.positioned = lshr i256 %intermediate.val.frozen.bits, %byteOff.numbits.wide1362 %intermediate.val.frozen.bits.positioned.extracted = trunc i256 %intermediate.val.frozen.bits.positioned to i321363 store i32 %intermediate.val.frozen.bits.positioned.extracted, ptr %dst, align 41364 ret void1365}1366 1367define void @load_8byte_chunk_of_32byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {1368; X64-NO-BMI2-NO-SHLD-LABEL: load_8byte_chunk_of_32byte_alloca_with_zero_upper_half:1369; X64-NO-BMI2-NO-SHLD: # %bb.0:1370; X64-NO-BMI2-NO-SHLD-NEXT: movups (%rdi), %xmm01371; X64-NO-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm11372; X64-NO-BMI2-NO-SHLD-NEXT: leal (,%rsi,8), %ecx1373; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1374; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1375; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1376; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)1377; X64-NO-BMI2-NO-SHLD-NEXT: movl %ecx, %eax1378; X64-NO-BMI2-NO-SHLD-NEXT: shrb $6, %al1379; X64-NO-BMI2-NO-SHLD-NEXT: movzbl %al, %eax1380; X64-NO-BMI2-NO-SHLD-NEXT: movq -72(%rsp,%rax,8), %rsi1381; X64-NO-BMI2-NO-SHLD-NEXT: movq -64(%rsp,%rax,8), %rax1382; X64-NO-BMI2-NO-SHLD-NEXT: shrq %cl, %rsi1383; X64-NO-BMI2-NO-SHLD-NEXT: notb %cl1384; X64-NO-BMI2-NO-SHLD-NEXT: addq %rax, %rax1385; X64-NO-BMI2-NO-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx1386; X64-NO-BMI2-NO-SHLD-NEXT: shlq %cl, %rax1387; X64-NO-BMI2-NO-SHLD-NEXT: orq %rsi, %rax1388; X64-NO-BMI2-NO-SHLD-NEXT: movq %rax, (%rdx)1389; X64-NO-BMI2-NO-SHLD-NEXT: retq1390;1391; X64-SHLD-LABEL: load_8byte_chunk_of_32byte_alloca_with_zero_upper_half:1392; X64-SHLD: # %bb.0:1393; X64-SHLD-NEXT: movups (%rdi), %xmm01394; X64-SHLD-NEXT: xorps %xmm1, %xmm11395; X64-SHLD-NEXT: leal (,%rsi,8), %ecx1396; X64-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1397; X64-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1398; X64-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1399; X64-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)1400; X64-SHLD-NEXT: movl %ecx, %eax1401; X64-SHLD-NEXT: shrb $6, %al1402; X64-SHLD-NEXT: movzbl %al, %eax1403; X64-SHLD-NEXT: movq -72(%rsp,%rax,8), %rsi1404; X64-SHLD-NEXT: movq -64(%rsp,%rax,8), %rax1405; X64-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx1406; X64-SHLD-NEXT: shrdq %cl, %rax, %rsi1407; X64-SHLD-NEXT: movq %rsi, (%rdx)1408; X64-SHLD-NEXT: retq1409;1410; X64-HAVE-BMI2-NO-SHLD-LABEL: load_8byte_chunk_of_32byte_alloca_with_zero_upper_half:1411; X64-HAVE-BMI2-NO-SHLD: # %bb.0:1412; X64-HAVE-BMI2-NO-SHLD-NEXT: movups (%rdi), %xmm01413; X64-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm11414; X64-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %esi1415; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1416; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1417; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1418; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)1419; X64-HAVE-BMI2-NO-SHLD-NEXT: movl %esi, %eax1420; X64-HAVE-BMI2-NO-SHLD-NEXT: shrb $6, %al1421; X64-HAVE-BMI2-NO-SHLD-NEXT: movzbl %al, %eax1422; X64-HAVE-BMI2-NO-SHLD-NEXT: shrxq %rsi, -72(%rsp,%rax,8), %rcx1423; X64-HAVE-BMI2-NO-SHLD-NEXT: notb %sil1424; X64-HAVE-BMI2-NO-SHLD-NEXT: movq -64(%rsp,%rax,8), %rax1425; X64-HAVE-BMI2-NO-SHLD-NEXT: addq %rax, %rax1426; X64-HAVE-BMI2-NO-SHLD-NEXT: shlxq %rsi, %rax, %rax1427; X64-HAVE-BMI2-NO-SHLD-NEXT: orq %rcx, %rax1428; X64-HAVE-BMI2-NO-SHLD-NEXT: movq %rax, (%rdx)1429; X64-HAVE-BMI2-NO-SHLD-NEXT: retq1430;1431; X86-NO-BMI2-NO-SHLD-LABEL: load_8byte_chunk_of_32byte_alloca_with_zero_upper_half:1432; X86-NO-BMI2-NO-SHLD: # %bb.0:1433; X86-NO-BMI2-NO-SHLD-NEXT: pushl %ebp1434; X86-NO-BMI2-NO-SHLD-NEXT: pushl %ebx1435; X86-NO-BMI2-NO-SHLD-NEXT: pushl %edi1436; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi1437; X86-NO-BMI2-NO-SHLD-NEXT: subl $76, %esp1438; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1439; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx1440; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1441; X86-NO-BMI2-NO-SHLD-NEXT: movups (%ecx), %xmm01442; X86-NO-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm11443; X86-NO-BMI2-NO-SHLD-NEXT: shll $3, %eax1444; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1445; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1446; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1447; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)1448; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx1449; X86-NO-BMI2-NO-SHLD-NEXT: shrb $5, %cl1450; X86-NO-BMI2-NO-SHLD-NEXT: movzbl %cl, %ebx1451; X86-NO-BMI2-NO-SHLD-NEXT: movl (%esp,%ebx,4), %ebp1452; X86-NO-BMI2-NO-SHLD-NEXT: movl 4(%esp,%ebx,4), %esi1453; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx1454; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %ebp1455; X86-NO-BMI2-NO-SHLD-NEXT: notb %cl1456; X86-NO-BMI2-NO-SHLD-NEXT: leal (%esi,%esi), %edi1457; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %edi1458; X86-NO-BMI2-NO-SHLD-NEXT: orl %ebp, %edi1459; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx1460; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi1461; X86-NO-BMI2-NO-SHLD-NEXT: andb $24, %al1462; X86-NO-BMI2-NO-SHLD-NEXT: notb %al1463; X86-NO-BMI2-NO-SHLD-NEXT: movl 8(%esp,%ebx,4), %ebx1464; X86-NO-BMI2-NO-SHLD-NEXT: addl %ebx, %ebx1465; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx1466; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %ebx1467; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %ebx1468; X86-NO-BMI2-NO-SHLD-NEXT: movl %ebx, 4(%edx)1469; X86-NO-BMI2-NO-SHLD-NEXT: movl %edi, (%edx)1470; X86-NO-BMI2-NO-SHLD-NEXT: addl $76, %esp1471; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi1472; X86-NO-BMI2-NO-SHLD-NEXT: popl %edi1473; X86-NO-BMI2-NO-SHLD-NEXT: popl %ebx1474; X86-NO-BMI2-NO-SHLD-NEXT: popl %ebp1475; X86-NO-BMI2-NO-SHLD-NEXT: retl1476;1477; X86-SHLD-LABEL: load_8byte_chunk_of_32byte_alloca_with_zero_upper_half:1478; X86-SHLD: # %bb.0:1479; X86-SHLD-NEXT: pushl %ebx1480; X86-SHLD-NEXT: pushl %edi1481; X86-SHLD-NEXT: pushl %esi1482; X86-SHLD-NEXT: subl $64, %esp1483; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1484; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1485; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx1486; X86-SHLD-NEXT: movups (%edx), %xmm01487; X86-SHLD-NEXT: xorps %xmm1, %xmm11488; X86-SHLD-NEXT: shll $3, %ecx1489; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1490; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1491; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1492; X86-SHLD-NEXT: movaps %xmm0, (%esp)1493; X86-SHLD-NEXT: movl %ecx, %edx1494; X86-SHLD-NEXT: shrb $5, %dl1495; X86-SHLD-NEXT: movzbl %dl, %edx1496; X86-SHLD-NEXT: movl 8(%esp,%edx,4), %esi1497; X86-SHLD-NEXT: movl (%esp,%edx,4), %edi1498; X86-SHLD-NEXT: movl 4(%esp,%edx,4), %edx1499; X86-SHLD-NEXT: movl %edx, %ebx1500; X86-SHLD-NEXT: shrdl %cl, %esi, %ebx1501; X86-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx1502; X86-SHLD-NEXT: shrdl %cl, %edx, %edi1503; X86-SHLD-NEXT: movl %ebx, 4(%eax)1504; X86-SHLD-NEXT: movl %edi, (%eax)1505; X86-SHLD-NEXT: addl $64, %esp1506; X86-SHLD-NEXT: popl %esi1507; X86-SHLD-NEXT: popl %edi1508; X86-SHLD-NEXT: popl %ebx1509; X86-SHLD-NEXT: retl1510;1511; X86-HAVE-BMI2-NO-SHLD-LABEL: load_8byte_chunk_of_32byte_alloca_with_zero_upper_half:1512; X86-HAVE-BMI2-NO-SHLD: # %bb.0:1513; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %ebp1514; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %ebx1515; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %edi1516; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi1517; X86-HAVE-BMI2-NO-SHLD-NEXT: subl $76, %esp1518; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1519; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1520; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx1521; X86-HAVE-BMI2-NO-SHLD-NEXT: movups (%edx), %xmm01522; X86-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm11523; X86-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %ecx1524; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1525; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1526; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1527; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)1528; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, %edx1529; X86-HAVE-BMI2-NO-SHLD-NEXT: shrb $5, %dl1530; X86-HAVE-BMI2-NO-SHLD-NEXT: movzbl %dl, %edx1531; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ecx, (%esp,%edx,4), %esi1532; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, %ebx1533; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %bl1534; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx,4), %edi1535; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 8(%esp,%edx,4), %ebp1536; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%edi,%edi), %edx1537; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ebx, %edx, %edx1538; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %edx1539; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ecx, %edi, %esi1540; X86-HAVE-BMI2-NO-SHLD-NEXT: andb $24, %cl1541; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %cl1542; X86-HAVE-BMI2-NO-SHLD-NEXT: addl %ebp, %ebp1543; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %ebp, %ecx1544; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %ecx1545; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, 4(%eax)1546; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %edx, (%eax)1547; X86-HAVE-BMI2-NO-SHLD-NEXT: addl $76, %esp1548; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi1549; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %edi1550; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %ebx1551; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %ebp1552; X86-HAVE-BMI2-NO-SHLD-NEXT: retl1553 %init = load <16 x i8>, ptr %src, align 11554 %intermediate.sroa.0.0.vec.expand = shufflevector <16 x i8> %init, <16 x i8> poison, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>1555 %intermediate.sroa.0.0.vecblend = shufflevector <32 x i8> %intermediate.sroa.0.0.vec.expand, <32 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58, i32 59, i32 60, i32 61, i32 62, i32 63>1556 %byteOff.numbits = shl nuw nsw i64 %byteOff, 31557 %intermediate.val.frozen = freeze <32 x i8> %intermediate.sroa.0.0.vecblend1558 %intermediate.val.frozen.bits = bitcast <32 x i8> %intermediate.val.frozen to i2561559 %byteOff.numbits.wide = zext i64 %byteOff.numbits to i2561560 %intermediate.val.frozen.bits.positioned = lshr i256 %intermediate.val.frozen.bits, %byteOff.numbits.wide1561 %intermediate.val.frozen.bits.positioned.extracted = trunc i256 %intermediate.val.frozen.bits.positioned to i641562 store i64 %intermediate.val.frozen.bits.positioned.extracted, ptr %dst, align 81563 ret void1564}1565 1566define void @load_16byte_chunk_of_32byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {1567; X64-NO-BMI2-NO-SHLD-LABEL: load_16byte_chunk_of_32byte_alloca_with_zero_upper_half:1568; X64-NO-BMI2-NO-SHLD: # %bb.0:1569; X64-NO-BMI2-NO-SHLD-NEXT: movups (%rdi), %xmm01570; X64-NO-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm11571; X64-NO-BMI2-NO-SHLD-NEXT: leal (,%rsi,8), %eax1572; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1573; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1574; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1575; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)1576; X64-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx1577; X64-NO-BMI2-NO-SHLD-NEXT: shrb $6, %cl1578; X64-NO-BMI2-NO-SHLD-NEXT: movzbl %cl, %edi1579; X64-NO-BMI2-NO-SHLD-NEXT: movq -72(%rsp,%rdi,8), %r81580; X64-NO-BMI2-NO-SHLD-NEXT: movq -64(%rsp,%rdi,8), %r91581; X64-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx1582; X64-NO-BMI2-NO-SHLD-NEXT: shrq %cl, %r81583; X64-NO-BMI2-NO-SHLD-NEXT: movl %eax, %esi1584; X64-NO-BMI2-NO-SHLD-NEXT: notb %sil1585; X64-NO-BMI2-NO-SHLD-NEXT: leaq (%r9,%r9), %r101586; X64-NO-BMI2-NO-SHLD-NEXT: movl %esi, %ecx1587; X64-NO-BMI2-NO-SHLD-NEXT: shlq %cl, %r101588; X64-NO-BMI2-NO-SHLD-NEXT: orq %r8, %r101589; X64-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx1590; X64-NO-BMI2-NO-SHLD-NEXT: shrq %cl, %r91591; X64-NO-BMI2-NO-SHLD-NEXT: movq -56(%rsp,%rdi,8), %rax1592; X64-NO-BMI2-NO-SHLD-NEXT: addq %rax, %rax1593; X64-NO-BMI2-NO-SHLD-NEXT: movl %esi, %ecx1594; X64-NO-BMI2-NO-SHLD-NEXT: shlq %cl, %rax1595; X64-NO-BMI2-NO-SHLD-NEXT: orq %r9, %rax1596; X64-NO-BMI2-NO-SHLD-NEXT: movq %rax, 8(%rdx)1597; X64-NO-BMI2-NO-SHLD-NEXT: movq %r10, (%rdx)1598; X64-NO-BMI2-NO-SHLD-NEXT: retq1599;1600; X64-NO-BMI2-HAVE-SHLD-LABEL: load_16byte_chunk_of_32byte_alloca_with_zero_upper_half:1601; X64-NO-BMI2-HAVE-SHLD: # %bb.0:1602; X64-NO-BMI2-HAVE-SHLD-NEXT: movups (%rdi), %xmm01603; X64-NO-BMI2-HAVE-SHLD-NEXT: xorps %xmm1, %xmm11604; X64-NO-BMI2-HAVE-SHLD-NEXT: leal (,%rsi,8), %eax1605; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1606; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1607; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1608; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)1609; X64-NO-BMI2-HAVE-SHLD-NEXT: movl %eax, %ecx1610; X64-NO-BMI2-HAVE-SHLD-NEXT: shrb $6, %cl1611; X64-NO-BMI2-HAVE-SHLD-NEXT: movzbl %cl, %esi1612; X64-NO-BMI2-HAVE-SHLD-NEXT: movq -72(%rsp,%rsi,8), %rdi1613; X64-NO-BMI2-HAVE-SHLD-NEXT: movq -64(%rsp,%rsi,8), %r81614; X64-NO-BMI2-HAVE-SHLD-NEXT: movq %r8, %r91615; X64-NO-BMI2-HAVE-SHLD-NEXT: movl %eax, %ecx1616; X64-NO-BMI2-HAVE-SHLD-NEXT: shrq %cl, %r91617; X64-NO-BMI2-HAVE-SHLD-NEXT: notb %cl1618; X64-NO-BMI2-HAVE-SHLD-NEXT: movq -56(%rsp,%rsi,8), %rsi1619; X64-NO-BMI2-HAVE-SHLD-NEXT: addq %rsi, %rsi1620; X64-NO-BMI2-HAVE-SHLD-NEXT: shlq %cl, %rsi1621; X64-NO-BMI2-HAVE-SHLD-NEXT: orq %r9, %rsi1622; X64-NO-BMI2-HAVE-SHLD-NEXT: movl %eax, %ecx1623; X64-NO-BMI2-HAVE-SHLD-NEXT: shrdq %cl, %r8, %rdi1624; X64-NO-BMI2-HAVE-SHLD-NEXT: movq %rdi, (%rdx)1625; X64-NO-BMI2-HAVE-SHLD-NEXT: movq %rsi, 8(%rdx)1626; X64-NO-BMI2-HAVE-SHLD-NEXT: retq1627;1628; X64-HAVE-BMI2-NO-SHLD-LABEL: load_16byte_chunk_of_32byte_alloca_with_zero_upper_half:1629; X64-HAVE-BMI2-NO-SHLD: # %bb.0:1630; X64-HAVE-BMI2-NO-SHLD-NEXT: movups (%rdi), %xmm01631; X64-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm11632; X64-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %esi1633; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1634; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1635; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1636; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)1637; X64-HAVE-BMI2-NO-SHLD-NEXT: movl %esi, %eax1638; X64-HAVE-BMI2-NO-SHLD-NEXT: movl %esi, %ecx1639; X64-HAVE-BMI2-NO-SHLD-NEXT: shrb $6, %cl1640; X64-HAVE-BMI2-NO-SHLD-NEXT: movzbl %cl, %ecx1641; X64-HAVE-BMI2-NO-SHLD-NEXT: shrxq %rax, -72(%rsp,%rcx,8), %rdi1642; X64-HAVE-BMI2-NO-SHLD-NEXT: notb %sil1643; X64-HAVE-BMI2-NO-SHLD-NEXT: movq -64(%rsp,%rcx,8), %r81644; X64-HAVE-BMI2-NO-SHLD-NEXT: movq -56(%rsp,%rcx,8), %rcx1645; X64-HAVE-BMI2-NO-SHLD-NEXT: leaq (%r8,%r8), %r91646; X64-HAVE-BMI2-NO-SHLD-NEXT: shlxq %rsi, %r9, %r91647; X64-HAVE-BMI2-NO-SHLD-NEXT: orq %rdi, %r91648; X64-HAVE-BMI2-NO-SHLD-NEXT: shrxq %rax, %r8, %rax1649; X64-HAVE-BMI2-NO-SHLD-NEXT: addq %rcx, %rcx1650; X64-HAVE-BMI2-NO-SHLD-NEXT: shlxq %rsi, %rcx, %rcx1651; X64-HAVE-BMI2-NO-SHLD-NEXT: orq %rax, %rcx1652; X64-HAVE-BMI2-NO-SHLD-NEXT: movq %rcx, 8(%rdx)1653; X64-HAVE-BMI2-NO-SHLD-NEXT: movq %r9, (%rdx)1654; X64-HAVE-BMI2-NO-SHLD-NEXT: retq1655;1656; X64-HAVE-BMI2-HAVE-SHLD-LABEL: load_16byte_chunk_of_32byte_alloca_with_zero_upper_half:1657; X64-HAVE-BMI2-HAVE-SHLD: # %bb.0:1658; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq %rsi, %rcx1659; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movups (%rdi), %xmm01660; X64-HAVE-BMI2-HAVE-SHLD-NEXT: xorps %xmm1, %xmm11661; X64-HAVE-BMI2-HAVE-SHLD-NEXT: shll $3, %ecx1662; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1663; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1664; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1665; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)1666; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movl %ecx, %eax1667; X64-HAVE-BMI2-HAVE-SHLD-NEXT: shrb $6, %al1668; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movzbl %al, %eax1669; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq -72(%rsp,%rax,8), %rsi1670; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq -64(%rsp,%rax,8), %rdi1671; X64-HAVE-BMI2-HAVE-SHLD-NEXT: shrxq %rcx, %rdi, %r81672; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movl %ecx, %r9d1673; X64-HAVE-BMI2-HAVE-SHLD-NEXT: notb %r9b1674; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq -56(%rsp,%rax,8), %rax1675; X64-HAVE-BMI2-HAVE-SHLD-NEXT: addq %rax, %rax1676; X64-HAVE-BMI2-HAVE-SHLD-NEXT: shlxq %r9, %rax, %rax1677; X64-HAVE-BMI2-HAVE-SHLD-NEXT: orq %r8, %rax1678; X64-HAVE-BMI2-HAVE-SHLD-NEXT: # kill: def $cl killed $cl killed $rcx1679; X64-HAVE-BMI2-HAVE-SHLD-NEXT: shrdq %cl, %rdi, %rsi1680; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq %rsi, (%rdx)1681; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq %rax, 8(%rdx)1682; X64-HAVE-BMI2-HAVE-SHLD-NEXT: retq1683;1684; X86-NO-BMI2-NO-SHLD-LABEL: load_16byte_chunk_of_32byte_alloca_with_zero_upper_half:1685; X86-NO-BMI2-NO-SHLD: # %bb.0:1686; X86-NO-BMI2-NO-SHLD-NEXT: pushl %ebp1687; X86-NO-BMI2-NO-SHLD-NEXT: pushl %ebx1688; X86-NO-BMI2-NO-SHLD-NEXT: pushl %edi1689; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi1690; X86-NO-BMI2-NO-SHLD-NEXT: subl $92, %esp1691; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1692; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1693; X86-NO-BMI2-NO-SHLD-NEXT: movups (%ecx), %xmm01694; X86-NO-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm11695; X86-NO-BMI2-NO-SHLD-NEXT: shll $3, %eax1696; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1697; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1698; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1699; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, {{[0-9]+}}(%esp)1700; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx1701; X86-NO-BMI2-NO-SHLD-NEXT: shrb $5, %cl1702; X86-NO-BMI2-NO-SHLD-NEXT: movzbl %cl, %edi1703; X86-NO-BMI2-NO-SHLD-NEXT: movl 16(%esp,%edi,4), %edx1704; X86-NO-BMI2-NO-SHLD-NEXT: movl 20(%esp,%edi,4), %ebp1705; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx1706; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %edx1707; X86-NO-BMI2-NO-SHLD-NEXT: notb %cl1708; X86-NO-BMI2-NO-SHLD-NEXT: movb %cl, {{[-0-9]+}}(%e{{[sb]}}p) # 1-byte Spill1709; X86-NO-BMI2-NO-SHLD-NEXT: leal (%ebp,%ebp), %esi1710; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %esi1711; X86-NO-BMI2-NO-SHLD-NEXT: orl %edx, %esi1712; X86-NO-BMI2-NO-SHLD-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill1713; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx1714; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %ebp1715; X86-NO-BMI2-NO-SHLD-NEXT: movb %al, %ch1716; X86-NO-BMI2-NO-SHLD-NEXT: andb $24, %ch1717; X86-NO-BMI2-NO-SHLD-NEXT: xorb $31, %ch1718; X86-NO-BMI2-NO-SHLD-NEXT: movl 24(%esp,%edi,4), %edx1719; X86-NO-BMI2-NO-SHLD-NEXT: leal (%edx,%edx), %ebx1720; X86-NO-BMI2-NO-SHLD-NEXT: movb %ch, %cl1721; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %ebx1722; X86-NO-BMI2-NO-SHLD-NEXT: orl %ebp, %ebx1723; X86-NO-BMI2-NO-SHLD-NEXT: movb %al, %cl1724; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %edx1725; X86-NO-BMI2-NO-SHLD-NEXT: movl 28(%esp,%edi,4), %esi1726; X86-NO-BMI2-NO-SHLD-NEXT: leal (%esi,%esi), %ebp1727; X86-NO-BMI2-NO-SHLD-NEXT: movb {{[-0-9]+}}(%e{{[sb]}}p), %cl # 1-byte Reload1728; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %ebp1729; X86-NO-BMI2-NO-SHLD-NEXT: orl %edx, %ebp1730; X86-NO-BMI2-NO-SHLD-NEXT: movb %al, %cl1731; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi1732; X86-NO-BMI2-NO-SHLD-NEXT: movl 32(%esp,%edi,4), %eax1733; X86-NO-BMI2-NO-SHLD-NEXT: addl %eax, %eax1734; X86-NO-BMI2-NO-SHLD-NEXT: movb %ch, %cl1735; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %eax1736; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %eax1737; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1738; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, 12(%ecx)1739; X86-NO-BMI2-NO-SHLD-NEXT: movl %ebp, 8(%ecx)1740; X86-NO-BMI2-NO-SHLD-NEXT: movl %ebx, 4(%ecx)1741; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload1742; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, (%ecx)1743; X86-NO-BMI2-NO-SHLD-NEXT: addl $92, %esp1744; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi1745; X86-NO-BMI2-NO-SHLD-NEXT: popl %edi1746; X86-NO-BMI2-NO-SHLD-NEXT: popl %ebx1747; X86-NO-BMI2-NO-SHLD-NEXT: popl %ebp1748; X86-NO-BMI2-NO-SHLD-NEXT: retl1749;1750; X86-SHLD-LABEL: load_16byte_chunk_of_32byte_alloca_with_zero_upper_half:1751; X86-SHLD: # %bb.0:1752; X86-SHLD-NEXT: pushl %ebp1753; X86-SHLD-NEXT: pushl %ebx1754; X86-SHLD-NEXT: pushl %edi1755; X86-SHLD-NEXT: pushl %esi1756; X86-SHLD-NEXT: subl $92, %esp1757; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1758; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1759; X86-SHLD-NEXT: movups (%eax), %xmm01760; X86-SHLD-NEXT: xorps %xmm1, %xmm11761; X86-SHLD-NEXT: shll $3, %ecx1762; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1763; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1764; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1765; X86-SHLD-NEXT: movaps %xmm0, {{[0-9]+}}(%esp)1766; X86-SHLD-NEXT: movl %ecx, %eax1767; X86-SHLD-NEXT: shrb $5, %al1768; X86-SHLD-NEXT: movzbl %al, %ebx1769; X86-SHLD-NEXT: movl 24(%esp,%ebx,4), %esi1770; X86-SHLD-NEXT: movl 16(%esp,%ebx,4), %eax1771; X86-SHLD-NEXT: movl 20(%esp,%ebx,4), %edi1772; X86-SHLD-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill1773; X86-SHLD-NEXT: shrdl %cl, %esi, %edi1774; X86-SHLD-NEXT: movl 28(%esp,%ebx,4), %ebp1775; X86-SHLD-NEXT: shrdl %cl, %ebp, %esi1776; X86-SHLD-NEXT: movl 32(%esp,%ebx,4), %ebx1777; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx1778; X86-SHLD-NEXT: shrdl %cl, %ebx, %ebp1779; X86-SHLD-NEXT: movl %ebp, 12(%edx)1780; X86-SHLD-NEXT: movl %esi, 8(%edx)1781; X86-SHLD-NEXT: movl %edi, 4(%edx)1782; X86-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx1783; X86-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload1784; X86-SHLD-NEXT: shrdl %cl, %esi, %eax1785; X86-SHLD-NEXT: movl %eax, (%edx)1786; X86-SHLD-NEXT: addl $92, %esp1787; X86-SHLD-NEXT: popl %esi1788; X86-SHLD-NEXT: popl %edi1789; X86-SHLD-NEXT: popl %ebx1790; X86-SHLD-NEXT: popl %ebp1791; X86-SHLD-NEXT: retl1792;1793; X86-HAVE-BMI2-NO-SHLD-LABEL: load_16byte_chunk_of_32byte_alloca_with_zero_upper_half:1794; X86-HAVE-BMI2-NO-SHLD: # %bb.0:1795; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %ebp1796; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %ebx1797; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %edi1798; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi1799; X86-HAVE-BMI2-NO-SHLD-NEXT: subl $92, %esp1800; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1801; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1802; X86-HAVE-BMI2-NO-SHLD-NEXT: movups (%ecx), %xmm01803; X86-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm1, %xmm11804; X86-HAVE-BMI2-NO-SHLD-NEXT: shll $3, %eax1805; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1806; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1807; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1808; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, {{[0-9]+}}(%esp)1809; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %eax, %ecx1810; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %eax, %edx1811; X86-HAVE-BMI2-NO-SHLD-NEXT: shrb $5, %dl1812; X86-HAVE-BMI2-NO-SHLD-NEXT: movzbl %dl, %esi1813; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ecx, 16(%esp,%esi,4), %edx1814; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill1815; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, %ebp1816; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %eax, %ebx1817; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %bl1818; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 20(%esp,%esi,4), %edi1819; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%edi,%edi), %edx1820; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ebx, %edx, %ecx1821; X86-HAVE-BMI2-NO-SHLD-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Folded Reload1822; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill1823; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 24(%esp,%esi,4), %ecx1824; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill1825; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebp, %edi, %edx1826; X86-HAVE-BMI2-NO-SHLD-NEXT: andb $24, %al1827; X86-HAVE-BMI2-NO-SHLD-NEXT: xorb $31, %al1828; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%ecx,%ecx), %edi1829; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %eax, %edi, %edi1830; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %edx, %edi1831; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 28(%esp,%esi,4), %ecx1832; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%ecx,%ecx), %edx1833; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ebx, %edx, %edx1834; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebp, {{[-0-9]+}}(%e{{[sb]}}p), %ebx # 4-byte Folded Reload1835; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %ebx, %edx1836; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebp, %ecx, %ecx1837; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 32(%esp,%esi,4), %esi1838; X86-HAVE-BMI2-NO-SHLD-NEXT: addl %esi, %esi1839; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %eax, %esi, %eax1840; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %ecx, %eax1841; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1842; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %eax, 12(%ecx)1843; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %edx, 8(%ecx)1844; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %edi, 4(%ecx)1845; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload1846; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %eax, (%ecx)1847; X86-HAVE-BMI2-NO-SHLD-NEXT: addl $92, %esp1848; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi1849; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %edi1850; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %ebx1851; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %ebp1852; X86-HAVE-BMI2-NO-SHLD-NEXT: retl1853 %init = load <16 x i8>, ptr %src, align 11854 %intermediate.sroa.0.0.vec.expand = shufflevector <16 x i8> %init, <16 x i8> poison, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>1855 %intermediate.sroa.0.0.vecblend = shufflevector <32 x i8> %intermediate.sroa.0.0.vec.expand, <32 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <32 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 48, i32 49, i32 50, i32 51, i32 52, i32 53, i32 54, i32 55, i32 56, i32 57, i32 58, i32 59, i32 60, i32 61, i32 62, i32 63>1856 %byteOff.numbits = shl nuw nsw i64 %byteOff, 31857 %intermediate.val.frozen = freeze <32 x i8> %intermediate.sroa.0.0.vecblend1858 %intermediate.val.frozen.bits = bitcast <32 x i8> %intermediate.val.frozen to i2561859 %byteOff.numbits.wide = zext i64 %byteOff.numbits to i2561860 %intermediate.val.frozen.bits.positioned = lshr i256 %intermediate.val.frozen.bits, %byteOff.numbits.wide1861 %intermediate.val.frozen.bits.positioned.extracted = trunc i256 %intermediate.val.frozen.bits.positioned to i1281862 store i128 %intermediate.val.frozen.bits.positioned.extracted, ptr %dst, align 161863 ret void1864}1865 1866define void @load_1byte_chunk_of_64byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {1867; X64-NO-BMI2-LABEL: load_1byte_chunk_of_64byte_alloca_with_zero_upper_half:1868; X64-NO-BMI2: # %bb.0:1869; X64-NO-BMI2-NEXT: pushq %rax1870; X64-NO-BMI2-NEXT: movups (%rdi), %xmm01871; X64-NO-BMI2-NEXT: movups 16(%rdi), %xmm11872; X64-NO-BMI2-NEXT: xorps %xmm2, %xmm21873; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)1874; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)1875; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)1876; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)1877; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)1878; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)1879; X64-NO-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1880; X64-NO-BMI2-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)1881; X64-NO-BMI2-NEXT: leal (,%rsi,8), %ecx1882; X64-NO-BMI2-NEXT: andl $56, %ecx1883; X64-NO-BMI2-NEXT: andl $56, %esi1884; X64-NO-BMI2-NEXT: movq -128(%rsp,%rsi), %rax1885; X64-NO-BMI2-NEXT: shrq %cl, %rax1886; X64-NO-BMI2-NEXT: movl -120(%rsp,%rsi), %esi1887; X64-NO-BMI2-NEXT: addl %esi, %esi1888; X64-NO-BMI2-NEXT: notl %ecx1889; X64-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx1890; X64-NO-BMI2-NEXT: shlq %cl, %rsi1891; X64-NO-BMI2-NEXT: orl %eax, %esi1892; X64-NO-BMI2-NEXT: movb %sil, (%rdx)1893; X64-NO-BMI2-NEXT: popq %rax1894; X64-NO-BMI2-NEXT: retq1895;1896; X64-BMI2-LABEL: load_1byte_chunk_of_64byte_alloca_with_zero_upper_half:1897; X64-BMI2: # %bb.0:1898; X64-BMI2-NEXT: pushq %rax1899; X64-BMI2-NEXT: movups (%rdi), %xmm01900; X64-BMI2-NEXT: movups 16(%rdi), %xmm11901; X64-BMI2-NEXT: xorps %xmm2, %xmm21902; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)1903; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)1904; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)1905; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)1906; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)1907; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)1908; X64-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)1909; X64-BMI2-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)1910; X64-BMI2-NEXT: leal (,%rsi,8), %eax1911; X64-BMI2-NEXT: andl $56, %eax1912; X64-BMI2-NEXT: movl %eax, %ecx1913; X64-BMI2-NEXT: notl %eax1914; X64-BMI2-NEXT: andl $56, %esi1915; X64-BMI2-NEXT: movl -120(%rsp,%rsi), %edi1916; X64-BMI2-NEXT: addl %edi, %edi1917; X64-BMI2-NEXT: shlxq %rax, %rdi, %rax1918; X64-BMI2-NEXT: shrxq %rcx, -128(%rsp,%rsi), %rcx1919; X64-BMI2-NEXT: orl %eax, %ecx1920; X64-BMI2-NEXT: movb %cl, (%rdx)1921; X64-BMI2-NEXT: popq %rax1922; X64-BMI2-NEXT: retq1923;1924; X86-NO-BMI2-NO-SHLD-LABEL: load_1byte_chunk_of_64byte_alloca_with_zero_upper_half:1925; X86-NO-BMI2-NO-SHLD: # %bb.0:1926; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi1927; X86-NO-BMI2-NO-SHLD-NEXT: subl $136, %esp1928; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx1929; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1930; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1931; X86-NO-BMI2-NO-SHLD-NEXT: movups (%ecx), %xmm01932; X86-NO-BMI2-NO-SHLD-NEXT: movups 16(%ecx), %xmm11933; X86-NO-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm21934; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)1935; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)1936; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)1937; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)1938; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)1939; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)1940; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1941; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)1942; X86-NO-BMI2-NO-SHLD-NEXT: leal (,%edx,8), %ecx1943; X86-NO-BMI2-NO-SHLD-NEXT: andl $60, %edx1944; X86-NO-BMI2-NO-SHLD-NEXT: movl (%esp,%edx), %esi1945; X86-NO-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx), %edx1946; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi1947; X86-NO-BMI2-NO-SHLD-NEXT: notb %cl1948; X86-NO-BMI2-NO-SHLD-NEXT: addl %edx, %edx1949; X86-NO-BMI2-NO-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx1950; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %edx1951; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %edx1952; X86-NO-BMI2-NO-SHLD-NEXT: movb %dl, (%eax)1953; X86-NO-BMI2-NO-SHLD-NEXT: addl $136, %esp1954; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi1955; X86-NO-BMI2-NO-SHLD-NEXT: retl1956;1957; X86-SHLD-LABEL: load_1byte_chunk_of_64byte_alloca_with_zero_upper_half:1958; X86-SHLD: # %bb.0:1959; X86-SHLD-NEXT: pushl %ebx1960; X86-SHLD-NEXT: subl $136, %esp1961; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx1962; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1963; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1964; X86-SHLD-NEXT: movups (%ecx), %xmm01965; X86-SHLD-NEXT: movups 16(%ecx), %xmm11966; X86-SHLD-NEXT: xorps %xmm2, %xmm21967; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)1968; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)1969; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)1970; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)1971; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)1972; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)1973; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)1974; X86-SHLD-NEXT: movaps %xmm0, (%esp)1975; X86-SHLD-NEXT: leal (,%edx,8), %ecx1976; X86-SHLD-NEXT: andl $60, %edx1977; X86-SHLD-NEXT: movl (%esp,%edx), %ebx1978; X86-SHLD-NEXT: movl 4(%esp,%edx), %edx1979; X86-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx1980; X86-SHLD-NEXT: shrdl %cl, %edx, %ebx1981; X86-SHLD-NEXT: movb %bl, (%eax)1982; X86-SHLD-NEXT: addl $136, %esp1983; X86-SHLD-NEXT: popl %ebx1984; X86-SHLD-NEXT: retl1985;1986; X86-HAVE-BMI2-NO-SHLD-LABEL: load_1byte_chunk_of_64byte_alloca_with_zero_upper_half:1987; X86-HAVE-BMI2-NO-SHLD: # %bb.0:1988; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi1989; X86-HAVE-BMI2-NO-SHLD-NEXT: subl $136, %esp1990; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx1991; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax1992; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx1993; X86-HAVE-BMI2-NO-SHLD-NEXT: movups (%edx), %xmm01994; X86-HAVE-BMI2-NO-SHLD-NEXT: movups 16(%edx), %xmm11995; X86-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm21996; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)1997; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)1998; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)1999; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2000; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2001; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2002; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)2003; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)2004; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (,%ecx,8), %edx2005; X86-HAVE-BMI2-NO-SHLD-NEXT: andl $60, %ecx2006; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %edx, (%esp,%ecx), %esi2007; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %dl2008; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 4(%esp,%ecx), %ecx2009; X86-HAVE-BMI2-NO-SHLD-NEXT: addl %ecx, %ecx2010; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %edx, %ecx, %ecx2011; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %ecx2012; X86-HAVE-BMI2-NO-SHLD-NEXT: movb %cl, (%eax)2013; X86-HAVE-BMI2-NO-SHLD-NEXT: addl $136, %esp2014; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi2015; X86-HAVE-BMI2-NO-SHLD-NEXT: retl2016 %init = load <32 x i8>, ptr %src, align 12017 %intermediate.sroa.0.0.vec.expand = shufflevector <32 x i8> %init, <32 x i8> poison, <64 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>2018 %intermediate.sroa.0.0.vecblend = shufflevector <64 x i8> %intermediate.sroa.0.0.vec.expand, <64 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <64 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 96, i32 97, i32 98, i32 99, i32 100, i32 101, i32 102, i32 103, i32 104, i32 105, i32 106, i32 107, i32 108, i32 109, i32 110, i32 111, i32 112, i32 113, i32 114, i32 115, i32 116, i32 117, i32 118, i32 119, i32 120, i32 121, i32 122, i32 123, i32 124, i32 125, i32 126, i32 127>2019 %byteOff.numbits = shl nuw nsw i64 %byteOff, 32020 %intermediate.val.frozen = freeze <64 x i8> %intermediate.sroa.0.0.vecblend2021 %intermediate.val.frozen.bits = bitcast <64 x i8> %intermediate.val.frozen to i5122022 %byteOff.numbits.wide = zext i64 %byteOff.numbits to i5122023 %intermediate.val.frozen.bits.positioned = lshr i512 %intermediate.val.frozen.bits, %byteOff.numbits.wide2024 %intermediate.val.frozen.bits.positioned.extracted = trunc i512 %intermediate.val.frozen.bits.positioned to i82025 %1 = insertelement <1 x i8> poison, i8 %intermediate.val.frozen.bits.positioned.extracted, i64 02026 store <1 x i8> %1, ptr %dst, align 12027 ret void2028}2029 2030define void @load_2byte_chunk_of_64byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {2031; X64-NO-BMI2-LABEL: load_2byte_chunk_of_64byte_alloca_with_zero_upper_half:2032; X64-NO-BMI2: # %bb.0:2033; X64-NO-BMI2-NEXT: pushq %rax2034; X64-NO-BMI2-NEXT: movups (%rdi), %xmm02035; X64-NO-BMI2-NEXT: movups 16(%rdi), %xmm12036; X64-NO-BMI2-NEXT: xorps %xmm2, %xmm22037; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2038; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2039; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2040; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2041; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2042; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2043; X64-NO-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)2044; X64-NO-BMI2-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)2045; X64-NO-BMI2-NEXT: leal (,%rsi,8), %ecx2046; X64-NO-BMI2-NEXT: andl $56, %ecx2047; X64-NO-BMI2-NEXT: andl $56, %esi2048; X64-NO-BMI2-NEXT: movq -128(%rsp,%rsi), %rax2049; X64-NO-BMI2-NEXT: shrq %cl, %rax2050; X64-NO-BMI2-NEXT: movl -120(%rsp,%rsi), %esi2051; X64-NO-BMI2-NEXT: addl %esi, %esi2052; X64-NO-BMI2-NEXT: notl %ecx2053; X64-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx2054; X64-NO-BMI2-NEXT: shlq %cl, %rsi2055; X64-NO-BMI2-NEXT: orl %eax, %esi2056; X64-NO-BMI2-NEXT: movw %si, (%rdx)2057; X64-NO-BMI2-NEXT: popq %rax2058; X64-NO-BMI2-NEXT: retq2059;2060; X64-BMI2-LABEL: load_2byte_chunk_of_64byte_alloca_with_zero_upper_half:2061; X64-BMI2: # %bb.0:2062; X64-BMI2-NEXT: pushq %rax2063; X64-BMI2-NEXT: movups (%rdi), %xmm02064; X64-BMI2-NEXT: movups 16(%rdi), %xmm12065; X64-BMI2-NEXT: xorps %xmm2, %xmm22066; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2067; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2068; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2069; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2070; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2071; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2072; X64-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)2073; X64-BMI2-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)2074; X64-BMI2-NEXT: leal (,%rsi,8), %eax2075; X64-BMI2-NEXT: andl $56, %eax2076; X64-BMI2-NEXT: movl %eax, %ecx2077; X64-BMI2-NEXT: notl %eax2078; X64-BMI2-NEXT: andl $56, %esi2079; X64-BMI2-NEXT: movl -120(%rsp,%rsi), %edi2080; X64-BMI2-NEXT: addl %edi, %edi2081; X64-BMI2-NEXT: shlxq %rax, %rdi, %rax2082; X64-BMI2-NEXT: shrxq %rcx, -128(%rsp,%rsi), %rcx2083; X64-BMI2-NEXT: orl %eax, %ecx2084; X64-BMI2-NEXT: movw %cx, (%rdx)2085; X64-BMI2-NEXT: popq %rax2086; X64-BMI2-NEXT: retq2087;2088; X86-NO-BMI2-NO-SHLD-LABEL: load_2byte_chunk_of_64byte_alloca_with_zero_upper_half:2089; X86-NO-BMI2-NO-SHLD: # %bb.0:2090; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi2091; X86-NO-BMI2-NO-SHLD-NEXT: subl $136, %esp2092; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx2093; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax2094; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx2095; X86-NO-BMI2-NO-SHLD-NEXT: movups (%ecx), %xmm02096; X86-NO-BMI2-NO-SHLD-NEXT: movups 16(%ecx), %xmm12097; X86-NO-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm22098; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2099; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2100; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2101; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2102; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2103; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2104; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)2105; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)2106; X86-NO-BMI2-NO-SHLD-NEXT: leal (,%edx,8), %ecx2107; X86-NO-BMI2-NO-SHLD-NEXT: andl $60, %edx2108; X86-NO-BMI2-NO-SHLD-NEXT: movl (%esp,%edx), %esi2109; X86-NO-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx), %edx2110; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi2111; X86-NO-BMI2-NO-SHLD-NEXT: notb %cl2112; X86-NO-BMI2-NO-SHLD-NEXT: addl %edx, %edx2113; X86-NO-BMI2-NO-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx2114; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %edx2115; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %edx2116; X86-NO-BMI2-NO-SHLD-NEXT: movw %dx, (%eax)2117; X86-NO-BMI2-NO-SHLD-NEXT: addl $136, %esp2118; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi2119; X86-NO-BMI2-NO-SHLD-NEXT: retl2120;2121; X86-SHLD-LABEL: load_2byte_chunk_of_64byte_alloca_with_zero_upper_half:2122; X86-SHLD: # %bb.0:2123; X86-SHLD-NEXT: pushl %esi2124; X86-SHLD-NEXT: subl $136, %esp2125; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx2126; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax2127; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx2128; X86-SHLD-NEXT: movups (%ecx), %xmm02129; X86-SHLD-NEXT: movups 16(%ecx), %xmm12130; X86-SHLD-NEXT: xorps %xmm2, %xmm22131; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2132; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2133; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2134; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2135; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2136; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2137; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)2138; X86-SHLD-NEXT: movaps %xmm0, (%esp)2139; X86-SHLD-NEXT: leal (,%edx,8), %ecx2140; X86-SHLD-NEXT: andl $60, %edx2141; X86-SHLD-NEXT: movl (%esp,%edx), %esi2142; X86-SHLD-NEXT: movl 4(%esp,%edx), %edx2143; X86-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx2144; X86-SHLD-NEXT: shrdl %cl, %edx, %esi2145; X86-SHLD-NEXT: movw %si, (%eax)2146; X86-SHLD-NEXT: addl $136, %esp2147; X86-SHLD-NEXT: popl %esi2148; X86-SHLD-NEXT: retl2149;2150; X86-HAVE-BMI2-NO-SHLD-LABEL: load_2byte_chunk_of_64byte_alloca_with_zero_upper_half:2151; X86-HAVE-BMI2-NO-SHLD: # %bb.0:2152; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi2153; X86-HAVE-BMI2-NO-SHLD-NEXT: subl $136, %esp2154; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx2155; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax2156; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx2157; X86-HAVE-BMI2-NO-SHLD-NEXT: movups (%edx), %xmm02158; X86-HAVE-BMI2-NO-SHLD-NEXT: movups 16(%edx), %xmm12159; X86-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm22160; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2161; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2162; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2163; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2164; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2165; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2166; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)2167; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)2168; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (,%ecx,8), %edx2169; X86-HAVE-BMI2-NO-SHLD-NEXT: andl $60, %ecx2170; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %edx, (%esp,%ecx), %esi2171; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %dl2172; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 4(%esp,%ecx), %ecx2173; X86-HAVE-BMI2-NO-SHLD-NEXT: addl %ecx, %ecx2174; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %edx, %ecx, %ecx2175; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %ecx2176; X86-HAVE-BMI2-NO-SHLD-NEXT: movw %cx, (%eax)2177; X86-HAVE-BMI2-NO-SHLD-NEXT: addl $136, %esp2178; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi2179; X86-HAVE-BMI2-NO-SHLD-NEXT: retl2180 %init = load <32 x i8>, ptr %src, align 12181 %intermediate.sroa.0.0.vec.expand = shufflevector <32 x i8> %init, <32 x i8> poison, <64 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>2182 %intermediate.sroa.0.0.vecblend = shufflevector <64 x i8> %intermediate.sroa.0.0.vec.expand, <64 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <64 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 96, i32 97, i32 98, i32 99, i32 100, i32 101, i32 102, i32 103, i32 104, i32 105, i32 106, i32 107, i32 108, i32 109, i32 110, i32 111, i32 112, i32 113, i32 114, i32 115, i32 116, i32 117, i32 118, i32 119, i32 120, i32 121, i32 122, i32 123, i32 124, i32 125, i32 126, i32 127>2183 %byteOff.numbits = shl nuw nsw i64 %byteOff, 32184 %intermediate.val.frozen = freeze <64 x i8> %intermediate.sroa.0.0.vecblend2185 %intermediate.val.frozen.bits = bitcast <64 x i8> %intermediate.val.frozen to i5122186 %byteOff.numbits.wide = zext i64 %byteOff.numbits to i5122187 %intermediate.val.frozen.bits.positioned = lshr i512 %intermediate.val.frozen.bits, %byteOff.numbits.wide2188 %intermediate.val.frozen.bits.positioned.extracted = trunc i512 %intermediate.val.frozen.bits.positioned to i162189 store i16 %intermediate.val.frozen.bits.positioned.extracted, ptr %dst, align 22190 ret void2191}2192 2193define void @load_4byte_chunk_of_64byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {2194; X64-NO-BMI2-LABEL: load_4byte_chunk_of_64byte_alloca_with_zero_upper_half:2195; X64-NO-BMI2: # %bb.0:2196; X64-NO-BMI2-NEXT: pushq %rax2197; X64-NO-BMI2-NEXT: movups (%rdi), %xmm02198; X64-NO-BMI2-NEXT: movups 16(%rdi), %xmm12199; X64-NO-BMI2-NEXT: xorps %xmm2, %xmm22200; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2201; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2202; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2203; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2204; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2205; X64-NO-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2206; X64-NO-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)2207; X64-NO-BMI2-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)2208; X64-NO-BMI2-NEXT: leal (,%rsi,8), %ecx2209; X64-NO-BMI2-NEXT: andl $56, %ecx2210; X64-NO-BMI2-NEXT: andl $56, %esi2211; X64-NO-BMI2-NEXT: movq -128(%rsp,%rsi), %rax2212; X64-NO-BMI2-NEXT: shrq %cl, %rax2213; X64-NO-BMI2-NEXT: movl -120(%rsp,%rsi), %esi2214; X64-NO-BMI2-NEXT: addl %esi, %esi2215; X64-NO-BMI2-NEXT: notl %ecx2216; X64-NO-BMI2-NEXT: # kill: def $cl killed $cl killed $ecx2217; X64-NO-BMI2-NEXT: shlq %cl, %rsi2218; X64-NO-BMI2-NEXT: orl %eax, %esi2219; X64-NO-BMI2-NEXT: movl %esi, (%rdx)2220; X64-NO-BMI2-NEXT: popq %rax2221; X64-NO-BMI2-NEXT: retq2222;2223; X64-BMI2-LABEL: load_4byte_chunk_of_64byte_alloca_with_zero_upper_half:2224; X64-BMI2: # %bb.0:2225; X64-BMI2-NEXT: pushq %rax2226; X64-BMI2-NEXT: movups (%rdi), %xmm02227; X64-BMI2-NEXT: movups 16(%rdi), %xmm12228; X64-BMI2-NEXT: xorps %xmm2, %xmm22229; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2230; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2231; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2232; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2233; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2234; X64-BMI2-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2235; X64-BMI2-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)2236; X64-BMI2-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)2237; X64-BMI2-NEXT: leal (,%rsi,8), %eax2238; X64-BMI2-NEXT: andl $56, %eax2239; X64-BMI2-NEXT: movl %eax, %ecx2240; X64-BMI2-NEXT: notl %eax2241; X64-BMI2-NEXT: andl $56, %esi2242; X64-BMI2-NEXT: movl -120(%rsp,%rsi), %edi2243; X64-BMI2-NEXT: addl %edi, %edi2244; X64-BMI2-NEXT: shlxq %rax, %rdi, %rax2245; X64-BMI2-NEXT: shrxq %rcx, -128(%rsp,%rsi), %rcx2246; X64-BMI2-NEXT: orl %eax, %ecx2247; X64-BMI2-NEXT: movl %ecx, (%rdx)2248; X64-BMI2-NEXT: popq %rax2249; X64-BMI2-NEXT: retq2250;2251; X86-NO-BMI2-NO-SHLD-LABEL: load_4byte_chunk_of_64byte_alloca_with_zero_upper_half:2252; X86-NO-BMI2-NO-SHLD: # %bb.0:2253; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi2254; X86-NO-BMI2-NO-SHLD-NEXT: subl $136, %esp2255; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx2256; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax2257; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx2258; X86-NO-BMI2-NO-SHLD-NEXT: movups (%ecx), %xmm02259; X86-NO-BMI2-NO-SHLD-NEXT: movups 16(%ecx), %xmm12260; X86-NO-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm22261; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2262; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2263; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2264; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2265; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2266; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2267; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)2268; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)2269; X86-NO-BMI2-NO-SHLD-NEXT: leal (,%edx,8), %ecx2270; X86-NO-BMI2-NO-SHLD-NEXT: andl $60, %edx2271; X86-NO-BMI2-NO-SHLD-NEXT: movl (%esp,%edx), %esi2272; X86-NO-BMI2-NO-SHLD-NEXT: movl 4(%esp,%edx), %edx2273; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi2274; X86-NO-BMI2-NO-SHLD-NEXT: notb %cl2275; X86-NO-BMI2-NO-SHLD-NEXT: addl %edx, %edx2276; X86-NO-BMI2-NO-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx2277; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %edx2278; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %edx2279; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, (%eax)2280; X86-NO-BMI2-NO-SHLD-NEXT: addl $136, %esp2281; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi2282; X86-NO-BMI2-NO-SHLD-NEXT: retl2283;2284; X86-SHLD-LABEL: load_4byte_chunk_of_64byte_alloca_with_zero_upper_half:2285; X86-SHLD: # %bb.0:2286; X86-SHLD-NEXT: pushl %esi2287; X86-SHLD-NEXT: subl $136, %esp2288; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx2289; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax2290; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx2291; X86-SHLD-NEXT: movups (%ecx), %xmm02292; X86-SHLD-NEXT: movups 16(%ecx), %xmm12293; X86-SHLD-NEXT: xorps %xmm2, %xmm22294; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2295; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2296; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2297; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2298; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2299; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2300; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)2301; X86-SHLD-NEXT: movaps %xmm0, (%esp)2302; X86-SHLD-NEXT: leal (,%edx,8), %ecx2303; X86-SHLD-NEXT: andl $60, %edx2304; X86-SHLD-NEXT: movl (%esp,%edx), %esi2305; X86-SHLD-NEXT: movl 4(%esp,%edx), %edx2306; X86-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx2307; X86-SHLD-NEXT: shrdl %cl, %edx, %esi2308; X86-SHLD-NEXT: movl %esi, (%eax)2309; X86-SHLD-NEXT: addl $136, %esp2310; X86-SHLD-NEXT: popl %esi2311; X86-SHLD-NEXT: retl2312;2313; X86-HAVE-BMI2-NO-SHLD-LABEL: load_4byte_chunk_of_64byte_alloca_with_zero_upper_half:2314; X86-HAVE-BMI2-NO-SHLD: # %bb.0:2315; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi2316; X86-HAVE-BMI2-NO-SHLD-NEXT: subl $136, %esp2317; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx2318; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax2319; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx2320; X86-HAVE-BMI2-NO-SHLD-NEXT: movups (%edx), %xmm02321; X86-HAVE-BMI2-NO-SHLD-NEXT: movups 16(%edx), %xmm12322; X86-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm22323; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2324; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2325; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2326; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2327; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2328; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2329; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)2330; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)2331; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (,%ecx,8), %edx2332; X86-HAVE-BMI2-NO-SHLD-NEXT: andl $60, %ecx2333; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %edx, (%esp,%ecx), %esi2334; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %dl2335; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 4(%esp,%ecx), %ecx2336; X86-HAVE-BMI2-NO-SHLD-NEXT: addl %ecx, %ecx2337; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %edx, %ecx, %ecx2338; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %ecx2339; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, (%eax)2340; X86-HAVE-BMI2-NO-SHLD-NEXT: addl $136, %esp2341; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi2342; X86-HAVE-BMI2-NO-SHLD-NEXT: retl2343 %init = load <32 x i8>, ptr %src, align 12344 %intermediate.sroa.0.0.vec.expand = shufflevector <32 x i8> %init, <32 x i8> poison, <64 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>2345 %intermediate.sroa.0.0.vecblend = shufflevector <64 x i8> %intermediate.sroa.0.0.vec.expand, <64 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <64 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 96, i32 97, i32 98, i32 99, i32 100, i32 101, i32 102, i32 103, i32 104, i32 105, i32 106, i32 107, i32 108, i32 109, i32 110, i32 111, i32 112, i32 113, i32 114, i32 115, i32 116, i32 117, i32 118, i32 119, i32 120, i32 121, i32 122, i32 123, i32 124, i32 125, i32 126, i32 127>2346 %byteOff.numbits = shl nuw nsw i64 %byteOff, 32347 %intermediate.val.frozen = freeze <64 x i8> %intermediate.sroa.0.0.vecblend2348 %intermediate.val.frozen.bits = bitcast <64 x i8> %intermediate.val.frozen to i5122349 %byteOff.numbits.wide = zext i64 %byteOff.numbits to i5122350 %intermediate.val.frozen.bits.positioned = lshr i512 %intermediate.val.frozen.bits, %byteOff.numbits.wide2351 %intermediate.val.frozen.bits.positioned.extracted = trunc i512 %intermediate.val.frozen.bits.positioned to i322352 store i32 %intermediate.val.frozen.bits.positioned.extracted, ptr %dst, align 42353 ret void2354}2355 2356define void @load_8byte_chunk_of_64byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {2357; X64-NO-BMI2-NO-SHLD-LABEL: load_8byte_chunk_of_64byte_alloca_with_zero_upper_half:2358; X64-NO-BMI2-NO-SHLD: # %bb.0:2359; X64-NO-BMI2-NO-SHLD-NEXT: pushq %rax2360; X64-NO-BMI2-NO-SHLD-NEXT: movups (%rdi), %xmm02361; X64-NO-BMI2-NO-SHLD-NEXT: movups 16(%rdi), %xmm12362; X64-NO-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm22363; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2364; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2365; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2366; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2367; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2368; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2369; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)2370; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)2371; X64-NO-BMI2-NO-SHLD-NEXT: leal (,%rsi,8), %ecx2372; X64-NO-BMI2-NO-SHLD-NEXT: andl $56, %esi2373; X64-NO-BMI2-NO-SHLD-NEXT: movq -128(%rsp,%rsi), %rax2374; X64-NO-BMI2-NO-SHLD-NEXT: movq -120(%rsp,%rsi), %rsi2375; X64-NO-BMI2-NO-SHLD-NEXT: shrq %cl, %rax2376; X64-NO-BMI2-NO-SHLD-NEXT: notb %cl2377; X64-NO-BMI2-NO-SHLD-NEXT: addq %rsi, %rsi2378; X64-NO-BMI2-NO-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx2379; X64-NO-BMI2-NO-SHLD-NEXT: shlq %cl, %rsi2380; X64-NO-BMI2-NO-SHLD-NEXT: orq %rax, %rsi2381; X64-NO-BMI2-NO-SHLD-NEXT: movq %rsi, (%rdx)2382; X64-NO-BMI2-NO-SHLD-NEXT: popq %rax2383; X64-NO-BMI2-NO-SHLD-NEXT: retq2384;2385; X64-SHLD-LABEL: load_8byte_chunk_of_64byte_alloca_with_zero_upper_half:2386; X64-SHLD: # %bb.0:2387; X64-SHLD-NEXT: pushq %rax2388; X64-SHLD-NEXT: movups (%rdi), %xmm02389; X64-SHLD-NEXT: movups 16(%rdi), %xmm12390; X64-SHLD-NEXT: xorps %xmm2, %xmm22391; X64-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2392; X64-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2393; X64-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2394; X64-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2395; X64-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2396; X64-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2397; X64-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)2398; X64-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)2399; X64-SHLD-NEXT: leal (,%rsi,8), %ecx2400; X64-SHLD-NEXT: andl $56, %esi2401; X64-SHLD-NEXT: movq -128(%rsp,%rsi), %rax2402; X64-SHLD-NEXT: movq -120(%rsp,%rsi), %rsi2403; X64-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx2404; X64-SHLD-NEXT: shrdq %cl, %rsi, %rax2405; X64-SHLD-NEXT: movq %rax, (%rdx)2406; X64-SHLD-NEXT: popq %rax2407; X64-SHLD-NEXT: retq2408;2409; X64-HAVE-BMI2-NO-SHLD-LABEL: load_8byte_chunk_of_64byte_alloca_with_zero_upper_half:2410; X64-HAVE-BMI2-NO-SHLD: # %bb.0:2411; X64-HAVE-BMI2-NO-SHLD-NEXT: pushq %rax2412; X64-HAVE-BMI2-NO-SHLD-NEXT: movups (%rdi), %xmm02413; X64-HAVE-BMI2-NO-SHLD-NEXT: movups 16(%rdi), %xmm12414; X64-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm22415; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2416; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2417; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2418; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2419; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2420; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2421; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)2422; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)2423; X64-HAVE-BMI2-NO-SHLD-NEXT: leal (,%rsi,8), %eax2424; X64-HAVE-BMI2-NO-SHLD-NEXT: andl $56, %esi2425; X64-HAVE-BMI2-NO-SHLD-NEXT: shrxq %rax, -128(%rsp,%rsi), %rcx2426; X64-HAVE-BMI2-NO-SHLD-NEXT: notb %al2427; X64-HAVE-BMI2-NO-SHLD-NEXT: movq -120(%rsp,%rsi), %rsi2428; X64-HAVE-BMI2-NO-SHLD-NEXT: addq %rsi, %rsi2429; X64-HAVE-BMI2-NO-SHLD-NEXT: shlxq %rax, %rsi, %rax2430; X64-HAVE-BMI2-NO-SHLD-NEXT: orq %rcx, %rax2431; X64-HAVE-BMI2-NO-SHLD-NEXT: movq %rax, (%rdx)2432; X64-HAVE-BMI2-NO-SHLD-NEXT: popq %rax2433; X64-HAVE-BMI2-NO-SHLD-NEXT: retq2434;2435; X86-NO-BMI2-NO-SHLD-LABEL: load_8byte_chunk_of_64byte_alloca_with_zero_upper_half:2436; X86-NO-BMI2-NO-SHLD: # %bb.0:2437; X86-NO-BMI2-NO-SHLD-NEXT: pushl %ebp2438; X86-NO-BMI2-NO-SHLD-NEXT: pushl %ebx2439; X86-NO-BMI2-NO-SHLD-NEXT: pushl %edi2440; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi2441; X86-NO-BMI2-NO-SHLD-NEXT: subl $140, %esp2442; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax2443; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx2444; X86-NO-BMI2-NO-SHLD-NEXT: movups (%ecx), %xmm02445; X86-NO-BMI2-NO-SHLD-NEXT: movups 16(%ecx), %xmm12446; X86-NO-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm22447; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2448; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2449; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2450; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2451; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2452; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2453; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)2454; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)2455; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ebx2456; X86-NO-BMI2-NO-SHLD-NEXT: andl $60, %ebx2457; X86-NO-BMI2-NO-SHLD-NEXT: movl (%esp,%ebx), %esi2458; X86-NO-BMI2-NO-SHLD-NEXT: movl 4(%esp,%ebx), %edi2459; X86-NO-BMI2-NO-SHLD-NEXT: shll $3, %eax2460; X86-NO-BMI2-NO-SHLD-NEXT: andl $24, %eax2461; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx2462; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi2463; X86-NO-BMI2-NO-SHLD-NEXT: leal (%edi,%edi), %ebp2464; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %edx2465; X86-NO-BMI2-NO-SHLD-NEXT: notb %dl2466; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, %ecx2467; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %ebp2468; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %ebp2469; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx2470; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %edi2471; X86-NO-BMI2-NO-SHLD-NEXT: movl 8(%esp,%ebx), %eax2472; X86-NO-BMI2-NO-SHLD-NEXT: addl %eax, %eax2473; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, %ecx2474; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %eax2475; X86-NO-BMI2-NO-SHLD-NEXT: orl %edi, %eax2476; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx2477; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, 4(%ecx)2478; X86-NO-BMI2-NO-SHLD-NEXT: movl %ebp, (%ecx)2479; X86-NO-BMI2-NO-SHLD-NEXT: addl $140, %esp2480; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi2481; X86-NO-BMI2-NO-SHLD-NEXT: popl %edi2482; X86-NO-BMI2-NO-SHLD-NEXT: popl %ebx2483; X86-NO-BMI2-NO-SHLD-NEXT: popl %ebp2484; X86-NO-BMI2-NO-SHLD-NEXT: retl2485;2486; X86-SHLD-LABEL: load_8byte_chunk_of_64byte_alloca_with_zero_upper_half:2487; X86-SHLD: # %bb.0:2488; X86-SHLD-NEXT: pushl %ebx2489; X86-SHLD-NEXT: pushl %edi2490; X86-SHLD-NEXT: pushl %esi2491; X86-SHLD-NEXT: subl $128, %esp2492; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx2493; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax2494; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx2495; X86-SHLD-NEXT: movups (%edx), %xmm02496; X86-SHLD-NEXT: movups 16(%edx), %xmm12497; X86-SHLD-NEXT: xorps %xmm2, %xmm22498; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2499; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2500; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2501; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2502; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2503; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2504; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)2505; X86-SHLD-NEXT: movaps %xmm0, (%esp)2506; X86-SHLD-NEXT: movl %ecx, %esi2507; X86-SHLD-NEXT: andl $60, %esi2508; X86-SHLD-NEXT: movl 8(%esp,%esi), %edi2509; X86-SHLD-NEXT: movl (%esp,%esi), %edx2510; X86-SHLD-NEXT: movl 4(%esp,%esi), %esi2511; X86-SHLD-NEXT: shll $3, %ecx2512; X86-SHLD-NEXT: andl $24, %ecx2513; X86-SHLD-NEXT: movl %esi, %ebx2514; X86-SHLD-NEXT: shrdl %cl, %edi, %ebx2515; X86-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx2516; X86-SHLD-NEXT: shrdl %cl, %esi, %edx2517; X86-SHLD-NEXT: movl %ebx, 4(%eax)2518; X86-SHLD-NEXT: movl %edx, (%eax)2519; X86-SHLD-NEXT: addl $128, %esp2520; X86-SHLD-NEXT: popl %esi2521; X86-SHLD-NEXT: popl %edi2522; X86-SHLD-NEXT: popl %ebx2523; X86-SHLD-NEXT: retl2524;2525; X86-HAVE-BMI2-NO-SHLD-LABEL: load_8byte_chunk_of_64byte_alloca_with_zero_upper_half:2526; X86-HAVE-BMI2-NO-SHLD: # %bb.0:2527; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %ebp2528; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %ebx2529; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %edi2530; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi2531; X86-HAVE-BMI2-NO-SHLD-NEXT: subl $140, %esp2532; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx2533; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax2534; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx2535; X86-HAVE-BMI2-NO-SHLD-NEXT: movups (%edx), %xmm02536; X86-HAVE-BMI2-NO-SHLD-NEXT: movups 16(%edx), %xmm12537; X86-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm22538; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2539; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2540; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2541; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2542; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2543; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2544; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)2545; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, (%esp)2546; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (,%ecx,8), %edx2547; X86-HAVE-BMI2-NO-SHLD-NEXT: andl $24, %edx2548; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %edx, %ebx2549; X86-HAVE-BMI2-NO-SHLD-NEXT: andl $60, %ecx2550; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebx, (%esp,%ecx), %esi2551; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %dl2552; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 4(%esp,%ecx), %edi2553; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 8(%esp,%ecx), %ecx2554; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%edi,%edi), %ebp2555; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %edx, %ebp, %ebp2556; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %ebp2557; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebx, %edi, %esi2558; X86-HAVE-BMI2-NO-SHLD-NEXT: addl %ecx, %ecx2559; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %edx, %ecx, %ecx2560; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %ecx2561; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, 4(%eax)2562; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ebp, (%eax)2563; X86-HAVE-BMI2-NO-SHLD-NEXT: addl $140, %esp2564; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi2565; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %edi2566; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %ebx2567; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %ebp2568; X86-HAVE-BMI2-NO-SHLD-NEXT: retl2569 %init = load <32 x i8>, ptr %src, align 12570 %intermediate.sroa.0.0.vec.expand = shufflevector <32 x i8> %init, <32 x i8> poison, <64 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>2571 %intermediate.sroa.0.0.vecblend = shufflevector <64 x i8> %intermediate.sroa.0.0.vec.expand, <64 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <64 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 96, i32 97, i32 98, i32 99, i32 100, i32 101, i32 102, i32 103, i32 104, i32 105, i32 106, i32 107, i32 108, i32 109, i32 110, i32 111, i32 112, i32 113, i32 114, i32 115, i32 116, i32 117, i32 118, i32 119, i32 120, i32 121, i32 122, i32 123, i32 124, i32 125, i32 126, i32 127>2572 %byteOff.numbits = shl nuw nsw i64 %byteOff, 32573 %intermediate.val.frozen = freeze <64 x i8> %intermediate.sroa.0.0.vecblend2574 %intermediate.val.frozen.bits = bitcast <64 x i8> %intermediate.val.frozen to i5122575 %byteOff.numbits.wide = zext i64 %byteOff.numbits to i5122576 %intermediate.val.frozen.bits.positioned = lshr i512 %intermediate.val.frozen.bits, %byteOff.numbits.wide2577 %intermediate.val.frozen.bits.positioned.extracted = trunc i512 %intermediate.val.frozen.bits.positioned to i642578 store i64 %intermediate.val.frozen.bits.positioned.extracted, ptr %dst, align 82579 ret void2580}2581 2582define void @load_16byte_chunk_of_64byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {2583; X64-NO-BMI2-NO-SHLD-LABEL: load_16byte_chunk_of_64byte_alloca_with_zero_upper_half:2584; X64-NO-BMI2-NO-SHLD: # %bb.0:2585; X64-NO-BMI2-NO-SHLD-NEXT: pushq %rax2586; X64-NO-BMI2-NO-SHLD-NEXT: movups (%rdi), %xmm02587; X64-NO-BMI2-NO-SHLD-NEXT: movups 16(%rdi), %xmm12588; X64-NO-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm22589; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2590; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2591; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2592; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2593; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2594; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2595; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)2596; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)2597; X64-NO-BMI2-NO-SHLD-NEXT: leal (,%rsi,8), %eax2598; X64-NO-BMI2-NO-SHLD-NEXT: movl %eax, %edi2599; X64-NO-BMI2-NO-SHLD-NEXT: andl $56, %edi2600; X64-NO-BMI2-NO-SHLD-NEXT: andl $56, %esi2601; X64-NO-BMI2-NO-SHLD-NEXT: movq -128(%rsp,%rsi), %r82602; X64-NO-BMI2-NO-SHLD-NEXT: movq -120(%rsp,%rsi), %r92603; X64-NO-BMI2-NO-SHLD-NEXT: movl %edi, %ecx2604; X64-NO-BMI2-NO-SHLD-NEXT: shrq %cl, %r82605; X64-NO-BMI2-NO-SHLD-NEXT: notb %cl2606; X64-NO-BMI2-NO-SHLD-NEXT: leaq (%r9,%r9), %r102607; X64-NO-BMI2-NO-SHLD-NEXT: shlq %cl, %r102608; X64-NO-BMI2-NO-SHLD-NEXT: orq %r8, %r102609; X64-NO-BMI2-NO-SHLD-NEXT: movl %edi, %ecx2610; X64-NO-BMI2-NO-SHLD-NEXT: shrq %cl, %r92611; X64-NO-BMI2-NO-SHLD-NEXT: notl %eax2612; X64-NO-BMI2-NO-SHLD-NEXT: movq -112(%rsp,%rsi), %rsi2613; X64-NO-BMI2-NO-SHLD-NEXT: addq %rsi, %rsi2614; X64-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx2615; X64-NO-BMI2-NO-SHLD-NEXT: shlq %cl, %rsi2616; X64-NO-BMI2-NO-SHLD-NEXT: orq %r9, %rsi2617; X64-NO-BMI2-NO-SHLD-NEXT: movq %rsi, 8(%rdx)2618; X64-NO-BMI2-NO-SHLD-NEXT: movq %r10, (%rdx)2619; X64-NO-BMI2-NO-SHLD-NEXT: popq %rax2620; X64-NO-BMI2-NO-SHLD-NEXT: retq2621;2622; X64-NO-BMI2-HAVE-SHLD-LABEL: load_16byte_chunk_of_64byte_alloca_with_zero_upper_half:2623; X64-NO-BMI2-HAVE-SHLD: # %bb.0:2624; X64-NO-BMI2-HAVE-SHLD-NEXT: pushq %rax2625; X64-NO-BMI2-HAVE-SHLD-NEXT: movups (%rdi), %xmm02626; X64-NO-BMI2-HAVE-SHLD-NEXT: movups 16(%rdi), %xmm12627; X64-NO-BMI2-HAVE-SHLD-NEXT: xorps %xmm2, %xmm22628; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2629; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2630; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2631; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2632; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2633; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2634; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)2635; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)2636; X64-NO-BMI2-HAVE-SHLD-NEXT: leal (,%rsi,8), %eax2637; X64-NO-BMI2-HAVE-SHLD-NEXT: movl %eax, %edi2638; X64-NO-BMI2-HAVE-SHLD-NEXT: andl $56, %edi2639; X64-NO-BMI2-HAVE-SHLD-NEXT: andl $56, %esi2640; X64-NO-BMI2-HAVE-SHLD-NEXT: movq -128(%rsp,%rsi), %r82641; X64-NO-BMI2-HAVE-SHLD-NEXT: movq -120(%rsp,%rsi), %r92642; X64-NO-BMI2-HAVE-SHLD-NEXT: movq %r9, %r102643; X64-NO-BMI2-HAVE-SHLD-NEXT: movl %edi, %ecx2644; X64-NO-BMI2-HAVE-SHLD-NEXT: shrq %cl, %r102645; X64-NO-BMI2-HAVE-SHLD-NEXT: notl %eax2646; X64-NO-BMI2-HAVE-SHLD-NEXT: movq -112(%rsp,%rsi), %rsi2647; X64-NO-BMI2-HAVE-SHLD-NEXT: addq %rsi, %rsi2648; X64-NO-BMI2-HAVE-SHLD-NEXT: movl %eax, %ecx2649; X64-NO-BMI2-HAVE-SHLD-NEXT: shlq %cl, %rsi2650; X64-NO-BMI2-HAVE-SHLD-NEXT: orq %r10, %rsi2651; X64-NO-BMI2-HAVE-SHLD-NEXT: movl %edi, %ecx2652; X64-NO-BMI2-HAVE-SHLD-NEXT: shrdq %cl, %r9, %r82653; X64-NO-BMI2-HAVE-SHLD-NEXT: movq %r8, (%rdx)2654; X64-NO-BMI2-HAVE-SHLD-NEXT: movq %rsi, 8(%rdx)2655; X64-NO-BMI2-HAVE-SHLD-NEXT: popq %rax2656; X64-NO-BMI2-HAVE-SHLD-NEXT: retq2657;2658; X64-HAVE-BMI2-NO-SHLD-LABEL: load_16byte_chunk_of_64byte_alloca_with_zero_upper_half:2659; X64-HAVE-BMI2-NO-SHLD: # %bb.0:2660; X64-HAVE-BMI2-NO-SHLD-NEXT: pushq %rax2661; X64-HAVE-BMI2-NO-SHLD-NEXT: movups (%rdi), %xmm02662; X64-HAVE-BMI2-NO-SHLD-NEXT: movups 16(%rdi), %xmm12663; X64-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm22664; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2665; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2666; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2667; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2668; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2669; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2670; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)2671; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)2672; X64-HAVE-BMI2-NO-SHLD-NEXT: leal (,%rsi,8), %eax2673; X64-HAVE-BMI2-NO-SHLD-NEXT: movl %eax, %ecx2674; X64-HAVE-BMI2-NO-SHLD-NEXT: andl $56, %ecx2675; X64-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, %edi2676; X64-HAVE-BMI2-NO-SHLD-NEXT: andl $56, %esi2677; X64-HAVE-BMI2-NO-SHLD-NEXT: shrxq %rdi, -128(%rsp,%rsi), %r82678; X64-HAVE-BMI2-NO-SHLD-NEXT: notb %cl2679; X64-HAVE-BMI2-NO-SHLD-NEXT: movq -120(%rsp,%rsi), %r92680; X64-HAVE-BMI2-NO-SHLD-NEXT: movq -112(%rsp,%rsi), %rsi2681; X64-HAVE-BMI2-NO-SHLD-NEXT: leaq (%r9,%r9), %r102682; X64-HAVE-BMI2-NO-SHLD-NEXT: shlxq %rcx, %r10, %rcx2683; X64-HAVE-BMI2-NO-SHLD-NEXT: orq %r8, %rcx2684; X64-HAVE-BMI2-NO-SHLD-NEXT: notl %eax2685; X64-HAVE-BMI2-NO-SHLD-NEXT: addq %rsi, %rsi2686; X64-HAVE-BMI2-NO-SHLD-NEXT: shlxq %rax, %rsi, %rax2687; X64-HAVE-BMI2-NO-SHLD-NEXT: shrxq %rdi, %r9, %rsi2688; X64-HAVE-BMI2-NO-SHLD-NEXT: orq %rax, %rsi2689; X64-HAVE-BMI2-NO-SHLD-NEXT: movq %rsi, 8(%rdx)2690; X64-HAVE-BMI2-NO-SHLD-NEXT: movq %rcx, (%rdx)2691; X64-HAVE-BMI2-NO-SHLD-NEXT: popq %rax2692; X64-HAVE-BMI2-NO-SHLD-NEXT: retq2693;2694; X64-HAVE-BMI2-HAVE-SHLD-LABEL: load_16byte_chunk_of_64byte_alloca_with_zero_upper_half:2695; X64-HAVE-BMI2-HAVE-SHLD: # %bb.0:2696; X64-HAVE-BMI2-HAVE-SHLD-NEXT: pushq %rax2697; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movups (%rdi), %xmm02698; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movups 16(%rdi), %xmm12699; X64-HAVE-BMI2-HAVE-SHLD-NEXT: xorps %xmm2, %xmm22700; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2701; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2702; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2703; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2704; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2705; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2706; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)2707; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)2708; X64-HAVE-BMI2-HAVE-SHLD-NEXT: leal (,%rsi,8), %ecx2709; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movl %ecx, %eax2710; X64-HAVE-BMI2-HAVE-SHLD-NEXT: notl %eax2711; X64-HAVE-BMI2-HAVE-SHLD-NEXT: andl $56, %esi2712; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq -112(%rsp,%rsi), %rdi2713; X64-HAVE-BMI2-HAVE-SHLD-NEXT: addq %rdi, %rdi2714; X64-HAVE-BMI2-HAVE-SHLD-NEXT: shlxq %rax, %rdi, %rax2715; X64-HAVE-BMI2-HAVE-SHLD-NEXT: andl $56, %ecx2716; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq -128(%rsp,%rsi), %rdi2717; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq -120(%rsp,%rsi), %rsi2718; X64-HAVE-BMI2-HAVE-SHLD-NEXT: shrxq %rcx, %rsi, %r82719; X64-HAVE-BMI2-HAVE-SHLD-NEXT: orq %rax, %r82720; X64-HAVE-BMI2-HAVE-SHLD-NEXT: # kill: def $cl killed $cl killed $rcx2721; X64-HAVE-BMI2-HAVE-SHLD-NEXT: shrdq %cl, %rsi, %rdi2722; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq %rdi, (%rdx)2723; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq %r8, 8(%rdx)2724; X64-HAVE-BMI2-HAVE-SHLD-NEXT: popq %rax2725; X64-HAVE-BMI2-HAVE-SHLD-NEXT: retq2726;2727; X86-NO-BMI2-NO-SHLD-LABEL: load_16byte_chunk_of_64byte_alloca_with_zero_upper_half:2728; X86-NO-BMI2-NO-SHLD: # %bb.0:2729; X86-NO-BMI2-NO-SHLD-NEXT: pushl %ebp2730; X86-NO-BMI2-NO-SHLD-NEXT: pushl %ebx2731; X86-NO-BMI2-NO-SHLD-NEXT: pushl %edi2732; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi2733; X86-NO-BMI2-NO-SHLD-NEXT: subl $156, %esp2734; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax2735; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx2736; X86-NO-BMI2-NO-SHLD-NEXT: movups (%ecx), %xmm02737; X86-NO-BMI2-NO-SHLD-NEXT: movups 16(%ecx), %xmm12738; X86-NO-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm22739; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2740; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2741; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2742; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2743; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2744; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2745; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)2746; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, {{[0-9]+}}(%esp)2747; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %esi2748; X86-NO-BMI2-NO-SHLD-NEXT: andl $60, %esi2749; X86-NO-BMI2-NO-SHLD-NEXT: movl 16(%esp,%esi), %ebx2750; X86-NO-BMI2-NO-SHLD-NEXT: movl 20(%esp,%esi), %ebp2751; X86-NO-BMI2-NO-SHLD-NEXT: shll $3, %eax2752; X86-NO-BMI2-NO-SHLD-NEXT: andl $24, %eax2753; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx2754; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %ebx2755; X86-NO-BMI2-NO-SHLD-NEXT: leal (%ebp,%ebp), %edi2756; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %edx2757; X86-NO-BMI2-NO-SHLD-NEXT: notb %dl2758; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, %ecx2759; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %edi2760; X86-NO-BMI2-NO-SHLD-NEXT: orl %ebx, %edi2761; X86-NO-BMI2-NO-SHLD-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill2762; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx2763; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %ebp2764; X86-NO-BMI2-NO-SHLD-NEXT: movl 24(%esp,%esi), %ebx2765; X86-NO-BMI2-NO-SHLD-NEXT: leal (%ebx,%ebx), %edi2766; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, %ecx2767; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %edi2768; X86-NO-BMI2-NO-SHLD-NEXT: orl %ebp, %edi2769; X86-NO-BMI2-NO-SHLD-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill2770; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx2771; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %ebx2772; X86-NO-BMI2-NO-SHLD-NEXT: movl 28(%esp,%esi), %edi2773; X86-NO-BMI2-NO-SHLD-NEXT: leal (%edi,%edi), %ebp2774; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, %ecx2775; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %ebp2776; X86-NO-BMI2-NO-SHLD-NEXT: orl %ebx, %ebp2777; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx2778; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %edi2779; X86-NO-BMI2-NO-SHLD-NEXT: movl 32(%esp,%esi), %eax2780; X86-NO-BMI2-NO-SHLD-NEXT: addl %eax, %eax2781; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, %ecx2782; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %eax2783; X86-NO-BMI2-NO-SHLD-NEXT: orl %edi, %eax2784; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx2785; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, 12(%ecx)2786; X86-NO-BMI2-NO-SHLD-NEXT: movl %ebp, 8(%ecx)2787; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload2788; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, 4(%ecx)2789; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload2790; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, (%ecx)2791; X86-NO-BMI2-NO-SHLD-NEXT: addl $156, %esp2792; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi2793; X86-NO-BMI2-NO-SHLD-NEXT: popl %edi2794; X86-NO-BMI2-NO-SHLD-NEXT: popl %ebx2795; X86-NO-BMI2-NO-SHLD-NEXT: popl %ebp2796; X86-NO-BMI2-NO-SHLD-NEXT: retl2797;2798; X86-SHLD-LABEL: load_16byte_chunk_of_64byte_alloca_with_zero_upper_half:2799; X86-SHLD: # %bb.0:2800; X86-SHLD-NEXT: pushl %ebp2801; X86-SHLD-NEXT: pushl %ebx2802; X86-SHLD-NEXT: pushl %edi2803; X86-SHLD-NEXT: pushl %esi2804; X86-SHLD-NEXT: subl $156, %esp2805; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx2806; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax2807; X86-SHLD-NEXT: movups (%eax), %xmm02808; X86-SHLD-NEXT: movups 16(%eax), %xmm12809; X86-SHLD-NEXT: xorps %xmm2, %xmm22810; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2811; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2812; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2813; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2814; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2815; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2816; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)2817; X86-SHLD-NEXT: movaps %xmm0, {{[0-9]+}}(%esp)2818; X86-SHLD-NEXT: movl %ecx, %edi2819; X86-SHLD-NEXT: andl $60, %edi2820; X86-SHLD-NEXT: movl 24(%esp,%edi), %esi2821; X86-SHLD-NEXT: movl 16(%esp,%edi), %eax2822; X86-SHLD-NEXT: movl 20(%esp,%edi), %ebx2823; X86-SHLD-NEXT: movl %ebx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill2824; X86-SHLD-NEXT: shll $3, %ecx2825; X86-SHLD-NEXT: andl $24, %ecx2826; X86-SHLD-NEXT: shrdl %cl, %esi, %ebx2827; X86-SHLD-NEXT: movl 28(%esp,%edi), %ebp2828; X86-SHLD-NEXT: shrdl %cl, %ebp, %esi2829; X86-SHLD-NEXT: movl 32(%esp,%edi), %edi2830; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edx2831; X86-SHLD-NEXT: shrdl %cl, %edi, %ebp2832; X86-SHLD-NEXT: movl %ebp, 12(%edx)2833; X86-SHLD-NEXT: movl %esi, 8(%edx)2834; X86-SHLD-NEXT: movl %ebx, 4(%edx)2835; X86-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx2836; X86-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload2837; X86-SHLD-NEXT: shrdl %cl, %esi, %eax2838; X86-SHLD-NEXT: movl %eax, (%edx)2839; X86-SHLD-NEXT: addl $156, %esp2840; X86-SHLD-NEXT: popl %esi2841; X86-SHLD-NEXT: popl %edi2842; X86-SHLD-NEXT: popl %ebx2843; X86-SHLD-NEXT: popl %ebp2844; X86-SHLD-NEXT: retl2845;2846; X86-HAVE-BMI2-NO-SHLD-LABEL: load_16byte_chunk_of_64byte_alloca_with_zero_upper_half:2847; X86-HAVE-BMI2-NO-SHLD: # %bb.0:2848; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %ebp2849; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %ebx2850; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %edi2851; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi2852; X86-HAVE-BMI2-NO-SHLD-NEXT: subl $156, %esp2853; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax2854; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx2855; X86-HAVE-BMI2-NO-SHLD-NEXT: movups (%ecx), %xmm02856; X86-HAVE-BMI2-NO-SHLD-NEXT: movups 16(%ecx), %xmm12857; X86-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm22858; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2859; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2860; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2861; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2862; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2863; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)2864; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)2865; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, {{[0-9]+}}(%esp)2866; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (,%eax,8), %ecx2867; X86-HAVE-BMI2-NO-SHLD-NEXT: andl $24, %ecx2868; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, %ebx2869; X86-HAVE-BMI2-NO-SHLD-NEXT: andl $60, %eax2870; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebx, 16(%esp,%eax), %esi2871; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %cl2872; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 20(%esp,%eax), %edi2873; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 24(%esp,%eax), %ebp2874; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%edi,%edi), %edx2875; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %edx, %edx2876; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %esi, %edx2877; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebx, %edi, %edi2878; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%ebp,%ebp), %esi2879; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %esi, %esi2880; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %edi, %esi2881; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebx, %ebp, %edi2882; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill2883; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 28(%esp,%eax), %ebp2884; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%ebp,%ebp), %edi2885; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %edi, %edi2886; X86-HAVE-BMI2-NO-SHLD-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Folded Reload2887; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebx, %ebp, %ebx2888; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 32(%esp,%eax), %eax2889; X86-HAVE-BMI2-NO-SHLD-NEXT: addl %eax, %eax2890; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %eax, %eax2891; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %ebx, %eax2892; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx2893; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %eax, 12(%ecx)2894; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %edi, 8(%ecx)2895; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %esi, 4(%ecx)2896; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %edx, (%ecx)2897; X86-HAVE-BMI2-NO-SHLD-NEXT: addl $156, %esp2898; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi2899; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %edi2900; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %ebx2901; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %ebp2902; X86-HAVE-BMI2-NO-SHLD-NEXT: retl2903 %init = load <32 x i8>, ptr %src, align 12904 %intermediate.sroa.0.0.vec.expand = shufflevector <32 x i8> %init, <32 x i8> poison, <64 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>2905 %intermediate.sroa.0.0.vecblend = shufflevector <64 x i8> %intermediate.sroa.0.0.vec.expand, <64 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <64 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 96, i32 97, i32 98, i32 99, i32 100, i32 101, i32 102, i32 103, i32 104, i32 105, i32 106, i32 107, i32 108, i32 109, i32 110, i32 111, i32 112, i32 113, i32 114, i32 115, i32 116, i32 117, i32 118, i32 119, i32 120, i32 121, i32 122, i32 123, i32 124, i32 125, i32 126, i32 127>2906 %byteOff.numbits = shl nuw nsw i64 %byteOff, 32907 %intermediate.val.frozen = freeze <64 x i8> %intermediate.sroa.0.0.vecblend2908 %intermediate.val.frozen.bits = bitcast <64 x i8> %intermediate.val.frozen to i5122909 %byteOff.numbits.wide = zext i64 %byteOff.numbits to i5122910 %intermediate.val.frozen.bits.positioned = lshr i512 %intermediate.val.frozen.bits, %byteOff.numbits.wide2911 %intermediate.val.frozen.bits.positioned.extracted = trunc i512 %intermediate.val.frozen.bits.positioned to i1282912 store i128 %intermediate.val.frozen.bits.positioned.extracted, ptr %dst, align 162913 ret void2914}2915 2916define void @load_32byte_chunk_of_64byte_alloca_with_zero_upper_half(ptr %src, i64 %byteOff, ptr %dst) nounwind {2917; X64-NO-BMI2-NO-SHLD-LABEL: load_32byte_chunk_of_64byte_alloca_with_zero_upper_half:2918; X64-NO-BMI2-NO-SHLD: # %bb.0:2919; X64-NO-BMI2-NO-SHLD-NEXT: pushq %r142920; X64-NO-BMI2-NO-SHLD-NEXT: pushq %rbx2921; X64-NO-BMI2-NO-SHLD-NEXT: pushq %rax2922; X64-NO-BMI2-NO-SHLD-NEXT: movups (%rdi), %xmm02923; X64-NO-BMI2-NO-SHLD-NEXT: movups 16(%rdi), %xmm12924; X64-NO-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm22925; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2926; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2927; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2928; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2929; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2930; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2931; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)2932; X64-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)2933; X64-NO-BMI2-NO-SHLD-NEXT: leal (,%rsi,8), %eax2934; X64-NO-BMI2-NO-SHLD-NEXT: movl %eax, %edi2935; X64-NO-BMI2-NO-SHLD-NEXT: andl $56, %edi2936; X64-NO-BMI2-NO-SHLD-NEXT: andl $56, %esi2937; X64-NO-BMI2-NO-SHLD-NEXT: movq -128(%rsp,%rsi), %r102938; X64-NO-BMI2-NO-SHLD-NEXT: movq -120(%rsp,%rsi), %r112939; X64-NO-BMI2-NO-SHLD-NEXT: movl %edi, %ecx2940; X64-NO-BMI2-NO-SHLD-NEXT: shrq %cl, %r102941; X64-NO-BMI2-NO-SHLD-NEXT: movl %edi, %r8d2942; X64-NO-BMI2-NO-SHLD-NEXT: notb %r8b2943; X64-NO-BMI2-NO-SHLD-NEXT: leaq (%r11,%r11), %r92944; X64-NO-BMI2-NO-SHLD-NEXT: movl %r8d, %ecx2945; X64-NO-BMI2-NO-SHLD-NEXT: shlq %cl, %r92946; X64-NO-BMI2-NO-SHLD-NEXT: orq %r10, %r92947; X64-NO-BMI2-NO-SHLD-NEXT: movl %edi, %ecx2948; X64-NO-BMI2-NO-SHLD-NEXT: shrq %cl, %r112949; X64-NO-BMI2-NO-SHLD-NEXT: notl %eax2950; X64-NO-BMI2-NO-SHLD-NEXT: andl $63, %eax2951; X64-NO-BMI2-NO-SHLD-NEXT: movq -112(%rsp,%rsi), %r102952; X64-NO-BMI2-NO-SHLD-NEXT: leaq (%r10,%r10), %rbx2953; X64-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx2954; X64-NO-BMI2-NO-SHLD-NEXT: shlq %cl, %rbx2955; X64-NO-BMI2-NO-SHLD-NEXT: orq %r11, %rbx2956; X64-NO-BMI2-NO-SHLD-NEXT: movl %edi, %ecx2957; X64-NO-BMI2-NO-SHLD-NEXT: shrq %cl, %r102958; X64-NO-BMI2-NO-SHLD-NEXT: movq -104(%rsp,%rsi), %r112959; X64-NO-BMI2-NO-SHLD-NEXT: leaq (%r11,%r11), %r142960; X64-NO-BMI2-NO-SHLD-NEXT: movl %r8d, %ecx2961; X64-NO-BMI2-NO-SHLD-NEXT: shlq %cl, %r142962; X64-NO-BMI2-NO-SHLD-NEXT: orq %r10, %r142963; X64-NO-BMI2-NO-SHLD-NEXT: movl %edi, %ecx2964; X64-NO-BMI2-NO-SHLD-NEXT: shrq %cl, %r112965; X64-NO-BMI2-NO-SHLD-NEXT: movq -96(%rsp,%rsi), %rsi2966; X64-NO-BMI2-NO-SHLD-NEXT: addq %rsi, %rsi2967; X64-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx2968; X64-NO-BMI2-NO-SHLD-NEXT: shlq %cl, %rsi2969; X64-NO-BMI2-NO-SHLD-NEXT: orq %r11, %rsi2970; X64-NO-BMI2-NO-SHLD-NEXT: movq %rsi, 24(%rdx)2971; X64-NO-BMI2-NO-SHLD-NEXT: movq %r14, 16(%rdx)2972; X64-NO-BMI2-NO-SHLD-NEXT: movq %rbx, 8(%rdx)2973; X64-NO-BMI2-NO-SHLD-NEXT: movq %r9, (%rdx)2974; X64-NO-BMI2-NO-SHLD-NEXT: addq $8, %rsp2975; X64-NO-BMI2-NO-SHLD-NEXT: popq %rbx2976; X64-NO-BMI2-NO-SHLD-NEXT: popq %r142977; X64-NO-BMI2-NO-SHLD-NEXT: retq2978;2979; X64-NO-BMI2-HAVE-SHLD-LABEL: load_32byte_chunk_of_64byte_alloca_with_zero_upper_half:2980; X64-NO-BMI2-HAVE-SHLD: # %bb.0:2981; X64-NO-BMI2-HAVE-SHLD-NEXT: pushq %r142982; X64-NO-BMI2-HAVE-SHLD-NEXT: pushq %rbx2983; X64-NO-BMI2-HAVE-SHLD-NEXT: pushq %rax2984; X64-NO-BMI2-HAVE-SHLD-NEXT: movups (%rdi), %xmm02985; X64-NO-BMI2-HAVE-SHLD-NEXT: movups 16(%rdi), %xmm12986; X64-NO-BMI2-HAVE-SHLD-NEXT: xorps %xmm2, %xmm22987; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2988; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2989; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2990; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2991; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2992; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)2993; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)2994; X64-NO-BMI2-HAVE-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)2995; X64-NO-BMI2-HAVE-SHLD-NEXT: leal (,%rsi,8), %edi2996; X64-NO-BMI2-HAVE-SHLD-NEXT: movl %edi, %eax2997; X64-NO-BMI2-HAVE-SHLD-NEXT: andl $56, %eax2998; X64-NO-BMI2-HAVE-SHLD-NEXT: andl $56, %esi2999; X64-NO-BMI2-HAVE-SHLD-NEXT: movq -128(%rsp,%rsi), %r83000; X64-NO-BMI2-HAVE-SHLD-NEXT: movq -120(%rsp,%rsi), %r93001; X64-NO-BMI2-HAVE-SHLD-NEXT: movq %r9, %r103002; X64-NO-BMI2-HAVE-SHLD-NEXT: movl %eax, %ecx3003; X64-NO-BMI2-HAVE-SHLD-NEXT: shrq %cl, %r103004; X64-NO-BMI2-HAVE-SHLD-NEXT: notl %edi3005; X64-NO-BMI2-HAVE-SHLD-NEXT: andl $63, %edi3006; X64-NO-BMI2-HAVE-SHLD-NEXT: movq -112(%rsp,%rsi), %r113007; X64-NO-BMI2-HAVE-SHLD-NEXT: leaq (%r11,%r11), %rbx3008; X64-NO-BMI2-HAVE-SHLD-NEXT: movl %edi, %ecx3009; X64-NO-BMI2-HAVE-SHLD-NEXT: shlq %cl, %rbx3010; X64-NO-BMI2-HAVE-SHLD-NEXT: orq %r10, %rbx3011; X64-NO-BMI2-HAVE-SHLD-NEXT: movq -104(%rsp,%rsi), %r103012; X64-NO-BMI2-HAVE-SHLD-NEXT: movq %r10, %r143013; X64-NO-BMI2-HAVE-SHLD-NEXT: movl %eax, %ecx3014; X64-NO-BMI2-HAVE-SHLD-NEXT: shrq %cl, %r143015; X64-NO-BMI2-HAVE-SHLD-NEXT: movq -96(%rsp,%rsi), %rsi3016; X64-NO-BMI2-HAVE-SHLD-NEXT: addq %rsi, %rsi3017; X64-NO-BMI2-HAVE-SHLD-NEXT: movl %edi, %ecx3018; X64-NO-BMI2-HAVE-SHLD-NEXT: shlq %cl, %rsi3019; X64-NO-BMI2-HAVE-SHLD-NEXT: orq %r14, %rsi3020; X64-NO-BMI2-HAVE-SHLD-NEXT: movl %eax, %ecx3021; X64-NO-BMI2-HAVE-SHLD-NEXT: shrdq %cl, %r10, %r113022; X64-NO-BMI2-HAVE-SHLD-NEXT: shrdq %cl, %r9, %r83023; X64-NO-BMI2-HAVE-SHLD-NEXT: movq %r11, 16(%rdx)3024; X64-NO-BMI2-HAVE-SHLD-NEXT: movq %r8, (%rdx)3025; X64-NO-BMI2-HAVE-SHLD-NEXT: movq %rsi, 24(%rdx)3026; X64-NO-BMI2-HAVE-SHLD-NEXT: movq %rbx, 8(%rdx)3027; X64-NO-BMI2-HAVE-SHLD-NEXT: addq $8, %rsp3028; X64-NO-BMI2-HAVE-SHLD-NEXT: popq %rbx3029; X64-NO-BMI2-HAVE-SHLD-NEXT: popq %r143030; X64-NO-BMI2-HAVE-SHLD-NEXT: retq3031;3032; X64-HAVE-BMI2-NO-SHLD-LABEL: load_32byte_chunk_of_64byte_alloca_with_zero_upper_half:3033; X64-HAVE-BMI2-NO-SHLD: # %bb.0:3034; X64-HAVE-BMI2-NO-SHLD-NEXT: pushq %rbx3035; X64-HAVE-BMI2-NO-SHLD-NEXT: movups (%rdi), %xmm03036; X64-HAVE-BMI2-NO-SHLD-NEXT: movups 16(%rdi), %xmm13037; X64-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm23038; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)3039; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)3040; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)3041; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)3042; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)3043; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)3044; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)3045; X64-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)3046; X64-HAVE-BMI2-NO-SHLD-NEXT: leal (,%rsi,8), %eax3047; X64-HAVE-BMI2-NO-SHLD-NEXT: movl %eax, %ecx3048; X64-HAVE-BMI2-NO-SHLD-NEXT: andl $56, %ecx3049; X64-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, %edi3050; X64-HAVE-BMI2-NO-SHLD-NEXT: andl $56, %esi3051; X64-HAVE-BMI2-NO-SHLD-NEXT: shrxq %rdi, -128(%rsp,%rsi), %r83052; X64-HAVE-BMI2-NO-SHLD-NEXT: notb %cl3053; X64-HAVE-BMI2-NO-SHLD-NEXT: movq -120(%rsp,%rsi), %r93054; X64-HAVE-BMI2-NO-SHLD-NEXT: movq -112(%rsp,%rsi), %r103055; X64-HAVE-BMI2-NO-SHLD-NEXT: leaq (%r9,%r9), %r113056; X64-HAVE-BMI2-NO-SHLD-NEXT: shlxq %rcx, %r11, %r113057; X64-HAVE-BMI2-NO-SHLD-NEXT: orq %r8, %r113058; X64-HAVE-BMI2-NO-SHLD-NEXT: shrxq %rdi, %r9, %r83059; X64-HAVE-BMI2-NO-SHLD-NEXT: notl %eax3060; X64-HAVE-BMI2-NO-SHLD-NEXT: andl $63, %eax3061; X64-HAVE-BMI2-NO-SHLD-NEXT: leaq (%r10,%r10), %r93062; X64-HAVE-BMI2-NO-SHLD-NEXT: shlxq %rax, %r9, %r93063; X64-HAVE-BMI2-NO-SHLD-NEXT: orq %r8, %r93064; X64-HAVE-BMI2-NO-SHLD-NEXT: shrxq %rdi, %r10, %r83065; X64-HAVE-BMI2-NO-SHLD-NEXT: movq -104(%rsp,%rsi), %r103066; X64-HAVE-BMI2-NO-SHLD-NEXT: leaq (%r10,%r10), %rbx3067; X64-HAVE-BMI2-NO-SHLD-NEXT: shlxq %rcx, %rbx, %rcx3068; X64-HAVE-BMI2-NO-SHLD-NEXT: orq %r8, %rcx3069; X64-HAVE-BMI2-NO-SHLD-NEXT: shrxq %rdi, %r10, %rdi3070; X64-HAVE-BMI2-NO-SHLD-NEXT: movq -96(%rsp,%rsi), %rsi3071; X64-HAVE-BMI2-NO-SHLD-NEXT: addq %rsi, %rsi3072; X64-HAVE-BMI2-NO-SHLD-NEXT: shlxq %rax, %rsi, %rax3073; X64-HAVE-BMI2-NO-SHLD-NEXT: orq %rdi, %rax3074; X64-HAVE-BMI2-NO-SHLD-NEXT: movq %rax, 24(%rdx)3075; X64-HAVE-BMI2-NO-SHLD-NEXT: movq %rcx, 16(%rdx)3076; X64-HAVE-BMI2-NO-SHLD-NEXT: movq %r9, 8(%rdx)3077; X64-HAVE-BMI2-NO-SHLD-NEXT: movq %r11, (%rdx)3078; X64-HAVE-BMI2-NO-SHLD-NEXT: popq %rbx3079; X64-HAVE-BMI2-NO-SHLD-NEXT: retq3080;3081; X64-HAVE-BMI2-HAVE-SHLD-LABEL: load_32byte_chunk_of_64byte_alloca_with_zero_upper_half:3082; X64-HAVE-BMI2-HAVE-SHLD: # %bb.0:3083; X64-HAVE-BMI2-HAVE-SHLD-NEXT: pushq %rbx3084; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movups (%rdi), %xmm03085; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movups 16(%rdi), %xmm13086; X64-HAVE-BMI2-HAVE-SHLD-NEXT: xorps %xmm2, %xmm23087; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)3088; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)3089; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)3090; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)3091; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)3092; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm2, -{{[0-9]+}}(%rsp)3093; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm1, -{{[0-9]+}}(%rsp)3094; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movaps %xmm0, -{{[0-9]+}}(%rsp)3095; X64-HAVE-BMI2-HAVE-SHLD-NEXT: leal (,%rsi,8), %eax3096; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movl %eax, %ecx3097; X64-HAVE-BMI2-HAVE-SHLD-NEXT: andl $56, %ecx3098; X64-HAVE-BMI2-HAVE-SHLD-NEXT: andl $56, %esi3099; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq -128(%rsp,%rsi), %rdi3100; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq -120(%rsp,%rsi), %r83101; X64-HAVE-BMI2-HAVE-SHLD-NEXT: shrxq %rcx, %r8, %r93102; X64-HAVE-BMI2-HAVE-SHLD-NEXT: notl %eax3103; X64-HAVE-BMI2-HAVE-SHLD-NEXT: andl $63, %eax3104; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq -112(%rsp,%rsi), %r103105; X64-HAVE-BMI2-HAVE-SHLD-NEXT: leaq (%r10,%r10), %r113106; X64-HAVE-BMI2-HAVE-SHLD-NEXT: shlxq %rax, %r11, %r113107; X64-HAVE-BMI2-HAVE-SHLD-NEXT: orq %r9, %r113108; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq -104(%rsp,%rsi), %r93109; X64-HAVE-BMI2-HAVE-SHLD-NEXT: shrxq %rcx, %r9, %rbx3110; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq -96(%rsp,%rsi), %rsi3111; X64-HAVE-BMI2-HAVE-SHLD-NEXT: addq %rsi, %rsi3112; X64-HAVE-BMI2-HAVE-SHLD-NEXT: shlxq %rax, %rsi, %rax3113; X64-HAVE-BMI2-HAVE-SHLD-NEXT: orq %rbx, %rax3114; X64-HAVE-BMI2-HAVE-SHLD-NEXT: shrdq %cl, %r9, %r103115; X64-HAVE-BMI2-HAVE-SHLD-NEXT: # kill: def $cl killed $cl killed $rcx3116; X64-HAVE-BMI2-HAVE-SHLD-NEXT: shrdq %cl, %r8, %rdi3117; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq %r10, 16(%rdx)3118; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq %rdi, (%rdx)3119; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq %rax, 24(%rdx)3120; X64-HAVE-BMI2-HAVE-SHLD-NEXT: movq %r11, 8(%rdx)3121; X64-HAVE-BMI2-HAVE-SHLD-NEXT: popq %rbx3122; X64-HAVE-BMI2-HAVE-SHLD-NEXT: retq3123;3124; X86-NO-BMI2-NO-SHLD-LABEL: load_32byte_chunk_of_64byte_alloca_with_zero_upper_half:3125; X86-NO-BMI2-NO-SHLD: # %bb.0:3126; X86-NO-BMI2-NO-SHLD-NEXT: pushl %ebp3127; X86-NO-BMI2-NO-SHLD-NEXT: pushl %ebx3128; X86-NO-BMI2-NO-SHLD-NEXT: pushl %edi3129; X86-NO-BMI2-NO-SHLD-NEXT: pushl %esi3130; X86-NO-BMI2-NO-SHLD-NEXT: subl $172, %esp3131; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax3132; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx3133; X86-NO-BMI2-NO-SHLD-NEXT: movups (%ecx), %xmm03134; X86-NO-BMI2-NO-SHLD-NEXT: movups 16(%ecx), %xmm13135; X86-NO-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm23136; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3137; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3138; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3139; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3140; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3141; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3142; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)3143; X86-NO-BMI2-NO-SHLD-NEXT: movaps %xmm0, {{[0-9]+}}(%esp)3144; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %edi3145; X86-NO-BMI2-NO-SHLD-NEXT: andl $60, %edi3146; X86-NO-BMI2-NO-SHLD-NEXT: movl 32(%esp,%edi), %ebx3147; X86-NO-BMI2-NO-SHLD-NEXT: movl 36(%esp,%edi), %esi3148; X86-NO-BMI2-NO-SHLD-NEXT: shll $3, %eax3149; X86-NO-BMI2-NO-SHLD-NEXT: andl $24, %eax3150; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx3151; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %ebx3152; X86-NO-BMI2-NO-SHLD-NEXT: leal (%esi,%esi), %ebp3153; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %edx3154; X86-NO-BMI2-NO-SHLD-NEXT: notb %dl3155; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, %ecx3156; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %ebp3157; X86-NO-BMI2-NO-SHLD-NEXT: orl %ebx, %ebp3158; X86-NO-BMI2-NO-SHLD-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill3159; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx3160; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi3161; X86-NO-BMI2-NO-SHLD-NEXT: movl 40(%esp,%edi), %ebx3162; X86-NO-BMI2-NO-SHLD-NEXT: leal (%ebx,%ebx), %ebp3163; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, %ecx3164; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %ebp3165; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %ebp3166; X86-NO-BMI2-NO-SHLD-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill3167; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx3168; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %ebx3169; X86-NO-BMI2-NO-SHLD-NEXT: movl 44(%esp,%edi), %esi3170; X86-NO-BMI2-NO-SHLD-NEXT: leal (%esi,%esi), %ebp3171; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, %ecx3172; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %ebp3173; X86-NO-BMI2-NO-SHLD-NEXT: orl %ebx, %ebp3174; X86-NO-BMI2-NO-SHLD-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill3175; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx3176; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi3177; X86-NO-BMI2-NO-SHLD-NEXT: movl 48(%esp,%edi), %ebx3178; X86-NO-BMI2-NO-SHLD-NEXT: leal (%ebx,%ebx), %ebp3179; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, %ecx3180; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %ebp3181; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %ebp3182; X86-NO-BMI2-NO-SHLD-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill3183; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx3184; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %ebx3185; X86-NO-BMI2-NO-SHLD-NEXT: movl 52(%esp,%edi), %esi3186; X86-NO-BMI2-NO-SHLD-NEXT: leal (%esi,%esi), %ebp3187; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, %ecx3188; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %ebp3189; X86-NO-BMI2-NO-SHLD-NEXT: orl %ebx, %ebp3190; X86-NO-BMI2-NO-SHLD-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill3191; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx3192; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %esi3193; X86-NO-BMI2-NO-SHLD-NEXT: movl 56(%esp,%edi), %ebp3194; X86-NO-BMI2-NO-SHLD-NEXT: leal (%ebp,%ebp), %ebx3195; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, %ecx3196; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %ebx3197; X86-NO-BMI2-NO-SHLD-NEXT: orl %esi, %ebx3198; X86-NO-BMI2-NO-SHLD-NEXT: movl %ebx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill3199; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx3200; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %ebp3201; X86-NO-BMI2-NO-SHLD-NEXT: movl 60(%esp,%edi), %ebx3202; X86-NO-BMI2-NO-SHLD-NEXT: leal (%ebx,%ebx), %esi3203; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, %ecx3204; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %esi3205; X86-NO-BMI2-NO-SHLD-NEXT: orl %ebp, %esi3206; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, %ecx3207; X86-NO-BMI2-NO-SHLD-NEXT: shrl %cl, %ebx3208; X86-NO-BMI2-NO-SHLD-NEXT: movl 64(%esp,%edi), %eax3209; X86-NO-BMI2-NO-SHLD-NEXT: addl %eax, %eax3210; X86-NO-BMI2-NO-SHLD-NEXT: movl %edx, %ecx3211; X86-NO-BMI2-NO-SHLD-NEXT: shll %cl, %eax3212; X86-NO-BMI2-NO-SHLD-NEXT: orl %ebx, %eax3213; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx3214; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, 28(%ecx)3215; X86-NO-BMI2-NO-SHLD-NEXT: movl %esi, 24(%ecx)3216; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload3217; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, 20(%ecx)3218; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload3219; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, 16(%ecx)3220; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload3221; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, 12(%ecx)3222; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload3223; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, 8(%ecx)3224; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload3225; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, 4(%ecx)3226; X86-NO-BMI2-NO-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload3227; X86-NO-BMI2-NO-SHLD-NEXT: movl %eax, (%ecx)3228; X86-NO-BMI2-NO-SHLD-NEXT: addl $172, %esp3229; X86-NO-BMI2-NO-SHLD-NEXT: popl %esi3230; X86-NO-BMI2-NO-SHLD-NEXT: popl %edi3231; X86-NO-BMI2-NO-SHLD-NEXT: popl %ebx3232; X86-NO-BMI2-NO-SHLD-NEXT: popl %ebp3233; X86-NO-BMI2-NO-SHLD-NEXT: retl3234;3235; X86-SHLD-LABEL: load_32byte_chunk_of_64byte_alloca_with_zero_upper_half:3236; X86-SHLD: # %bb.0:3237; X86-SHLD-NEXT: pushl %ebp3238; X86-SHLD-NEXT: pushl %ebx3239; X86-SHLD-NEXT: pushl %edi3240; X86-SHLD-NEXT: pushl %esi3241; X86-SHLD-NEXT: subl $156, %esp3242; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx3243; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax3244; X86-SHLD-NEXT: movups (%eax), %xmm03245; X86-SHLD-NEXT: movups 16(%eax), %xmm13246; X86-SHLD-NEXT: xorps %xmm2, %xmm23247; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3248; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3249; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3250; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3251; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3252; X86-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3253; X86-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)3254; X86-SHLD-NEXT: movaps %xmm0, {{[0-9]+}}(%esp)3255; X86-SHLD-NEXT: movl %ecx, %edi3256; X86-SHLD-NEXT: andl $60, %edi3257; X86-SHLD-NEXT: movl 24(%esp,%edi), %edx3258; X86-SHLD-NEXT: movl 20(%esp,%edi), %esi3259; X86-SHLD-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill3260; X86-SHLD-NEXT: shll $3, %ecx3261; X86-SHLD-NEXT: andl $24, %ecx3262; X86-SHLD-NEXT: movl %edx, %eax3263; X86-SHLD-NEXT: shrdl %cl, %edx, %esi3264; X86-SHLD-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill3265; X86-SHLD-NEXT: movl 28(%esp,%edi), %edx3266; X86-SHLD-NEXT: shrdl %cl, %edx, %eax3267; X86-SHLD-NEXT: movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill3268; X86-SHLD-NEXT: movl 32(%esp,%edi), %ebp3269; X86-SHLD-NEXT: shrdl %cl, %ebp, %edx3270; X86-SHLD-NEXT: movl %edx, (%esp) # 4-byte Spill3271; X86-SHLD-NEXT: movl 36(%esp,%edi), %esi3272; X86-SHLD-NEXT: shrdl %cl, %esi, %ebp3273; X86-SHLD-NEXT: movl 40(%esp,%edi), %edx3274; X86-SHLD-NEXT: shrdl %cl, %edx, %esi3275; X86-SHLD-NEXT: movl 44(%esp,%edi), %eax3276; X86-SHLD-NEXT: shrdl %cl, %eax, %edx3277; X86-SHLD-NEXT: movl 16(%esp,%edi), %ebx3278; X86-SHLD-NEXT: movl 48(%esp,%edi), %edi3279; X86-SHLD-NEXT: shrdl %cl, %edi, %eax3280; X86-SHLD-NEXT: movl {{[0-9]+}}(%esp), %edi3281; X86-SHLD-NEXT: movl %eax, 28(%edi)3282; X86-SHLD-NEXT: movl %edx, 24(%edi)3283; X86-SHLD-NEXT: movl %esi, 20(%edi)3284; X86-SHLD-NEXT: movl %ebp, 16(%edi)3285; X86-SHLD-NEXT: movl (%esp), %eax # 4-byte Reload3286; X86-SHLD-NEXT: movl %eax, 12(%edi)3287; X86-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload3288; X86-SHLD-NEXT: movl %eax, 8(%edi)3289; X86-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload3290; X86-SHLD-NEXT: movl %eax, 4(%edi)3291; X86-SHLD-NEXT: # kill: def $cl killed $cl killed $ecx3292; X86-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload3293; X86-SHLD-NEXT: shrdl %cl, %eax, %ebx3294; X86-SHLD-NEXT: movl %ebx, (%edi)3295; X86-SHLD-NEXT: addl $156, %esp3296; X86-SHLD-NEXT: popl %esi3297; X86-SHLD-NEXT: popl %edi3298; X86-SHLD-NEXT: popl %ebx3299; X86-SHLD-NEXT: popl %ebp3300; X86-SHLD-NEXT: retl3301;3302; X86-HAVE-BMI2-NO-SHLD-LABEL: load_32byte_chunk_of_64byte_alloca_with_zero_upper_half:3303; X86-HAVE-BMI2-NO-SHLD: # %bb.0:3304; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %ebp3305; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %ebx3306; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %edi3307; X86-HAVE-BMI2-NO-SHLD-NEXT: pushl %esi3308; X86-HAVE-BMI2-NO-SHLD-NEXT: subl $172, %esp3309; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %eax3310; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx3311; X86-HAVE-BMI2-NO-SHLD-NEXT: movups (%ecx), %xmm03312; X86-HAVE-BMI2-NO-SHLD-NEXT: movups 16(%ecx), %xmm13313; X86-HAVE-BMI2-NO-SHLD-NEXT: xorps %xmm2, %xmm23314; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3315; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3316; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3317; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3318; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3319; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm2, {{[0-9]+}}(%esp)3320; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm1, {{[0-9]+}}(%esp)3321; X86-HAVE-BMI2-NO-SHLD-NEXT: movaps %xmm0, {{[0-9]+}}(%esp)3322; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (,%eax,8), %ecx3323; X86-HAVE-BMI2-NO-SHLD-NEXT: andl $24, %ecx3324; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ecx, %ebx3325; X86-HAVE-BMI2-NO-SHLD-NEXT: andl $60, %eax3326; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebx, 32(%esp,%eax), %edx3327; X86-HAVE-BMI2-NO-SHLD-NEXT: notb %cl3328; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 36(%esp,%eax), %esi3329; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 40(%esp,%eax), %edi3330; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%esi,%esi), %ebp3331; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %ebp, %ebp3332; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %edx, %ebp3333; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ebp, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill3334; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebx, %esi, %edx3335; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%edi,%edi), %esi3336; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %esi, %esi3337; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %edx, %esi3338; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill3339; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebx, %edi, %edx3340; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 44(%esp,%eax), %esi3341; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%esi,%esi), %edi3342; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %edi, %edi3343; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %edx, %edi3344; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill3345; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebx, %esi, %edx3346; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 48(%esp,%eax), %esi3347; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%esi,%esi), %ebp3348; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %ebp, %edi3349; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %edx, %edi3350; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill3351; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebx, %esi, %ebp3352; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 52(%esp,%eax), %edx3353; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%edx,%edx), %esi3354; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %esi, %edi3355; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %ebp, %edi3356; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebx, %edx, %ebp3357; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 56(%esp,%eax), %edx3358; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%edx,%edx), %esi3359; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %esi, %esi3360; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %ebp, %esi3361; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebx, %edx, %edx3362; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill3363; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 60(%esp,%eax), %edx3364; X86-HAVE-BMI2-NO-SHLD-NEXT: leal (%edx,%edx), %ebp3365; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %ebp, %ebp3366; X86-HAVE-BMI2-NO-SHLD-NEXT: orl {{[-0-9]+}}(%e{{[sb]}}p), %ebp # 4-byte Folded Reload3367; X86-HAVE-BMI2-NO-SHLD-NEXT: shrxl %ebx, %edx, %edx3368; X86-HAVE-BMI2-NO-SHLD-NEXT: movl 64(%esp,%eax), %eax3369; X86-HAVE-BMI2-NO-SHLD-NEXT: addl %eax, %eax3370; X86-HAVE-BMI2-NO-SHLD-NEXT: shlxl %ecx, %eax, %eax3371; X86-HAVE-BMI2-NO-SHLD-NEXT: orl %edx, %eax3372; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[0-9]+}}(%esp), %ecx3373; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %eax, 28(%ecx)3374; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %ebp, 24(%ecx)3375; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %esi, 20(%ecx)3376; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %edi, 16(%ecx)3377; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload3378; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %eax, 12(%ecx)3379; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload3380; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %eax, 8(%ecx)3381; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload3382; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %eax, 4(%ecx)3383; X86-HAVE-BMI2-NO-SHLD-NEXT: movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload3384; X86-HAVE-BMI2-NO-SHLD-NEXT: movl %eax, (%ecx)3385; X86-HAVE-BMI2-NO-SHLD-NEXT: addl $172, %esp3386; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %esi3387; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %edi3388; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %ebx3389; X86-HAVE-BMI2-NO-SHLD-NEXT: popl %ebp3390; X86-HAVE-BMI2-NO-SHLD-NEXT: retl3391 %init = load <32 x i8>, ptr %src, align 13392 %intermediate.sroa.0.0.vec.expand = shufflevector <32 x i8> %init, <32 x i8> poison, <64 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>3393 %intermediate.sroa.0.0.vecblend = shufflevector <64 x i8> %intermediate.sroa.0.0.vec.expand, <64 x i8> <i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0, i8 0>, <64 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24, i32 25, i32 26, i32 27, i32 28, i32 29, i32 30, i32 31, i32 96, i32 97, i32 98, i32 99, i32 100, i32 101, i32 102, i32 103, i32 104, i32 105, i32 106, i32 107, i32 108, i32 109, i32 110, i32 111, i32 112, i32 113, i32 114, i32 115, i32 116, i32 117, i32 118, i32 119, i32 120, i32 121, i32 122, i32 123, i32 124, i32 125, i32 126, i32 127>3394 %byteOff.numbits = shl nuw nsw i64 %byteOff, 33395 %intermediate.val.frozen = freeze <64 x i8> %intermediate.sroa.0.0.vecblend3396 %intermediate.val.frozen.bits = bitcast <64 x i8> %intermediate.val.frozen to i5123397 %byteOff.numbits.wide = zext i64 %byteOff.numbits to i5123398 %intermediate.val.frozen.bits.positioned = lshr i512 %intermediate.val.frozen.bits, %byteOff.numbits.wide3399 %intermediate.val.frozen.bits.positioned.extracted = trunc i512 %intermediate.val.frozen.bits.positioned to i2563400 store i256 %intermediate.val.frozen.bits.positioned.extracted, ptr %dst, align 323401 ret void3402}3403;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:3404; ALL: {{.*}}3405; X64-NO-SHLD: {{.*}}3406; X86: {{.*}}3407; X86-HAVE-BMI2-HAVE-SHLD: {{.*}}3408; X86-NO-BMI2-HAVE-SHLD: {{.*}}3409; X86-NO-SHLD: {{.*}}3410