Apple Microarchitecture Research by Dougall Johnson

M1/A14 P-core (Firestorm): Overview | Base Instructions | SIMD and FP Instructions
M1/A14 E-core (Icestorm):  Overview | Base Instructions | SIMD and FP Instructions

SMULH

Test 1: uops

Code:

  smulh x0, x0, x1
  mov x0, 1
  mov x1, 2

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 1.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)031e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst int alu (97)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1004303323061280925100010001000161686040303330332676328911000100020003033296111001100000731161128631000100030343034303430343034
1004303323061280925100010001000161686140303330332676328911000100020003033296111001100000731161128631000100030343034303430343034
1004303322061280925100010001000161686140303330332676328911000100020003033296111001100000731161128631000100030343034303430343034
1004303322061280925100010001000161686040303330332676328911000100020003033296111001100000731161128631000100030343034303430343034
10043033220117280925100010001000161686040303330332676328911000100020003033296111001100010731161128631000100030343034303430343034
1004303324061280925100010001000161686040303330332676328911000100020003033296111001100000731161128631000100030343034303430343034
1004303322061280925100010001000161686040303330332676328911000100020003033296111001100003731161128631000100030343034303430343034
1004303323061280925100010001000161686040303330332676328911000100020003033296111001100000731161128631000100030343034303430343034
1004303322061280925100010001000161686040303330332676328911000100020003033296111001100000731161128631000100030343034303430343034
1004303322061280925100010001000161686040303330332676328911000100020003033296111001100030731161128631000100030343034303430343034

Test 2: Latency 1->2

Code:

  smulh x0, x0, x1
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0033

retire uop (01)cycle (02)03mmu table walk data (08)191e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020430033225000726298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
10204300332250050161298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
102043003322500061298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
102043003322500061298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
102043003322500061298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116122986310000101003003430034300343003430034
102043003322500061298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
102043003322500061298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
10204300332250055261298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
102043003322500061298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
10204300332250044461298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0033

retire uop (01)cycle (02)031e1f3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6b6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d cache writeback (a8)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024300332250061298092510010100101001016647360492695303003330033285483287631001010020200203003329611100211091010010100640216222986410000100103003430034300343003430034
10024300332250061298092510010100101001016647360492695303003330033285483287631001010020200203003329611100211091010010100640216222986410000100103003430034300343003430034
10024300332250061298092510010100101001016647360492695303003330033285483287631001010020200203003329611100211091010010100640216222986410000100103003430034300343003430034
10024300332250061298092510010100101001016647360492695303003330033285483287631001010020200203003329611100211091010010100640216222986410000100103003430034300343006930034
10024300332250061298092510010100101001016647360492695303003330033285483287631001010020200203003329611100211091010010101640216222986410000100103003430034300343003430034
10024300332250061298092510010100101001016647360492695303006630033285483287631001010020200203003329611100211091010010100640216222986410000100103003430034300343003430034
10024300332250061298092510010100101001016647360492695303003330033285483287631001010020200203003329611100211091010010100640216222986410000100103003430034300343003430034
10024300332250061298092510010100101001016647360492695303003330033285483287631001010020200203003329611100211091010010100640216222986410000100103003430034300343003430034
10024300332250061298092510010100101001016647360492695303003330033285483287631001010020200203003329611100211091010010100640216222986410000100103003430034300343003430034
10024300332250061298092510010100101001016647360492695303003330033285483287631001010020200203003329611100211091010010100640216222986410000100103003430034300343003430034

Test 3: Latency 1->3

Code:

  smulh x0, x1, x0
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0033

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)1e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache writeback (a8)a9acbranch cond mispred nonspec (c5)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204300332250018961298092510100101001010016651861492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
1020430033225003661298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
10204300332250030661298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
102043003322500061298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
102043003322500061298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001002412731500811116112986310000101003003430034300343003430034
1020430033225104686129809152101251018810370166518614927293301633038428611312886810495104352139830251290711020110099100101001000000000710116112986310000101003021030468302063050030424
10204303812271106129809251010010100101821667087049272143046730248286234128841103591100520832302072906110201100991001010010000100016710116112986310000101003003430034300343003430034
102043003324100361298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000000710116012986310000101003003430034300343003430034
102043003322500961298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034
102043003322500661298092510100101001010016651860492695330033300332852632874110100102002020030033290111020110099100101001000000000710116112986310000101003003430034300343003430034

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0033

