brintos

brintos / llvm-project-archived public Read only

0
0
Text · 15.6 KiB · cabeebb Raw
484 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+bmi,+bmi2,+cmov | FileCheck %s --check-prefix=X863; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+bmi,+bmi2 | FileCheck %s --check-prefix=X644; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+bmi,+bmi2,+egpr --show-mc-encoding | FileCheck %s --check-prefix=EGPR5 6define i32 @bzhi32(i32 %x, i32 %y)   {7; X86-LABEL: bzhi32:8; X86:       # %bb.0:9; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax10; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx11; X86-NEXT:    addl %ecx, %ecx12; X86-NEXT:    bzhil %eax, %ecx, %eax13; X86-NEXT:    retl14;15; X64-LABEL: bzhi32:16; X64:       # %bb.0:17; X64-NEXT:    addl %edi, %edi18; X64-NEXT:    bzhil %esi, %edi, %eax19; X64-NEXT:    retq20;21; EGPR-LABEL: bzhi32:22; EGPR:       # %bb.0:23; EGPR-NEXT:    addl %edi, %edi # encoding: [0x01,0xff]24; EGPR-NEXT:    bzhil %esi, %edi, %eax # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x48,0xf5,0xc7]25; EGPR-NEXT:    retq # encoding: [0xc3]26  %x1 = add i32 %x, %x27  %tmp = tail call i32 @llvm.x86.bmi.bzhi.32(i32 %x1, i32 %y)28  ret i32 %tmp29}30 31define i32 @bzhi32_load(ptr %x, i32 %y)   {32; X86-LABEL: bzhi32_load:33; X86:       # %bb.0:34; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax35; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx36; X86-NEXT:    bzhil %eax, (%ecx), %eax37; X86-NEXT:    retl38;39; X64-LABEL: bzhi32_load:40; X64:       # %bb.0:41; X64-NEXT:    bzhil %esi, (%rdi), %eax42; X64-NEXT:    retq43;44; EGPR-LABEL: bzhi32_load:45; EGPR:       # %bb.0:46; EGPR-NEXT:    bzhil %esi, (%rdi), %eax # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x48,0xf5,0x07]47; EGPR-NEXT:    retq # encoding: [0xc3]48  %x1 = load i32, ptr %x49  %tmp = tail call i32 @llvm.x86.bmi.bzhi.32(i32 %x1, i32 %y)50  ret i32 %tmp51}52 53; PR48768 - 'bzhi' clears the overflow flag, so we don't need a separate 'test'.54define i1 @bzhi32_overflow(i32 %x, i32 %y) {55; X86-LABEL: bzhi32_overflow:56; X86:       # %bb.0:57; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax58; X86-NEXT:    bzhil %eax, {{[0-9]+}}(%esp), %eax59; X86-NEXT:    setle %al60; X86-NEXT:    retl61;62; X64-LABEL: bzhi32_overflow:63; X64:       # %bb.0:64; X64-NEXT:    bzhil %esi, %edi, %eax65; X64-NEXT:    setle %al66; X64-NEXT:    retq67;68; EGPR-LABEL: bzhi32_overflow:69; EGPR:       # %bb.0:70; EGPR-NEXT:    bzhil %esi, %edi, %eax # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x48,0xf5,0xc7]71; EGPR-NEXT:    testl %eax, %eax # encoding: [0x85,0xc0]72; EGPR-NEXT:    setle %al # encoding: [0x0f,0x9e,0xc0]73; EGPR-NEXT:    retq # encoding: [0xc3]74  %tmp = tail call i32 @llvm.x86.bmi.bzhi.32(i32 %x, i32 %y)75  %cmp = icmp slt i32 %tmp, 176  ret i1 %cmp77}78 79declare i32 @llvm.x86.bmi.bzhi.32(i32, i32)80 81define i32 @pdep32(i32 %x, i32 %y)   {82; X86-LABEL: pdep32:83; X86:       # %bb.0:84; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax85; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx86; X86-NEXT:    addl %ecx, %ecx87; X86-NEXT:    pdepl %ecx, %eax, %eax88; X86-NEXT:    retl89;90; X64-LABEL: pdep32:91; X64:       # %bb.0:92; X64-NEXT:    addl %esi, %esi93; X64-NEXT:    pdepl %esi, %edi, %eax94; X64-NEXT:    retq95;96; EGPR-LABEL: pdep32:97; EGPR:       # %bb.0:98; EGPR-NEXT:    addl %esi, %esi # encoding: [0x01,0xf6]99; EGPR-NEXT:    pdepl %esi, %edi, %eax # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x43,0xf5,0xc6]100; EGPR-NEXT:    retq # encoding: [0xc3]101  %y1 = add i32 %y, %y102  %tmp = tail call i32 @llvm.x86.bmi.pdep.32(i32 %x, i32 %y1)103  ret i32 %tmp104}105 106define i32 @pdep32_load(i32 %x, ptr %y)   {107; X86-LABEL: pdep32_load:108; X86:       # %bb.0:109; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax110; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx111; X86-NEXT:    pdepl (%eax), %ecx, %eax112; X86-NEXT:    retl113;114; X64-LABEL: pdep32_load:115; X64:       # %bb.0:116; X64-NEXT:    pdepl (%rsi), %edi, %eax117; X64-NEXT:    retq118;119; EGPR-LABEL: pdep32_load:120; EGPR:       # %bb.0:121; EGPR-NEXT:    pdepl (%rsi), %edi, %eax # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x43,0xf5,0x06]122; EGPR-NEXT:    retq # encoding: [0xc3]123  %y1 = load i32, ptr %y124  %tmp = tail call i32 @llvm.x86.bmi.pdep.32(i32 %x, i32 %y1)125  ret i32 %tmp126}127 128define i32 @pdep32_anyext(i16 %x)   {129; X86-LABEL: pdep32_anyext:130; X86:       # %bb.0:131; X86-NEXT:    movswl {{[0-9]+}}(%esp), %eax132; X86-NEXT:    movl $-1431655766, %ecx # imm = 0xAAAAAAAA133; X86-NEXT:    pdepl %ecx, %eax, %eax134; X86-NEXT:    retl135;136; X64-LABEL: pdep32_anyext:137; X64:       # %bb.0:138; X64-NEXT:    movl $-1431655766, %eax # imm = 0xAAAAAAAA139; X64-NEXT:    pdepl %eax, %edi, %eax140; X64-NEXT:    retq141;142; EGPR-LABEL: pdep32_anyext:143; EGPR:       # %bb.0:144; EGPR-NEXT:    movl $-1431655766, %eax # encoding: [0xb8,0xaa,0xaa,0xaa,0xaa]145; EGPR-NEXT:    # imm = 0xAAAAAAAA146; EGPR-NEXT:    pdepl %eax, %edi, %eax # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x43,0xf5,0xc0]147; EGPR-NEXT:    retq # encoding: [0xc3]148  %x1 = sext i16 %x to i32149  %tmp = tail call i32 @llvm.x86.bmi.pdep.32(i32 %x1, i32 -1431655766)150  ret i32 %tmp151}152 153define i32 @pdep32_demandedbits(i32 %x) {154; X86-LABEL: pdep32_demandedbits:155; X86:       # %bb.0:156; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax157; X86-NEXT:    movl $1431655765, %ecx # imm = 0x55555555158; X86-NEXT:    pdepl %ecx, %eax, %eax159; X86-NEXT:    retl160;161; X64-LABEL: pdep32_demandedbits:162; X64:       # %bb.0:163; X64-NEXT:    movl $1431655765, %eax # imm = 0x55555555164; X64-NEXT:    pdepl %eax, %edi, %eax165; X64-NEXT:    retq166;167; EGPR-LABEL: pdep32_demandedbits:168; EGPR:       # %bb.0:169; EGPR-NEXT:    movl $1431655765, %eax # encoding: [0xb8,0x55,0x55,0x55,0x55]170; EGPR-NEXT:    # imm = 0x55555555171; EGPR-NEXT:    pdepl %eax, %edi, %eax # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x43,0xf5,0xc0]172; EGPR-NEXT:    retq # encoding: [0xc3]173  %tmp = tail call i32 @llvm.x86.bmi.pdep.32(i32 %x, i32 1431655765)174  %tmp2 = and i32 %tmp, 1431655765175  ret i32 %tmp2176}177 178define i32 @pdep32_demandedbits2(i32 %x, i32 %y) {179; X86-LABEL: pdep32_demandedbits2:180; X86:       # %bb.0:181; X86-NEXT:    movzbl {{[0-9]+}}(%esp), %eax182; X86-NEXT:    pdepl {{[0-9]+}}(%esp), %eax, %eax183; X86-NEXT:    andl $128, %eax184; X86-NEXT:    retl185;186; X64-LABEL: pdep32_demandedbits2:187; X64:       # %bb.0:188; X64-NEXT:    pdepl %esi, %edi, %eax189; X64-NEXT:    andl $128, %eax190; X64-NEXT:    retq191;192; EGPR-LABEL: pdep32_demandedbits2:193; EGPR:       # %bb.0:194; EGPR-NEXT:    pdepl %esi, %edi, %eax # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x43,0xf5,0xc6]195; EGPR-NEXT:    andl $128, %eax # encoding: [0x25,0x80,0x00,0x00,0x00]196; EGPR-NEXT:    retq # encoding: [0xc3]197  %tmp = and i32 %x, 255198  %tmp2 = tail call i32 @llvm.x86.bmi.pdep.32(i32 %tmp, i32 %y)199  %tmp3 = and i32 %tmp2, 128200  ret i32 %tmp3201}202 203define i32 @pdep32_demandedbits_mask(i32 %x, i16 %y) {204; X86-LABEL: pdep32_demandedbits_mask:205; X86:       # %bb.0:206; X86-NEXT:    movswl {{[0-9]+}}(%esp), %eax207; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx208; X86-NEXT:    pdepl %eax, %ecx, %eax209; X86-NEXT:    andl $32768, %eax # imm = 0x8000210; X86-NEXT:    retl211;212; X64-LABEL: pdep32_demandedbits_mask:213; X64:       # %bb.0:214; X64-NEXT:    pdepl %esi, %edi, %eax215; X64-NEXT:    andl $32768, %eax # imm = 0x8000216; X64-NEXT:    retq217;218; EGPR-LABEL: pdep32_demandedbits_mask:219; EGPR:       # %bb.0:220; EGPR-NEXT:    pdepl %esi, %edi, %eax # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x43,0xf5,0xc6]221; EGPR-NEXT:    andl $32768, %eax # encoding: [0x25,0x00,0x80,0x00,0x00]222; EGPR-NEXT:    # imm = 0x8000223; EGPR-NEXT:    retq # encoding: [0xc3]224  %tmp = sext i16 %y to i32225  %tmp2 = tail call i32 @llvm.x86.bmi.pdep.32(i32 %x, i32 %tmp)226  %tmp3 = and i32 %tmp2, 32768227  ret i32 %tmp3228}229 230define i32 @pdep32_demandedbits_mask2(i32 %x, i16 %y) {231; X86-LABEL: pdep32_demandedbits_mask2:232; X86:       # %bb.0:233; X86-NEXT:    movswl {{[0-9]+}}(%esp), %eax234; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx235; X86-NEXT:    pdepl %eax, %ecx, %eax236; X86-NEXT:    movzwl %ax, %eax237; X86-NEXT:    retl238;239; X64-LABEL: pdep32_demandedbits_mask2:240; X64:       # %bb.0:241; X64-NEXT:    pdepl %esi, %edi, %eax242; X64-NEXT:    movzwl %ax, %eax243; X64-NEXT:    retq244;245; EGPR-LABEL: pdep32_demandedbits_mask2:246; EGPR:       # %bb.0:247; EGPR-NEXT:    pdepl %esi, %edi, %eax # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x43,0xf5,0xc6]248; EGPR-NEXT:    movzwl %ax, %eax # encoding: [0x0f,0xb7,0xc0]249; EGPR-NEXT:    retq # encoding: [0xc3]250  %tmp = sext i16 %y to i32251  %tmp2 = tail call i32 @llvm.x86.bmi.pdep.32(i32 %x, i32 %tmp)252  %tmp3 = and i32 %tmp2, 65535253  ret i32 %tmp3254}255 256define i32 @pdep32_knownbits(i32 %x) {257; X86-LABEL: pdep32_knownbits:258; X86:       # %bb.0:259; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax260; X86-NEXT:    movl $1431655765, %ecx # imm = 0x55555555261; X86-NEXT:    pdepl %ecx, %eax, %eax262; X86-NEXT:    imull %eax, %eax263; X86-NEXT:    retl264;265; X64-LABEL: pdep32_knownbits:266; X64:       # %bb.0:267; X64-NEXT:    movl $1431655765, %eax # imm = 0x55555555268; X64-NEXT:    pdepl %eax, %edi, %eax269; X64-NEXT:    imull %eax, %eax270; X64-NEXT:    retq271;272; EGPR-LABEL: pdep32_knownbits:273; EGPR:       # %bb.0:274; EGPR-NEXT:    movl $1431655765, %eax # encoding: [0xb8,0x55,0x55,0x55,0x55]275; EGPR-NEXT:    # imm = 0x55555555276; EGPR-NEXT:    pdepl %eax, %edi, %eax # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x43,0xf5,0xc0]277; EGPR-NEXT:    imull %eax, %eax # encoding: [0x0f,0xaf,0xc0]278; EGPR-NEXT:    retq # encoding: [0xc3]279  %tmp = tail call i32 @llvm.x86.bmi.pdep.32(i32 %x, i32 1431655765)280  %tmp2 = and i32 %tmp, 1431655765281  %tmp3 = mul i32 %tmp, %tmp2282  ret i32 %tmp3283}284 285define i32 @pdep32_knownbits2(i32 %x, i32 %y) {286; X86-LABEL: pdep32_knownbits2:287; X86:       # %bb.0:288; X86-NEXT:    movl $-256, %eax289; X86-NEXT:    andl {{[0-9]+}}(%esp), %eax290; X86-NEXT:    pdepl {{[0-9]+}}(%esp), %eax, %eax291; X86-NEXT:    imull %eax, %eax292; X86-NEXT:    retl293;294; X64-LABEL: pdep32_knownbits2:295; X64:       # %bb.0:296; X64-NEXT:    andl $-256, %edi297; X64-NEXT:    pdepl %esi, %edi, %eax298; X64-NEXT:    imull %eax, %eax299; X64-NEXT:    retq300;301; EGPR-LABEL: pdep32_knownbits2:302; EGPR:       # %bb.0:303; EGPR-NEXT:    andl $-256, %edi # encoding: [0x81,0xe7,0x00,0xff,0xff,0xff]304; EGPR-NEXT:    pdepl %esi, %edi, %eax # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x43,0xf5,0xc6]305; EGPR-NEXT:    imull %eax, %eax # encoding: [0x0f,0xaf,0xc0]306; EGPR-NEXT:    retq # encoding: [0xc3]307  %tmp = and i32 %x, -256308  %tmp2 = tail call i32 @llvm.x86.bmi.pdep.32(i32 %tmp, i32 %y)309  %tmp3 = and i32 %tmp2, -256310  %tmp4 = mul i32 %tmp2, %tmp3311  ret i32 %tmp4312}313 314declare i32 @llvm.x86.bmi.pdep.32(i32, i32)315 316define i32 @pext32(i32 %x, i32 %y)   {317; X86-LABEL: pext32:318; X86:       # %bb.0:319; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax320; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx321; X86-NEXT:    addl %ecx, %ecx322; X86-NEXT:    pextl %ecx, %eax, %eax323; X86-NEXT:    retl324;325; X64-LABEL: pext32:326; X64:       # %bb.0:327; X64-NEXT:    addl %esi, %esi328; X64-NEXT:    pextl %esi, %edi, %eax329; X64-NEXT:    retq330;331; EGPR-LABEL: pext32:332; EGPR:       # %bb.0:333; EGPR-NEXT:    addl %esi, %esi # encoding: [0x01,0xf6]334; EGPR-NEXT:    pextl %esi, %edi, %eax # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x42,0xf5,0xc6]335; EGPR-NEXT:    retq # encoding: [0xc3]336  %y1 = add i32 %y, %y337  %tmp = tail call i32 @llvm.x86.bmi.pext.32(i32 %x, i32 %y1)338  ret i32 %tmp339}340 341define i32 @pext32_load(i32 %x, ptr %y)   {342; X86-LABEL: pext32_load:343; X86:       # %bb.0:344; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax345; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx346; X86-NEXT:    pextl (%eax), %ecx, %eax347; X86-NEXT:    retl348;349; X64-LABEL: pext32_load:350; X64:       # %bb.0:351; X64-NEXT:    pextl (%rsi), %edi, %eax352; X64-NEXT:    retq353;354; EGPR-LABEL: pext32_load:355; EGPR:       # %bb.0:356; EGPR-NEXT:    pextl (%rsi), %edi, %eax # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x42,0xf5,0x06]357; EGPR-NEXT:    retq # encoding: [0xc3]358  %y1 = load i32, ptr %y359  %tmp = tail call i32 @llvm.x86.bmi.pext.32(i32 %x, i32 %y1)360  ret i32 %tmp361}362 363define i32 @pext32_knownbits(i32 %x)   {364; X86-LABEL: pext32_knownbits:365; X86:       # %bb.0:366; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax367; X86-NEXT:    movl $1431655765, %ecx # imm = 0x55555555368; X86-NEXT:    pextl %ecx, %eax, %eax369; X86-NEXT:    retl370;371; X64-LABEL: pext32_knownbits:372; X64:       # %bb.0:373; X64-NEXT:    movl $1431655765, %eax # imm = 0x55555555374; X64-NEXT:    pextl %eax, %edi, %eax375; X64-NEXT:    retq376;377; EGPR-LABEL: pext32_knownbits:378; EGPR:       # %bb.0:379; EGPR-NEXT:    movl $1431655765, %eax # encoding: [0xb8,0x55,0x55,0x55,0x55]380; EGPR-NEXT:    # imm = 0x55555555381; EGPR-NEXT:    pextl %eax, %edi, %eax # EVEX TO VEX Compression encoding: [0xc4,0xe2,0x42,0xf5,0xc0]382; EGPR-NEXT:    retq # encoding: [0xc3]383  %tmp = tail call i32 @llvm.x86.bmi.pext.32(i32 %x, i32 1431655765)384  %tmp2 = and i32 %tmp, 65535385  ret i32 %tmp2386}387 388declare i32 @llvm.x86.bmi.pext.32(i32, i32)389 390define i32 @mulx32(i32 %x, i32 %y, ptr %p)   {391; X86-LABEL: mulx32:392; X86:       # %bb.0:393; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx394; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax395; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx396; X86-NEXT:    addl %edx, %edx397; X86-NEXT:    addl %eax, %eax398; X86-NEXT:    mulxl %eax, %eax, %edx399; X86-NEXT:    movl %edx, (%ecx)400; X86-NEXT:    retl401;402; X64-LABEL: mulx32:403; X64:       # %bb.0:404; X64-NEXT:    # kill: def $esi killed $esi def $rsi405; X64-NEXT:    # kill: def $edi killed $edi def $rdi406; X64-NEXT:    addl %edi, %edi407; X64-NEXT:    leal (%rsi,%rsi), %eax408; X64-NEXT:    imulq %rdi, %rax409; X64-NEXT:    movq %rax, %rcx410; X64-NEXT:    shrq $32, %rcx411; X64-NEXT:    movl %ecx, (%rdx)412; X64-NEXT:    # kill: def $eax killed $eax killed $rax413; X64-NEXT:    retq414;415; EGPR-LABEL: mulx32:416; EGPR:       # %bb.0:417; EGPR-NEXT:    # kill: def $esi killed $esi def $rsi418; EGPR-NEXT:    # kill: def $edi killed $edi def $rdi419; EGPR-NEXT:    addl %edi, %edi # encoding: [0x01,0xff]420; EGPR-NEXT:    leal (%rsi,%rsi), %eax # encoding: [0x8d,0x04,0x36]421; EGPR-NEXT:    imulq %rdi, %rax # encoding: [0x48,0x0f,0xaf,0xc7]422; EGPR-NEXT:    movq %rax, %rcx # encoding: [0x48,0x89,0xc1]423; EGPR-NEXT:    shrq $32, %rcx # encoding: [0x48,0xc1,0xe9,0x20]424; EGPR-NEXT:    movl %ecx, (%rdx) # encoding: [0x89,0x0a]425; EGPR-NEXT:    # kill: def $eax killed $eax killed $rax426; EGPR-NEXT:    retq # encoding: [0xc3]427  %x1 = add i32 %x, %x428  %y1 = add i32 %y, %y429  %x2 = zext i32 %x1 to i64430  %y2 = zext i32 %y1 to i64431  %r1 = mul i64 %x2, %y2432  %h1 = lshr i64 %r1, 32433  %h  = trunc i64 %h1 to i32434  %l  = trunc i64 %r1 to i32435  store i32 %h, ptr %p436  ret i32 %l437}438 439define i32 @mulx32_load(i32 %x, ptr %y, ptr %p)   {440; X86-LABEL: mulx32_load:441; X86:       # %bb.0:442; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx443; X86-NEXT:    movl {{[0-9]+}}(%esp), %eax444; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx445; X86-NEXT:    addl %edx, %edx446; X86-NEXT:    mulxl (%eax), %eax, %edx447; X86-NEXT:    movl %edx, (%ecx)448; X86-NEXT:    retl449;450; X64-LABEL: mulx32_load:451; X64:       # %bb.0:452; X64-NEXT:    # kill: def $edi killed $edi def $rdi453; X64-NEXT:    leal (%rdi,%rdi), %eax454; X64-NEXT:    movl (%rsi), %ecx455; X64-NEXT:    imulq %rcx, %rax456; X64-NEXT:    movq %rax, %rcx457; X64-NEXT:    shrq $32, %rcx458; X64-NEXT:    movl %ecx, (%rdx)459; X64-NEXT:    # kill: def $eax killed $eax killed $rax460; X64-NEXT:    retq461;462; EGPR-LABEL: mulx32_load:463; EGPR:       # %bb.0:464; EGPR-NEXT:    # kill: def $edi killed $edi def $rdi465; EGPR-NEXT:    leal (%rdi,%rdi), %eax # encoding: [0x8d,0x04,0x3f]466; EGPR-NEXT:    movl (%rsi), %ecx # encoding: [0x8b,0x0e]467; EGPR-NEXT:    imulq %rcx, %rax # encoding: [0x48,0x0f,0xaf,0xc1]468; EGPR-NEXT:    movq %rax, %rcx # encoding: [0x48,0x89,0xc1]469; EGPR-NEXT:    shrq $32, %rcx # encoding: [0x48,0xc1,0xe9,0x20]470; EGPR-NEXT:    movl %ecx, (%rdx) # encoding: [0x89,0x0a]471; EGPR-NEXT:    # kill: def $eax killed $eax killed $rax472; EGPR-NEXT:    retq # encoding: [0xc3]473  %x1 = add i32 %x, %x474  %y1 = load i32, ptr %y475  %x2 = zext i32 %x1 to i64476  %y2 = zext i32 %y1 to i64477  %r1 = mul i64 %x2, %y2478  %h1 = lshr i64 %r1, 32479  %h  = trunc i64 %h1 to i32480  %l  = trunc i64 %r1 to i32481  store i32 %h, ptr %p482  ret i32 %l483}484