brintos

brintos / llvm-project-archived public Read only

0
0
Text · 38.4 KiB · 049ee47 Raw
1143 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-- | FileCheck %s --check-prefixes=ALL,i6863; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s --check-prefixes=ALL,x86_644 5;6; Scalars7;8 9define void @test_lshr_i128(i128 %x, i128 %a, ptr nocapture %r) nounwind {10; i686-LABEL: test_lshr_i128:11; i686:       # %bb.0: # %entry12; i686-NEXT:    pushl %ebp13; i686-NEXT:    movl %esp, %ebp14; i686-NEXT:    pushl %ebx15; i686-NEXT:    pushl %edi16; i686-NEXT:    pushl %esi17; i686-NEXT:    andl $-16, %esp18; i686-NEXT:    subl $48, %esp19; i686-NEXT:    movl 24(%ebp), %ecx20; i686-NEXT:    movl 8(%ebp), %eax21; i686-NEXT:    movl 12(%ebp), %edx22; i686-NEXT:    movl 16(%ebp), %esi23; i686-NEXT:    movl 20(%ebp), %edi24; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)25; i686-NEXT:    movl %esi, {{[0-9]+}}(%esp)26; i686-NEXT:    movl %edx, {{[0-9]+}}(%esp)27; i686-NEXT:    movl %eax, (%esp)28; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)29; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)30; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)31; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)32; i686-NEXT:    movl %ecx, %eax33; i686-NEXT:    shrb $3, %al34; i686-NEXT:    andb $12, %al35; i686-NEXT:    movzbl %al, %edi36; i686-NEXT:    movl 8(%esp,%edi), %eax37; i686-NEXT:    movl 4(%esp,%edi), %ebx38; i686-NEXT:    movl %ebx, %edx39; i686-NEXT:    shrdl %cl, %eax, %edx40; i686-NEXT:    movl (%esp,%edi), %esi41; i686-NEXT:    movl 12(%esp,%edi), %edi42; i686-NEXT:    shrdl %cl, %edi, %eax43; i686-NEXT:    shrdl %cl, %ebx, %esi44; i686-NEXT:    movl 40(%ebp), %ebx45; i686-NEXT:    # kill: def $cl killed $cl killed $ecx46; i686-NEXT:    shrl %cl, %edi47; i686-NEXT:    movl %edi, 12(%ebx)48; i686-NEXT:    movl %eax, 8(%ebx)49; i686-NEXT:    movl %edx, 4(%ebx)50; i686-NEXT:    movl %esi, (%ebx)51; i686-NEXT:    leal -12(%ebp), %esp52; i686-NEXT:    popl %esi53; i686-NEXT:    popl %edi54; i686-NEXT:    popl %ebx55; i686-NEXT:    popl %ebp56; i686-NEXT:    retl57;58; x86_64-LABEL: test_lshr_i128:59; x86_64:       # %bb.0: # %entry60; x86_64-NEXT:    movq %rdx, %rcx61; x86_64-NEXT:    shrdq %cl, %rsi, %rdi62; x86_64-NEXT:    shrq %cl, %rsi63; x86_64-NEXT:    xorl %eax, %eax64; x86_64-NEXT:    testb $64, %cl65; x86_64-NEXT:    cmovneq %rsi, %rdi66; x86_64-NEXT:    cmoveq %rsi, %rax67; x86_64-NEXT:    movq %rax, 8(%r8)68; x86_64-NEXT:    movq %rdi, (%r8)69; x86_64-NEXT:    retq70entry:71	%0 = lshr i128 %x, %a72	store i128 %0, ptr %r, align 1673	ret void74}75 76define void @test_ashr_i128(i128 %x, i128 %a, ptr nocapture %r) nounwind {77; i686-LABEL: test_ashr_i128:78; i686:       # %bb.0: # %entry79; i686-NEXT:    pushl %ebp80; i686-NEXT:    movl %esp, %ebp81; i686-NEXT:    pushl %ebx82; i686-NEXT:    pushl %edi83; i686-NEXT:    pushl %esi84; i686-NEXT:    andl $-16, %esp85; i686-NEXT:    subl $48, %esp86; i686-NEXT:    movl 24(%ebp), %ecx87; i686-NEXT:    movl 8(%ebp), %eax88; i686-NEXT:    movl 12(%ebp), %edx89; i686-NEXT:    movl 16(%ebp), %esi90; i686-NEXT:    movl 20(%ebp), %edi91; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)92; i686-NEXT:    movl %esi, {{[0-9]+}}(%esp)93; i686-NEXT:    movl %edx, {{[0-9]+}}(%esp)94; i686-NEXT:    movl %eax, (%esp)95; i686-NEXT:    sarl $31, %edi96; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)97; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)98; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)99; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)100; i686-NEXT:    movl %ecx, %eax101; i686-NEXT:    shrb $3, %al102; i686-NEXT:    andb $12, %al103; i686-NEXT:    movzbl %al, %edi104; i686-NEXT:    movl 8(%esp,%edi), %eax105; i686-NEXT:    movl 4(%esp,%edi), %ebx106; i686-NEXT:    movl %ebx, %edx107; i686-NEXT:    shrdl %cl, %eax, %edx108; i686-NEXT:    movl (%esp,%edi), %esi109; i686-NEXT:    movl 12(%esp,%edi), %edi110; i686-NEXT:    shrdl %cl, %edi, %eax111; i686-NEXT:    shrdl %cl, %ebx, %esi112; i686-NEXT:    movl 40(%ebp), %ebx113; i686-NEXT:    # kill: def $cl killed $cl killed $ecx114; i686-NEXT:    sarl %cl, %edi115; i686-NEXT:    movl %edi, 12(%ebx)116; i686-NEXT:    movl %eax, 8(%ebx)117; i686-NEXT:    movl %edx, 4(%ebx)118; i686-NEXT:    movl %esi, (%ebx)119; i686-NEXT:    leal -12(%ebp), %esp120; i686-NEXT:    popl %esi121; i686-NEXT:    popl %edi122; i686-NEXT:    popl %ebx123; i686-NEXT:    popl %ebp124; i686-NEXT:    retl125;126; x86_64-LABEL: test_ashr_i128:127; x86_64:       # %bb.0: # %entry128; x86_64-NEXT:    movq %rdx, %rcx129; x86_64-NEXT:    shrdq %cl, %rsi, %rdi130; x86_64-NEXT:    movq %rsi, %rax131; x86_64-NEXT:    sarq %cl, %rax132; x86_64-NEXT:    sarq $63, %rsi133; x86_64-NEXT:    testb $64, %cl134; x86_64-NEXT:    cmovneq %rax, %rdi135; x86_64-NEXT:    cmoveq %rax, %rsi136; x86_64-NEXT:    movq %rsi, 8(%r8)137; x86_64-NEXT:    movq %rdi, (%r8)138; x86_64-NEXT:    retq139entry:140	%0 = ashr i128 %x, %a141	store i128 %0, ptr %r, align 16142	ret void143}144 145define void @test_shl_i128(i128 %x, i128 %a, ptr nocapture %r) nounwind {146; i686-LABEL: test_shl_i128:147; i686:       # %bb.0: # %entry148; i686-NEXT:    pushl %ebp149; i686-NEXT:    movl %esp, %ebp150; i686-NEXT:    pushl %ebx151; i686-NEXT:    pushl %edi152; i686-NEXT:    pushl %esi153; i686-NEXT:    andl $-16, %esp154; i686-NEXT:    subl $48, %esp155; i686-NEXT:    movl 24(%ebp), %ecx156; i686-NEXT:    movl 8(%ebp), %eax157; i686-NEXT:    movl 12(%ebp), %edx158; i686-NEXT:    movl 16(%ebp), %esi159; i686-NEXT:    movl 20(%ebp), %edi160; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)161; i686-NEXT:    movl %esi, {{[0-9]+}}(%esp)162; i686-NEXT:    movl %edx, {{[0-9]+}}(%esp)163; i686-NEXT:    movl %eax, {{[0-9]+}}(%esp)164; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)165; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)166; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)167; i686-NEXT:    movl $0, (%esp)168; i686-NEXT:    movl %ecx, %eax169; i686-NEXT:    shrb $3, %al170; i686-NEXT:    andb $12, %al171; i686-NEXT:    negb %al172; i686-NEXT:    movsbl %al, %edi173; i686-NEXT:    movl 20(%esp,%edi), %eax174; i686-NEXT:    movl 24(%esp,%edi), %ebx175; i686-NEXT:    movl %ebx, %esi176; i686-NEXT:    shldl %cl, %eax, %esi177; i686-NEXT:    movl 16(%esp,%edi), %edx178; i686-NEXT:    movl 28(%esp,%edi), %edi179; i686-NEXT:    shldl %cl, %ebx, %edi180; i686-NEXT:    movl 40(%ebp), %ebx181; i686-NEXT:    movl %edi, 12(%ebx)182; i686-NEXT:    movl %esi, 8(%ebx)183; i686-NEXT:    movl %edx, %esi184; i686-NEXT:    shll %cl, %esi185; i686-NEXT:    # kill: def $cl killed $cl killed $ecx186; i686-NEXT:    shldl %cl, %edx, %eax187; i686-NEXT:    movl %eax, 4(%ebx)188; i686-NEXT:    movl %esi, (%ebx)189; i686-NEXT:    leal -12(%ebp), %esp190; i686-NEXT:    popl %esi191; i686-NEXT:    popl %edi192; i686-NEXT:    popl %ebx193; i686-NEXT:    popl %ebp194; i686-NEXT:    retl195;196; x86_64-LABEL: test_shl_i128:197; x86_64:       # %bb.0: # %entry198; x86_64-NEXT:    movq %rdx, %rcx199; x86_64-NEXT:    shldq %cl, %rdi, %rsi200; x86_64-NEXT:    shlq %cl, %rdi201; x86_64-NEXT:    xorl %eax, %eax202; x86_64-NEXT:    testb $64, %cl203; x86_64-NEXT:    cmovneq %rdi, %rsi204; x86_64-NEXT:    cmoveq %rdi, %rax205; x86_64-NEXT:    movq %rsi, 8(%r8)206; x86_64-NEXT:    movq %rax, (%r8)207; x86_64-NEXT:    retq208entry:209	%0 = shl i128 %x, %a210	store i128 %0, ptr %r, align 16211	ret void212}213 214define void @test_lshr_i128_outofrange(i128 %x, ptr nocapture %r) nounwind {215; i686-LABEL: test_lshr_i128_outofrange:216; i686:       # %bb.0: # %entry217; i686-NEXT:    pushl %ebp218; i686-NEXT:    movl %esp, %ebp219; i686-NEXT:    andl $-16, %esp220; i686-NEXT:    movl %ebp, %esp221; i686-NEXT:    popl %ebp222; i686-NEXT:    retl223;224; x86_64-LABEL: test_lshr_i128_outofrange:225; x86_64:       # %bb.0: # %entry226; x86_64-NEXT:    retq227entry:228	%0 = lshr i128 %x, -1229	store i128 %0, ptr %r, align 16230	ret void231}232 233define void @test_ashr_i128_outofrange(i128 %x, ptr nocapture %r) nounwind {234; i686-LABEL: test_ashr_i128_outofrange:235; i686:       # %bb.0: # %entry236; i686-NEXT:    pushl %ebp237; i686-NEXT:    movl %esp, %ebp238; i686-NEXT:    andl $-16, %esp239; i686-NEXT:    movl %ebp, %esp240; i686-NEXT:    popl %ebp241; i686-NEXT:    retl242;243; x86_64-LABEL: test_ashr_i128_outofrange:244; x86_64:       # %bb.0: # %entry245; x86_64-NEXT:    retq246entry:247	%0 = ashr i128 %x, -1248	store i128 %0, ptr %r, align 16249	ret void250}251 252define void @test_shl_i128_outofrange(i128 %x, ptr nocapture %r) nounwind {253; i686-LABEL: test_shl_i128_outofrange:254; i686:       # %bb.0: # %entry255; i686-NEXT:    pushl %ebp256; i686-NEXT:    movl %esp, %ebp257; i686-NEXT:    andl $-16, %esp258; i686-NEXT:    movl %ebp, %esp259; i686-NEXT:    popl %ebp260; i686-NEXT:    retl261;262; x86_64-LABEL: test_shl_i128_outofrange:263; x86_64:       # %bb.0: # %entry264; x86_64-NEXT:    retq265entry:266	%0 = shl i128 %x, -1267	store i128 %0, ptr %r, align 16268	ret void269}270 271;272; Vectors273;274 275define void @test_lshr_v2i128(<2 x i128> %x, <2 x i128> %a, ptr nocapture %r) nounwind {276; i686-LABEL: test_lshr_v2i128:277; i686:       # %bb.0: # %entry278; i686-NEXT:    pushl %ebp279; i686-NEXT:    movl %esp, %ebp280; i686-NEXT:    pushl %ebx281; i686-NEXT:    pushl %edi282; i686-NEXT:    pushl %esi283; i686-NEXT:    andl $-16, %esp284; i686-NEXT:    subl $112, %esp285; i686-NEXT:    movl 40(%ebp), %edx286; i686-NEXT:    movl 24(%ebp), %eax287; i686-NEXT:    movl 28(%ebp), %ecx288; i686-NEXT:    movl 32(%ebp), %esi289; i686-NEXT:    movl 20(%ebp), %edi290; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)291; i686-NEXT:    movl 16(%ebp), %edi292; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)293; i686-NEXT:    movl 12(%ebp), %edi294; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)295; i686-NEXT:    movl 8(%ebp), %edi296; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)297; i686-NEXT:    movl 36(%ebp), %edi298; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)299; i686-NEXT:    movl %esi, {{[0-9]+}}(%esp)300; i686-NEXT:    movl %ecx, {{[0-9]+}}(%esp)301; i686-NEXT:    movl %eax, {{[0-9]+}}(%esp)302; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)303; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)304; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)305; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)306; i686-NEXT:    movl %edx, %ebx307; i686-NEXT:    andl $31, %ebx308; i686-NEXT:    shrl $3, %edx309; i686-NEXT:    andl $12, %edx310; i686-NEXT:    movl 40(%esp,%edx), %eax311; i686-NEXT:    movl 36(%esp,%edx), %esi312; i686-NEXT:    movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill313; i686-NEXT:    movl %ebx, %ecx314; i686-NEXT:    shrdl %cl, %eax, %esi315; i686-NEXT:    movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill316; i686-NEXT:    movl 32(%esp,%edx), %ecx317; i686-NEXT:    movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill318; i686-NEXT:    movl 44(%esp,%edx), %edx319; i686-NEXT:    movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill320; i686-NEXT:    movl %ebx, %ecx321; i686-NEXT:    movl %ebx, %esi322; i686-NEXT:    shrdl %cl, %edx, %eax323; i686-NEXT:    movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill324; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)325; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)326; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)327; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)328; i686-NEXT:    movl 56(%ebp), %edx329; i686-NEXT:    movl %edx, %eax330; i686-NEXT:    andl $31, %eax331; i686-NEXT:    shrl $3, %edx332; i686-NEXT:    andl $12, %edx333; i686-NEXT:    movl 72(%esp,%edx), %ebx334; i686-NEXT:    movl 68(%esp,%edx), %edi335; i686-NEXT:    movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill336; i686-NEXT:    movl %eax, %ecx337; i686-NEXT:    shrdl %cl, %ebx, %edi338; i686-NEXT:    movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill339; i686-NEXT:    movl 64(%esp,%edx), %edi340; i686-NEXT:    movl 76(%esp,%edx), %edx341; i686-NEXT:    shrdl %cl, %edx, %ebx342; i686-NEXT:    movl %esi, %ecx343; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload344; i686-NEXT:    shrdl %cl, %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill345; i686-NEXT:    # kill: def $cl killed $cl killed $ecx346; i686-NEXT:    shrl %cl, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill347; i686-NEXT:    movl %eax, %ecx348; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload349; i686-NEXT:    shrdl %cl, %esi, %edi350; i686-NEXT:    shrl %cl, %edx351; i686-NEXT:    movl 72(%ebp), %eax352; i686-NEXT:    movl %edx, 28(%eax)353; i686-NEXT:    movl %ebx, 24(%eax)354; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload355; i686-NEXT:    movl %ecx, 20(%eax)356; i686-NEXT:    movl %edi, 16(%eax)357; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload358; i686-NEXT:    movl %ecx, 12(%eax)359; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload360; i686-NEXT:    movl %ecx, 8(%eax)361; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload362; i686-NEXT:    movl %ecx, 4(%eax)363; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload364; i686-NEXT:    movl %ecx, (%eax)365; i686-NEXT:    leal -12(%ebp), %esp366; i686-NEXT:    popl %esi367; i686-NEXT:    popl %edi368; i686-NEXT:    popl %ebx369; i686-NEXT:    popl %ebp370; i686-NEXT:    retl371;372; x86_64-LABEL: test_lshr_v2i128:373; x86_64:       # %bb.0: # %entry374; x86_64-NEXT:    movq %rcx, %rax375; x86_64-NEXT:    movq {{[0-9]+}}(%rsp), %r10376; x86_64-NEXT:    movzbl {{[0-9]+}}(%rsp), %r9d377; x86_64-NEXT:    movl %r9d, %ecx378; x86_64-NEXT:    shrdq %cl, %rax, %rdx379; x86_64-NEXT:    movl %r8d, %ecx380; x86_64-NEXT:    shrdq %cl, %rsi, %rdi381; x86_64-NEXT:    shrq %cl, %rsi382; x86_64-NEXT:    xorl %r11d, %r11d383; x86_64-NEXT:    testb $64, %r8b384; x86_64-NEXT:    cmovneq %rsi, %rdi385; x86_64-NEXT:    cmovneq %r11, %rsi386; x86_64-NEXT:    movl %r9d, %ecx387; x86_64-NEXT:    shrq %cl, %rax388; x86_64-NEXT:    testb $64, %r9b389; x86_64-NEXT:    cmovneq %rax, %rdx390; x86_64-NEXT:    cmovneq %r11, %rax391; x86_64-NEXT:    movq %rax, 24(%r10)392; x86_64-NEXT:    movq %rdx, 16(%r10)393; x86_64-NEXT:    movq %rsi, 8(%r10)394; x86_64-NEXT:    movq %rdi, (%r10)395; x86_64-NEXT:    retq396entry:397	%0 = lshr <2 x i128> %x, %a398	store <2 x i128> %0, ptr %r, align 16399	ret void400}401 402define void @test_ashr_v2i128(<2 x i128> %x, <2 x i128> %a, ptr nocapture %r) nounwind {403; i686-LABEL: test_ashr_v2i128:404; i686:       # %bb.0: # %entry405; i686-NEXT:    pushl %ebp406; i686-NEXT:    movl %esp, %ebp407; i686-NEXT:    pushl %ebx408; i686-NEXT:    pushl %edi409; i686-NEXT:    pushl %esi410; i686-NEXT:    andl $-16, %esp411; i686-NEXT:    subl $112, %esp412; i686-NEXT:    movl 40(%ebp), %edx413; i686-NEXT:    movl 24(%ebp), %eax414; i686-NEXT:    movl 28(%ebp), %ecx415; i686-NEXT:    movl 32(%ebp), %esi416; i686-NEXT:    movl 16(%ebp), %edi417; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)418; i686-NEXT:    movl 12(%ebp), %edi419; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)420; i686-NEXT:    movl 8(%ebp), %edi421; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)422; i686-NEXT:    movl 20(%ebp), %edi423; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)424; i686-NEXT:    sarl $31, %edi425; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)426; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)427; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)428; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)429; i686-NEXT:    movl 36(%ebp), %edi430; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)431; i686-NEXT:    movl %esi, {{[0-9]+}}(%esp)432; i686-NEXT:    movl %ecx, {{[0-9]+}}(%esp)433; i686-NEXT:    movl %eax, {{[0-9]+}}(%esp)434; i686-NEXT:    sarl $31, %edi435; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)436; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)437; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)438; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)439; i686-NEXT:    movl %edx, %eax440; i686-NEXT:    andl $31, %eax441; i686-NEXT:    shrl $3, %edx442; i686-NEXT:    andl $12, %edx443; i686-NEXT:    movl 40(%esp,%edx), %esi444; i686-NEXT:    movl 36(%esp,%edx), %edi445; i686-NEXT:    movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill446; i686-NEXT:    movl %eax, %ecx447; i686-NEXT:    shrdl %cl, %esi, %edi448; i686-NEXT:    movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill449; i686-NEXT:    movl 32(%esp,%edx), %ecx450; i686-NEXT:    movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill451; i686-NEXT:    movl 44(%esp,%edx), %edx452; i686-NEXT:    movl %edx, (%esp) # 4-byte Spill453; i686-NEXT:    movl %eax, %ecx454; i686-NEXT:    shrdl %cl, %edx, %esi455; i686-NEXT:    movl %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill456; i686-NEXT:    movl 56(%ebp), %edx457; i686-NEXT:    movl %edx, %ebx458; i686-NEXT:    andl $31, %ebx459; i686-NEXT:    shrl $3, %edx460; i686-NEXT:    andl $12, %edx461; i686-NEXT:    movl 72(%esp,%edx), %esi462; i686-NEXT:    movl 68(%esp,%edx), %edi463; i686-NEXT:    movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill464; i686-NEXT:    movl %ebx, %ecx465; i686-NEXT:    shrdl %cl, %esi, %edi466; i686-NEXT:    movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill467; i686-NEXT:    movl 64(%esp,%edx), %ecx468; i686-NEXT:    movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill469; i686-NEXT:    movl 76(%esp,%edx), %edx470; i686-NEXT:    movl %ebx, %ecx471; i686-NEXT:    shrdl %cl, %edx, %esi472; i686-NEXT:    movl %eax, %ecx473; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload474; i686-NEXT:    shrdl %cl, %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill475; i686-NEXT:    sarl %cl, (%esp) # 4-byte Folded Spill476; i686-NEXT:    movl %ebx, %ecx477; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload478; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload479; i686-NEXT:    shrdl %cl, %eax, %edi480; i686-NEXT:    sarl %cl, %edx481; i686-NEXT:    movl 72(%ebp), %eax482; i686-NEXT:    movl %edx, 28(%eax)483; i686-NEXT:    movl %esi, 24(%eax)484; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload485; i686-NEXT:    movl %ecx, 20(%eax)486; i686-NEXT:    movl %edi, 16(%eax)487; i686-NEXT:    movl (%esp), %ecx # 4-byte Reload488; i686-NEXT:    movl %ecx, 12(%eax)489; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload490; i686-NEXT:    movl %ecx, 8(%eax)491; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload492; i686-NEXT:    movl %ecx, 4(%eax)493; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload494; i686-NEXT:    movl %ecx, (%eax)495; i686-NEXT:    leal -12(%ebp), %esp496; i686-NEXT:    popl %esi497; i686-NEXT:    popl %edi498; i686-NEXT:    popl %ebx499; i686-NEXT:    popl %ebp500; i686-NEXT:    retl501;502; x86_64-LABEL: test_ashr_v2i128:503; x86_64:       # %bb.0: # %entry504; x86_64-NEXT:    movq %rcx, %rax505; x86_64-NEXT:    movq {{[0-9]+}}(%rsp), %r10506; x86_64-NEXT:    movzbl {{[0-9]+}}(%rsp), %r9d507; x86_64-NEXT:    movl %r9d, %ecx508; x86_64-NEXT:    shrdq %cl, %rax, %rdx509; x86_64-NEXT:    movl %r8d, %ecx510; x86_64-NEXT:    shrdq %cl, %rsi, %rdi511; x86_64-NEXT:    movq %rsi, %r11512; x86_64-NEXT:    sarq %cl, %r11513; x86_64-NEXT:    sarq $63, %rsi514; x86_64-NEXT:    testb $64, %r8b515; x86_64-NEXT:    cmovneq %r11, %rdi516; x86_64-NEXT:    cmoveq %r11, %rsi517; x86_64-NEXT:    movq %rax, %r8518; x86_64-NEXT:    movl %r9d, %ecx519; x86_64-NEXT:    sarq %cl, %r8520; x86_64-NEXT:    sarq $63, %rax521; x86_64-NEXT:    testb $64, %r9b522; x86_64-NEXT:    cmovneq %r8, %rdx523; x86_64-NEXT:    cmoveq %r8, %rax524; x86_64-NEXT:    movq %rax, 24(%r10)525; x86_64-NEXT:    movq %rdx, 16(%r10)526; x86_64-NEXT:    movq %rsi, 8(%r10)527; x86_64-NEXT:    movq %rdi, (%r10)528; x86_64-NEXT:    retq529entry:530	%0 = ashr <2 x i128> %x, %a531	store <2 x i128> %0, ptr %r, align 16532	ret void533}534 535define void @test_shl_v2i128(<2 x i128> %x, <2 x i128> %a, ptr nocapture %r) nounwind {536; i686-LABEL: test_shl_v2i128:537; i686:       # %bb.0: # %entry538; i686-NEXT:    pushl %ebp539; i686-NEXT:    movl %esp, %ebp540; i686-NEXT:    pushl %ebx541; i686-NEXT:    pushl %edi542; i686-NEXT:    pushl %esi543; i686-NEXT:    andl $-16, %esp544; i686-NEXT:    subl $128, %esp545; i686-NEXT:    movl 40(%ebp), %edi546; i686-NEXT:    movl 24(%ebp), %eax547; i686-NEXT:    movl 28(%ebp), %ecx548; i686-NEXT:    movl 32(%ebp), %edx549; i686-NEXT:    movl 20(%ebp), %esi550; i686-NEXT:    movl %esi, {{[0-9]+}}(%esp)551; i686-NEXT:    movl 16(%ebp), %esi552; i686-NEXT:    movl %esi, {{[0-9]+}}(%esp)553; i686-NEXT:    movl 12(%ebp), %esi554; i686-NEXT:    movl %esi, {{[0-9]+}}(%esp)555; i686-NEXT:    movl 8(%ebp), %esi556; i686-NEXT:    movl %esi, {{[0-9]+}}(%esp)557; i686-NEXT:    movl 36(%ebp), %esi558; i686-NEXT:    movl %esi, {{[0-9]+}}(%esp)559; i686-NEXT:    movl %edx, {{[0-9]+}}(%esp)560; i686-NEXT:    movl %ecx, {{[0-9]+}}(%esp)561; i686-NEXT:    movl %eax, {{[0-9]+}}(%esp)562; i686-NEXT:    movl %edi, %ebx563; i686-NEXT:    shrl $3, %ebx564; i686-NEXT:    andl $12, %ebx565; i686-NEXT:    leal {{[0-9]+}}(%esp), %eax566; i686-NEXT:    subl %ebx, %eax567; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)568; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)569; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)570; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)571; i686-NEXT:    movl (%eax), %esi572; i686-NEXT:    movl 4(%eax), %edx573; i686-NEXT:    movl %edx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill574; i686-NEXT:    movl 8(%eax), %eax575; i686-NEXT:    movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill576; i686-NEXT:    movl %edi, %ecx577; i686-NEXT:    andl $31, %ecx578; i686-NEXT:    movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill579; i686-NEXT:    # kill: def $cl killed $cl killed $ecx580; i686-NEXT:    shldl %cl, %edx, %eax581; i686-NEXT:    movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill582; i686-NEXT:    movl 56(%ebp), %eax583; i686-NEXT:    movl %eax, %edx584; i686-NEXT:    shrl $3, %edx585; i686-NEXT:    andl $12, %edx586; i686-NEXT:    leal {{[0-9]+}}(%esp), %ecx587; i686-NEXT:    subl %edx, %ecx588; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)589; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)590; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)591; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)592; i686-NEXT:    movl (%ecx), %edi593; i686-NEXT:    movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill594; i686-NEXT:    movl 4(%ecx), %edi595; i686-NEXT:    movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill596; i686-NEXT:    movl 8(%ecx), %ecx597; i686-NEXT:    movl %ecx, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill598; i686-NEXT:    andl $31, %eax599; i686-NEXT:    movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill600; i686-NEXT:    movl %ecx, %eax601; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload602; i686-NEXT:    # kill: def $cl killed $cl killed $ecx603; i686-NEXT:    shldl %cl, %edi, %eax604; i686-NEXT:    movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill605; i686-NEXT:    movl %esi, %eax606; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload607; i686-NEXT:    shll %cl, %eax608; i686-NEXT:    movl %eax, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill609; i686-NEXT:    shldl %cl, %esi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill610; i686-NEXT:    negl %ebx611; i686-NEXT:    movl 76(%esp,%ebx), %ebx612; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %esi # 4-byte Reload613; i686-NEXT:    shldl %cl, %esi, %ebx614; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %edi # 4-byte Reload615; i686-NEXT:    movl %edi, %esi616; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload617; i686-NEXT:    shll %cl, %esi618; i686-NEXT:    shldl %cl, %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Folded Spill619; i686-NEXT:    negl %edx620; i686-NEXT:    movl 108(%esp,%edx), %edx621; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %eax # 4-byte Reload622; i686-NEXT:    shldl %cl, %eax, %edx623; i686-NEXT:    movl 72(%ebp), %eax624; i686-NEXT:    movl %edx, 28(%eax)625; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload626; i686-NEXT:    movl %ecx, 24(%eax)627; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload628; i686-NEXT:    movl %ecx, 20(%eax)629; i686-NEXT:    movl %esi, 16(%eax)630; i686-NEXT:    movl %ebx, 12(%eax)631; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload632; i686-NEXT:    movl %ecx, 8(%eax)633; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload634; i686-NEXT:    movl %ecx, 4(%eax)635; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload636; i686-NEXT:    movl %ecx, (%eax)637; i686-NEXT:    leal -12(%ebp), %esp638; i686-NEXT:    popl %esi639; i686-NEXT:    popl %edi640; i686-NEXT:    popl %ebx641; i686-NEXT:    popl %ebp642; i686-NEXT:    retl643;644; x86_64-LABEL: test_shl_v2i128:645; x86_64:       # %bb.0: # %entry646; x86_64-NEXT:    movq %rcx, %rax647; x86_64-NEXT:    movq {{[0-9]+}}(%rsp), %r10648; x86_64-NEXT:    movzbl {{[0-9]+}}(%rsp), %r9d649; x86_64-NEXT:    movl %r9d, %ecx650; x86_64-NEXT:    shldq %cl, %rdx, %rax651; x86_64-NEXT:    movl %r8d, %ecx652; x86_64-NEXT:    shldq %cl, %rdi, %rsi653; x86_64-NEXT:    shlq %cl, %rdi654; x86_64-NEXT:    xorl %r11d, %r11d655; x86_64-NEXT:    testb $64, %r8b656; x86_64-NEXT:    cmovneq %rdi, %rsi657; x86_64-NEXT:    cmovneq %r11, %rdi658; x86_64-NEXT:    movl %r9d, %ecx659; x86_64-NEXT:    shlq %cl, %rdx660; x86_64-NEXT:    testb $64, %r9b661; x86_64-NEXT:    cmovneq %rdx, %rax662; x86_64-NEXT:    cmovneq %r11, %rdx663; x86_64-NEXT:    movq %rax, 24(%r10)664; x86_64-NEXT:    movq %rdx, 16(%r10)665; x86_64-NEXT:    movq %rsi, 8(%r10)666; x86_64-NEXT:    movq %rdi, (%r10)667; x86_64-NEXT:    retq668entry:669	%0 = shl <2 x i128> %x, %a670	store <2 x i128> %0, ptr %r, align 16671	ret void672}673 674define void @test_lshr_v2i128_outofrange(<2 x i128> %x, ptr nocapture %r) nounwind {675; ALL-LABEL: test_lshr_v2i128_outofrange:676; ALL:       # %bb.0: # %entry677; ALL-NEXT:    ret{{[l|q]}}678entry:679	%0 = lshr <2 x i128> %x, <i128 -1, i128 -1>680	store <2 x i128> %0, ptr %r, align 16681	ret void682}683 684define void @test_ashr_v2i128_outofrange(<2 x i128> %x, ptr nocapture %r) nounwind {685; ALL-LABEL: test_ashr_v2i128_outofrange:686; ALL:       # %bb.0: # %entry687; ALL-NEXT:    ret{{[l|q]}}688entry:689	%0 = ashr <2 x i128> %x, <i128 -1, i128 -1>690	store <2 x i128> %0, ptr %r, align 16691	ret void692}693 694define void @test_shl_v2i128_outofrange(<2 x i128> %x, ptr nocapture %r) nounwind {695; ALL-LABEL: test_shl_v2i128_outofrange:696; ALL:       # %bb.0: # %entry697; ALL-NEXT:    ret{{[l|q]}}698entry:699	%0 = shl <2 x i128> %x, <i128 -1, i128 -1>700	store <2 x i128> %0, ptr %r, align 16701	ret void702}703 704define void @test_lshr_v2i128_outofrange_sum(<2 x i128> %x, ptr nocapture %r) nounwind {705; i686-LABEL: test_lshr_v2i128_outofrange_sum:706; i686:       # %bb.0: # %entry707; i686-NEXT:    movl {{[0-9]+}}(%esp), %eax708; i686-NEXT:    movl $0, 28(%eax)709; i686-NEXT:    movl $0, 24(%eax)710; i686-NEXT:    movl $0, 20(%eax)711; i686-NEXT:    movl $0, 16(%eax)712; i686-NEXT:    movl $0, 12(%eax)713; i686-NEXT:    movl $0, 8(%eax)714; i686-NEXT:    movl $0, 4(%eax)715; i686-NEXT:    movl $0, (%eax)716; i686-NEXT:    retl717;718; x86_64-LABEL: test_lshr_v2i128_outofrange_sum:719; x86_64:       # %bb.0: # %entry720; x86_64-NEXT:    xorps %xmm0, %xmm0721; x86_64-NEXT:    movaps %xmm0, 16(%r8)722; x86_64-NEXT:    movaps %xmm0, (%r8)723; x86_64-NEXT:    retq724entry:725	%0 = lshr <2 x i128> %x, <i128 -1, i128 -1>726	%1 = lshr <2 x i128> %0, <i128  1, i128  1>727	store <2 x i128> %1, ptr %r, align 16728	ret void729}730 731define void @test_ashr_v2i128_outofrange_sum(<2 x i128> %x, ptr nocapture %r) nounwind {732; i686-LABEL: test_ashr_v2i128_outofrange_sum:733; i686:       # %bb.0: # %entry734; i686-NEXT:    movl {{[0-9]+}}(%esp), %eax735; i686-NEXT:    movl $0, 28(%eax)736; i686-NEXT:    movl $0, 24(%eax)737; i686-NEXT:    movl $0, 20(%eax)738; i686-NEXT:    movl $0, 16(%eax)739; i686-NEXT:    movl $0, 12(%eax)740; i686-NEXT:    movl $0, 8(%eax)741; i686-NEXT:    movl $0, 4(%eax)742; i686-NEXT:    movl $0, (%eax)743; i686-NEXT:    retl744;745; x86_64-LABEL: test_ashr_v2i128_outofrange_sum:746; x86_64:       # %bb.0: # %entry747; x86_64-NEXT:    xorps %xmm0, %xmm0748; x86_64-NEXT:    movaps %xmm0, 16(%r8)749; x86_64-NEXT:    movaps %xmm0, (%r8)750; x86_64-NEXT:    retq751entry:752	%0 = ashr <2 x i128> %x, <i128 -1, i128 -1>753	%1 = ashr <2 x i128> %0, <i128  1, i128  1>754	store <2 x i128> %1, ptr %r, align 16755	ret void756}757 758define void @test_shl_v2i128_outofrange_sum(<2 x i128> %x, ptr nocapture %r) nounwind {759; i686-LABEL: test_shl_v2i128_outofrange_sum:760; i686:       # %bb.0: # %entry761; i686-NEXT:    movl {{[0-9]+}}(%esp), %eax762; i686-NEXT:    movl $0, 28(%eax)763; i686-NEXT:    movl $0, 24(%eax)764; i686-NEXT:    movl $0, 20(%eax)765; i686-NEXT:    movl $0, 16(%eax)766; i686-NEXT:    movl $0, 12(%eax)767; i686-NEXT:    movl $0, 8(%eax)768; i686-NEXT:    movl $0, 4(%eax)769; i686-NEXT:    movl $0, (%eax)770; i686-NEXT:    retl771;772; x86_64-LABEL: test_shl_v2i128_outofrange_sum:773; x86_64:       # %bb.0: # %entry774; x86_64-NEXT:    xorps %xmm0, %xmm0775; x86_64-NEXT:    movaps %xmm0, 16(%r8)776; x86_64-NEXT:    movaps %xmm0, (%r8)777; x86_64-NEXT:    retq778entry:779	%0 = shl <2 x i128> %x, <i128 -1, i128 -1>780	%1 = shl <2 x i128> %0, <i128  1, i128  1>781	store <2 x i128> %1, ptr %r, align 16782	ret void783}784 785;786; Combines787;788 789define <2 x i256> @shl_sext_shl_outofrange(<2 x i128> %a0) {790; i686-LABEL: shl_sext_shl_outofrange:791; i686:       # %bb.0:792; i686-NEXT:    movl {{[0-9]+}}(%esp), %eax793; i686-NEXT:    movl $0, 60(%eax)794; i686-NEXT:    movl $0, 56(%eax)795; i686-NEXT:    movl $0, 52(%eax)796; i686-NEXT:    movl $0, 48(%eax)797; i686-NEXT:    movl $0, 44(%eax)798; i686-NEXT:    movl $0, 40(%eax)799; i686-NEXT:    movl $0, 36(%eax)800; i686-NEXT:    movl $0, 32(%eax)801; i686-NEXT:    movl $0, 28(%eax)802; i686-NEXT:    movl $0, 24(%eax)803; i686-NEXT:    movl $0, 20(%eax)804; i686-NEXT:    movl $0, 16(%eax)805; i686-NEXT:    movl $0, 12(%eax)806; i686-NEXT:    movl $0, 8(%eax)807; i686-NEXT:    movl $0, 4(%eax)808; i686-NEXT:    movl $0, (%eax)809; i686-NEXT:    retl $4810;811; x86_64-LABEL: shl_sext_shl_outofrange:812; x86_64:       # %bb.0:813; x86_64-NEXT:    movq %rdi, %rax814; x86_64-NEXT:    xorps %xmm0, %xmm0815; x86_64-NEXT:    movaps %xmm0, 48(%rdi)816; x86_64-NEXT:    movaps %xmm0, 32(%rdi)817; x86_64-NEXT:    movaps %xmm0, 16(%rdi)818; x86_64-NEXT:    movaps %xmm0, (%rdi)819; x86_64-NEXT:    retq820  %1 = shl <2 x i128> %a0, <i128 -1, i128 -1>821  %2 = sext <2 x i128> %1 to <2 x i256>822  %3 = shl <2 x i256> %2, <i256 128, i256 128>823  ret <2 x i256> %3824}825 826define <2 x i256> @shl_zext_shl_outofrange(<2 x i128> %a0) {827; i686-LABEL: shl_zext_shl_outofrange:828; i686:       # %bb.0:829; i686-NEXT:    movl {{[0-9]+}}(%esp), %eax830; i686-NEXT:    movl $0, 60(%eax)831; i686-NEXT:    movl $0, 56(%eax)832; i686-NEXT:    movl $0, 52(%eax)833; i686-NEXT:    movl $0, 48(%eax)834; i686-NEXT:    movl $0, 44(%eax)835; i686-NEXT:    movl $0, 40(%eax)836; i686-NEXT:    movl $0, 36(%eax)837; i686-NEXT:    movl $0, 32(%eax)838; i686-NEXT:    movl $0, 28(%eax)839; i686-NEXT:    movl $0, 24(%eax)840; i686-NEXT:    movl $0, 20(%eax)841; i686-NEXT:    movl $0, 16(%eax)842; i686-NEXT:    movl $0, 12(%eax)843; i686-NEXT:    movl $0, 8(%eax)844; i686-NEXT:    movl $0, 4(%eax)845; i686-NEXT:    movl $0, (%eax)846; i686-NEXT:    retl $4847;848; x86_64-LABEL: shl_zext_shl_outofrange:849; x86_64:       # %bb.0:850; x86_64-NEXT:    movq %rdi, %rax851; x86_64-NEXT:    xorps %xmm0, %xmm0852; x86_64-NEXT:    movaps %xmm0, 48(%rdi)853; x86_64-NEXT:    movaps %xmm0, 32(%rdi)854; x86_64-NEXT:    movaps %xmm0, 16(%rdi)855; x86_64-NEXT:    movaps %xmm0, (%rdi)856; x86_64-NEXT:    retq857  %1 = shl <2 x i128> %a0, <i128 -1, i128 -1>858  %2 = zext <2 x i128> %1 to <2 x i256>859  %3 = shl <2 x i256> %2, <i256 128, i256 128>860  ret <2 x i256> %3861}862 863define <2 x i256> @shl_zext_lshr_outofrange(<2 x i128> %a0) {864; i686-LABEL: shl_zext_lshr_outofrange:865; i686:       # %bb.0:866; i686-NEXT:    movl {{[0-9]+}}(%esp), %eax867; i686-NEXT:    movl $0, 60(%eax)868; i686-NEXT:    movl $0, 56(%eax)869; i686-NEXT:    movl $0, 52(%eax)870; i686-NEXT:    movl $0, 48(%eax)871; i686-NEXT:    movl $0, 44(%eax)872; i686-NEXT:    movl $0, 40(%eax)873; i686-NEXT:    movl $0, 36(%eax)874; i686-NEXT:    movl $0, 32(%eax)875; i686-NEXT:    movl $0, 28(%eax)876; i686-NEXT:    movl $0, 24(%eax)877; i686-NEXT:    movl $0, 20(%eax)878; i686-NEXT:    movl $0, 16(%eax)879; i686-NEXT:    movl $0, 12(%eax)880; i686-NEXT:    movl $0, 8(%eax)881; i686-NEXT:    movl $0, 4(%eax)882; i686-NEXT:    movl $0, (%eax)883; i686-NEXT:    retl $4884;885; x86_64-LABEL: shl_zext_lshr_outofrange:886; x86_64:       # %bb.0:887; x86_64-NEXT:    movq %rdi, %rax888; x86_64-NEXT:    xorps %xmm0, %xmm0889; x86_64-NEXT:    movaps %xmm0, 48(%rdi)890; x86_64-NEXT:    movaps %xmm0, 32(%rdi)891; x86_64-NEXT:    movaps %xmm0, 16(%rdi)892; x86_64-NEXT:    movaps %xmm0, (%rdi)893; x86_64-NEXT:    retq894  %1 = lshr <2 x i128> %a0, <i128 -1, i128 -1>895  %2 = zext <2 x i128> %1 to <2 x i256>896  %3 = shl <2 x i256> %2, <i256 128, i256 128>897  ret <2 x i256> %3898}899 900define i128 @lshr_shl_mask(i128 %a0) {901; i686-LABEL: lshr_shl_mask:902; i686:       # %bb.0:903; i686-NEXT:    pushl %ebp904; i686-NEXT:    .cfi_def_cfa_offset 8905; i686-NEXT:    .cfi_offset %ebp, -8906; i686-NEXT:    movl %esp, %ebp907; i686-NEXT:    .cfi_def_cfa_register %ebp908; i686-NEXT:    pushl %edi909; i686-NEXT:    pushl %esi910; i686-NEXT:    andl $-16, %esp911; i686-NEXT:    .cfi_offset %esi, -16912; i686-NEXT:    .cfi_offset %edi, -12913; i686-NEXT:    movl 8(%ebp), %eax914; i686-NEXT:    movl 24(%ebp), %ecx915; i686-NEXT:    movl 28(%ebp), %edx916; i686-NEXT:    movl 32(%ebp), %esi917; i686-NEXT:    movl $2147483647, %edi # imm = 0x7FFFFFFF918; i686-NEXT:    andl 36(%ebp), %edi919; i686-NEXT:    movl %edi, 12(%eax)920; i686-NEXT:    movl %esi, 8(%eax)921; i686-NEXT:    movl %edx, 4(%eax)922; i686-NEXT:    movl %ecx, (%eax)923; i686-NEXT:    leal -8(%ebp), %esp924; i686-NEXT:    popl %esi925; i686-NEXT:    popl %edi926; i686-NEXT:    popl %ebp927; i686-NEXT:    .cfi_def_cfa %esp, 4928; i686-NEXT:    retl $4929;930; x86_64-LABEL: lshr_shl_mask:931; x86_64:       # %bb.0:932; x86_64-NEXT:    movq %rdi, %rax933; x86_64-NEXT:    movabsq $9223372036854775807, %rdx # imm = 0x7FFFFFFFFFFFFFFF934; x86_64-NEXT:    andq %rsi, %rdx935; x86_64-NEXT:    retq936  %1 = shl i128 %a0, 1937  %2 = lshr i128 %1, 1938  ret i128 %2939}940 941define i128 @shift_i128_limited_shamt(i128 noundef %a, i32 noundef %b) nounwind {942; i686-LABEL: shift_i128_limited_shamt:943; i686:       # %bb.0: # %start944; i686-NEXT:    pushl %ebp945; i686-NEXT:    movl %esp, %ebp946; i686-NEXT:    pushl %ebx947; i686-NEXT:    pushl %edi948; i686-NEXT:    pushl %esi949; i686-NEXT:    andl $-16, %esp950; i686-NEXT:    subl $16, %esp951; i686-NEXT:    movl 32(%ebp), %ebx952; i686-NEXT:    movl 28(%ebp), %edi953; i686-NEXT:    movzbl 40(%ebp), %ecx954; i686-NEXT:    movb $6, %dl955; i686-NEXT:    subb %cl, %dl956; i686-NEXT:    addb $-7, %cl957; i686-NEXT:    movl %edi, %eax958; i686-NEXT:    shrl %eax959; i686-NEXT:    shrl %cl, %eax960; i686-NEXT:    movl %edx, %ecx961; i686-NEXT:    shll %cl, %ebx962; i686-NEXT:    orl %eax, %ebx963; i686-NEXT:    movl 24(%ebp), %esi964; i686-NEXT:    movl %esi, %eax965; i686-NEXT:    shll %cl, %eax966; i686-NEXT:    shldl %cl, %esi, %edi967; i686-NEXT:    movl %edi, {{[-0-9]+}}(%e{{[sb]}}p) # 4-byte Spill968; i686-NEXT:    movl 8(%ebp), %edi969; i686-NEXT:    movl 36(%ebp), %esi970; i686-NEXT:    movl 32(%ebp), %edx971; i686-NEXT:    shldl %cl, %edx, %esi972; i686-NEXT:    movl %esi, 12(%edi)973; i686-NEXT:    movl %ebx, 8(%edi)974; i686-NEXT:    movl {{[-0-9]+}}(%e{{[sb]}}p), %ecx # 4-byte Reload975; i686-NEXT:    movl %ecx, 4(%edi)976; i686-NEXT:    movl %eax, (%edi)977; i686-NEXT:    movl %edi, %eax978; i686-NEXT:    leal -12(%ebp), %esp979; i686-NEXT:    popl %esi980; i686-NEXT:    popl %edi981; i686-NEXT:    popl %ebx982; i686-NEXT:    popl %ebp983; i686-NEXT:    retl $4984;985; x86_64-LABEL: shift_i128_limited_shamt:986; x86_64:       # %bb.0: # %start987; x86_64-NEXT:    movq %rdi, %rax988; x86_64-NEXT:    movb $6, %cl989; x86_64-NEXT:    subb %dl, %cl990; x86_64-NEXT:    shldq %cl, %rdi, %rsi991; x86_64-NEXT:    shlq %cl, %rax992; x86_64-NEXT:    movq %rsi, %rdx993; x86_64-NEXT:    retq994start:995  %shamt = sub nuw nsw i32 6, %b996  %ext = zext nneg i32 %shamt to i128997  %res = shl i128 %a, %ext998  ret i128 %res999}1000 1001define i128 @shift_i128_limited_shamt_no_nuw(i128 noundef %a, i32 noundef %b) nounwind {1002; i686-LABEL: shift_i128_limited_shamt_no_nuw:1003; i686:       # %bb.0: # %start1004; i686-NEXT:    pushl %ebp1005; i686-NEXT:    movl %esp, %ebp1006; i686-NEXT:    pushl %ebx1007; i686-NEXT:    pushl %edi1008; i686-NEXT:    pushl %esi1009; i686-NEXT:    andl $-16, %esp1010; i686-NEXT:    subl $48, %esp1011; i686-NEXT:    movzbl 40(%ebp), %eax1012; i686-NEXT:    movl 24(%ebp), %ecx1013; i686-NEXT:    movl 28(%ebp), %edx1014; i686-NEXT:    movl 32(%ebp), %esi1015; i686-NEXT:    movl 36(%ebp), %edi1016; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)1017; i686-NEXT:    movl %esi, {{[0-9]+}}(%esp)1018; i686-NEXT:    movl %edx, {{[0-9]+}}(%esp)1019; i686-NEXT:    movl %ecx, {{[0-9]+}}(%esp)1020; i686-NEXT:    movb $6, %cl1021; i686-NEXT:    subb %al, %cl1022; i686-NEXT:    movl %ecx, %eax1023; i686-NEXT:    shrb $3, %al1024; i686-NEXT:    andb $12, %al1025; i686-NEXT:    negb %al1026; i686-NEXT:    movsbl %al, %eax1027; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)1028; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)1029; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)1030; i686-NEXT:    movl $0, (%esp)1031; i686-NEXT:    movl 20(%esp,%eax), %edx1032; i686-NEXT:    movl 24(%esp,%eax), %ebx1033; i686-NEXT:    movl %ebx, %edi1034; i686-NEXT:    shldl %cl, %edx, %edi1035; i686-NEXT:    movl 16(%esp,%eax), %esi1036; i686-NEXT:    movl 28(%esp,%eax), %eax1037; i686-NEXT:    shldl %cl, %ebx, %eax1038; i686-NEXT:    movl 8(%ebp), %ebx1039; i686-NEXT:    movl %eax, 12(%ebx)1040; i686-NEXT:    movl %edi, 8(%ebx)1041; i686-NEXT:    movl %esi, %eax1042; i686-NEXT:    shll %cl, %eax1043; i686-NEXT:    shldl %cl, %esi, %edx1044; i686-NEXT:    movl %edx, 4(%ebx)1045; i686-NEXT:    movl %eax, (%ebx)1046; i686-NEXT:    movl %ebx, %eax1047; i686-NEXT:    leal -12(%ebp), %esp1048; i686-NEXT:    popl %esi1049; i686-NEXT:    popl %edi1050; i686-NEXT:    popl %ebx1051; i686-NEXT:    popl %ebp1052; i686-NEXT:    retl $41053;1054; x86_64-LABEL: shift_i128_limited_shamt_no_nuw:1055; x86_64:       # %bb.0: # %start1056; x86_64-NEXT:    movb $6, %cl1057; x86_64-NEXT:    subb %dl, %cl1058; x86_64-NEXT:    shldq %cl, %rdi, %rsi1059; x86_64-NEXT:    shlq %cl, %rdi1060; x86_64-NEXT:    xorl %eax, %eax1061; x86_64-NEXT:    testb $64, %cl1062; x86_64-NEXT:    cmovneq %rdi, %rsi1063; x86_64-NEXT:    cmoveq %rdi, %rax1064; x86_64-NEXT:    movq %rsi, %rdx1065; x86_64-NEXT:    retq1066start:1067  %shamt = sub nsw i32 6, %b1068  %ext = zext nneg i32 %shamt to i1281069  %res = shl i128 %a, %ext1070  ret i128 %res1071}1072 1073define i128 @shift_i128_limited_shamt_unknown_lhs(i128 noundef %a, i32 noundef %b, i32 noundef %c) nounwind {1074; i686-LABEL: shift_i128_limited_shamt_unknown_lhs:1075; i686:       # %bb.0: # %start1076; i686-NEXT:    pushl %ebp1077; i686-NEXT:    movl %esp, %ebp1078; i686-NEXT:    pushl %ebx1079; i686-NEXT:    pushl %edi1080; i686-NEXT:    pushl %esi1081; i686-NEXT:    andl $-16, %esp1082; i686-NEXT:    subl $48, %esp1083; i686-NEXT:    movl 24(%ebp), %eax1084; i686-NEXT:    movl 28(%ebp), %edx1085; i686-NEXT:    movl 32(%ebp), %esi1086; i686-NEXT:    movl 36(%ebp), %edi1087; i686-NEXT:    movl 44(%ebp), %ecx1088; i686-NEXT:    subl 40(%ebp), %ecx1089; i686-NEXT:    movl %edi, {{[0-9]+}}(%esp)1090; i686-NEXT:    movl %esi, {{[0-9]+}}(%esp)1091; i686-NEXT:    movl %edx, {{[0-9]+}}(%esp)1092; i686-NEXT:    movl %eax, {{[0-9]+}}(%esp)1093; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)1094; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)1095; i686-NEXT:    movl $0, {{[0-9]+}}(%esp)1096; i686-NEXT:    movl $0, (%esp)1097; i686-NEXT:    movl %ecx, %eax1098; i686-NEXT:    shrb $3, %al1099; i686-NEXT:    andb $12, %al1100; i686-NEXT:    negb %al1101; i686-NEXT:    movsbl %al, %eax1102; i686-NEXT:    movl 20(%esp,%eax), %edx1103; i686-NEXT:    movl 24(%esp,%eax), %ebx1104; i686-NEXT:    movl %ebx, %edi1105; i686-NEXT:    shldl %cl, %edx, %edi1106; i686-NEXT:    movl 16(%esp,%eax), %esi1107; i686-NEXT:    movl 28(%esp,%eax), %eax1108; i686-NEXT:    shldl %cl, %ebx, %eax1109; i686-NEXT:    movl 8(%ebp), %ebx1110; i686-NEXT:    movl %eax, 12(%ebx)1111; i686-NEXT:    movl %edi, 8(%ebx)1112; i686-NEXT:    movl %esi, %eax1113; i686-NEXT:    shll %cl, %eax1114; i686-NEXT:    # kill: def $cl killed $cl killed $ecx1115; i686-NEXT:    shldl %cl, %esi, %edx1116; i686-NEXT:    movl %edx, 4(%ebx)1117; i686-NEXT:    movl %eax, (%ebx)1118; i686-NEXT:    movl %ebx, %eax1119; i686-NEXT:    leal -12(%ebp), %esp1120; i686-NEXT:    popl %esi1121; i686-NEXT:    popl %edi1122; i686-NEXT:    popl %ebx1123; i686-NEXT:    popl %ebp1124; i686-NEXT:    retl $41125;1126; x86_64-LABEL: shift_i128_limited_shamt_unknown_lhs:1127; x86_64:       # %bb.0: # %start1128; x86_64-NEXT:    subl %edx, %ecx1129; x86_64-NEXT:    shldq %cl, %rdi, %rsi1130; x86_64-NEXT:    shlq %cl, %rdi1131; x86_64-NEXT:    xorl %eax, %eax1132; x86_64-NEXT:    testb $64, %cl1133; x86_64-NEXT:    cmovneq %rdi, %rsi1134; x86_64-NEXT:    cmoveq %rdi, %rax1135; x86_64-NEXT:    movq %rsi, %rdx1136; x86_64-NEXT:    retq1137start:1138  %shamt = sub nuw nsw i32 %c, %b1139  %ext = zext nneg i32 %shamt to i1281140  %res = shl i128 %a, %ext1141  ret i128 %res1142}1143