retire uop (01)cycle (02)031e1f3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb access (a0)l1d cache writeback (a8)acc2branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002430033225006129809251001010010100101664736492695330033300332854832876310010100202002030033296111002110910100101000000640216222986410000100103003430034300343003430034
10024300332250072629809251001010010100101664736492695330033300332854832876310010100202002030033296111002110910100101000000640216222986410000100103003430034300343003430034
10024300332250034629809251001010010100101664736492695330033300332854832876310010100202002030033296111002110910100101000000640216222986410000100103003430034300343003430034
1002430033225006129809251001010010100101664736492695330033300332854832878510010100202002030033296111002110910100101000000640216222986410000100103003430034300343003430034
10024300332240072629809251001010010100101664736492695330033300332854832876310010100202002030033296111002110910100101003000640216222986410000100103003430034300343003430034
1002430033224006129809251001010010100101664736492695330033300332854832876310010100202002030033296111002110910100101000000640216222986410000100103003430034300343003430034
1002430033224006129809251001010010100101664736492695330033300332854832876310010100202002030033296111002110910100101000000640216222986410000100103003430034300343003430034
1002430033225006129809251001010010100101664736492695330033300332854832876310010100202002030033296111002110910100101000000640216222986410000100103003430034300343003430034
1002430033225006129809251001010010100101664736492695330033300332854832876310010100202002030033296111002110910100101000000640216222986410000100103003430034300343003430034
1002430033225006129809251001010010100101664736492695330033300332854832876310010100202002030033296111002110910100101000000640216222986410000100103003430034300343003430034

Test 4: throughput

Count: 8

Code:

  smulh x0, x8, x9
  smulh x1, x8, x9
  smulh x2, x8, x9
  smulh x3, x8, x9
  smulh x4, x8, x9
  smulh x5, x8, x9
  smulh x6, x8, x9
  smulh x7, x8, x9
  mov x8, 9
  mov x9, 10

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code divided by count): 0.5004

retire uop (01)cycle (02)03l2 tlb miss data (0b)1e3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fld unit uop (a6)l1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020440044300036940258010080100801004005004936955400354003529970329993801008020016020040035901180201100991008010010000005110216114003280000801004003640036400364003640036
802044003530001840258010080100801004005004936955400354003529970329993801008020016020040035901180201100991008010010000905110116114003280000801004003640036400364003640036
8020440035300036640258010080100801004005004936955400354003529970329993801008020016020040035901180201100991008010010000005110116114003280000801004003640036400364003640036
80204400352990640258010080100801004005004936955400354003529970329993801008020016020040035901180201100991008010010000005110116114003280000801004003640036400364003640036
802044003530002140258010080100801004005004936955400354003529970329993801008020016020040035901180201100991008010010000005110116114003280000801004003640036400364003640036
8020440035300045640258010080100801004005004936955400354003529970329993801008020016020040035901180201100991008010010000005110116114003280000801004003640036400364003640036
8020440035299012230258010080100801004005004936955400354003529970829993801008020016020040035901180201100991008010010000005110116114003280000801004003640036400364003640036
80204400352990640258010080100801004005004936955400354003529970329993801008020016020040035901180201100991008010010000005110116224003280000801004003640036400364003640036
8020440035299046540258010080100801004005004936955400354003529970329993801008020016020040035901180201100991008010010000005110116114003280000801004003640036400364003640036
8020440035299030940258010080100801004005004936955400354003529970329993801008020016020040035901180201100991008010010000005110116114003280000801004003640036400364003640036

1000 unrolls and 10 iterations

Result (median cycles for code divided by count): 0.5004

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)191e1f3a3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb access (a0)ld unit uop (a6)l1d cache writeback (a8)acc2branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800244003730000000040258001080010800104000501493695540035400352999233001580010800201600204003590118002110910800101000233005020616564003280000800104003640036400364008240036
80024400353000000004025800108001080010400050049369554003540035299923300158001080020160020400359011800211091080010100000015020516664003280000800104003640036400364003640036
80024400352990000004025800108001080010400050049369554003540035299923300158001080020160020400359011800211091080010100000005020516654003280000800104003640036400364003640036
80024400353000000004025800108001080010400050149369554003540035299923300158001080020160020400359011800211091080010100000005020616754003280000800104003640036400364003640036
80024400353000000004025800108001080010400050149369554003540035299923300158001080020160020400359011800211091080010100000005020516674003280000800104003640036400364003640036
80024400352990000014025800108001080010400050149369554003540035299923300158001080020160020400359011800211091080010100030005020516654003280000800104003640036400364003640036
80024400352990000004025800108001080010400050149369554003540035299923300158001080020160020400359011800211091080010100000005020616654003280000800104003640036400364003640036
80024400353000000004025800108001080010400050049369554003540035299923300158001080020160020400359011800211091080010100000005020516674003280000800104003640036400364003640036
80024400353000000004025800108001080010400050049369554003540035299923300158001080020160020400359011800211091080010100000005020616544003280000800104003640036400364003640036
80024400353000000004025800108001080010400050049369554003540035299923300158001080020160020400359011800211091080010100000005020616554003280000800104003640036400364003640036