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

ST3 (multiple, 2D)

Test 1: uops

Code:

  st3 { v0.2d, v1.2d, v2.2d }, [x6]
  nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop
  mov x0, 0

(no loop instructions)

1000 unrolls and 1 iteration

Retires (minus 60 nops): 6.000

Issues: 6.000

Integer unit issues: 0.000

Load/store unit issues: 3.000

SIMD/FP unit issues: 3.000

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f2223373a3f464951schedule uop (52)schedule simd uop (54)schedule ldst uop (55)dispatch simd uop (57)dispatch ldst uop (58)simd uops in schedulers (5a)ldst uops in schedulers (5b)5f696d6emap rewind (75)map stall (76)dispatch uop (78)map ldst uop (7d)map simd uop (7e)map ldst uop inputs (80)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch ret (8f)inst simd store (99)inst ldst (9b)l1d tlb access (a0)l1d tlb miss (a1)l1d cache miss st (a2)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acafbcl1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2branch ret indir mispred nonspec (c8)c9cfd0d2l1i cache miss demand (d3)l1i tlb miss demand (d4)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaebec? ldst retires (ed)? simd retires (ee)f5f6f7f8fd
6600829645239128212710128292000463229661201743460003003300930033000331172400018226892927029666928600030063000600090272942329411116100156100010003011463300701403300039300013182933568993151748205053298381021495129019162751315315066300030002969329668296672973029723
66004296562381182221211135920004615296050317647600630063006300630003313824048112272529360297521549601230063003600090002944929630216100101000100030043023003216300030320013219948369623199844205863331380817504829023163671304914936300030002933329446296462953830135
660042946923812411230001241004748292100017263600030003000300030003302124000422760571422974831060003000300060009000293852934211610010100010003003301300300330003031001319893216975312645420219325238109505028777161311345614709300030002939829503295122942029302
660042934323612011150003400046662932400213336000300030003000300032999240005227822899329365310600030003000600090002936329280116100101000100030054913003013300036300012990956068683127744201433182381613535428763162091272514872300030002934529255293932947529392
6600429788243117112200104000476929269001726776053000300030003000330012400042281529021292703106000300030006000900029318293051161001010001000300449030040263000363019013113930169343095843201553259381613545528579162121286914825300030002933929319292502942629476
66004294882371251113101040004718292593017203600030003000300030003304324000522732289592927531060003003300060009000292962927411610010100010003003401300301330003930001322894976946314294520029320738105485128556160271266614773300030002939429359292392942029256
6600429283227122112110013240016124702292933017211600030003000300030003303524000224107290762940231060003000300060009000293032918421610010100010003006501300301330003933001330794346946311384820220323038099384928652160631264814750300030002924329448293422930929244
66004292672281171119001030004681292280017180600030003000300030003301424000122719290592939671060003000300360009000293412926411610010100010003004401300301448300039300013099963669073190753202163282381017435028694162431285314555300030002928429323293272940529487
660042951322711511131100300046392924933172766000460830003000300133038240005228222901429336310600030003000600090002935229300116100101000100030094013003033300039310013122952569453196745202153254381910474628669161781261514669300030002938929331293512936929304
66004294022281191117100092000469229291001737660003000300030003000330282400072290628949293833106000300030006000900029240293571161001010001000300449230030133000393000132219380695531521239201743302381613454128732162991267314738300030002934429358293502943829365

Test 2: throughput

Count: 8

Code:

  st3 { v0.2d, v1.2d, v2.2d }, [x6]
  st3 { v0.2d, v1.2d, v2.2d }, [x6]
  st3 { v0.2d, v1.2d, v2.2d }, [x6]
  st3 { v0.2d, v1.2d, v2.2d }, [x6]
  st3 { v0.2d, v1.2d, v2.2d }, [x6]
  st3 { v0.2d, v1.2d, v2.2d }, [x6]
  st3 { v0.2d, v1.2d, v2.2d }, [x6]
  st3 { v0.2d, v1.2d, v2.2d }, [x6]
  mov x7, x6
  mov x8, x6
  mov x9, x6
  mov x10, x6
  mov x11, x6
  mov x12, x6
  mov x13, x6

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)l2 tlb miss data (0b)18191e1f2224373a3f46494f51schedule uop (52)schedule int uop (53)schedule simd uop (54)schedule ldst uop (55)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)ldst uops in schedulers (5b)696b6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map ldst uop (7d)map simd uop (7e)map int uop inputs (7f)map ldst uop inputs (80)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd store (99)inst ldst (9b)9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache miss st (a2)a4ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acafbcl1d cache miss st nonspec (c0)l1d tlb miss nonspec (c1)c2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
48020812005293000000123007377012002716160254858341002457052400001002400002400005005519567195427112002101200431200433998434002548010020024000024000020048000072000012004312004311802011009910010080000800001002400000000240002502240002242005110117111200400240000240000100120044120044120043120044120043
48020412004393000000123003622012002816160254848451002448402400001002400002400005005519567194285312002101200431200423998434003348010020024000024000020048000072000012004312013711802011009910010080000800001002400000000240002880224000020005110117111200400240000240000100120043120044120043120043120047
48020412004493000000000045240120028016025488082100247139240000100240000240000500551956719428531200210120043120043399843401294801002002400002400002004800007200001200441200431180201100991001008000080000100240000042002400025002240002242005110117111200400240000240000100120043120043120053120044120043
480204120043932000001230047630120027161602548909410024449424000010024000024000050055255301958761120021012004312004339984340025480100200240120240000200480000720000120043120043118020110099100100800008000010024000000002400061008240002242005110117111200400240000240000100120197120043120043120044120043
480204145352930000100300770701200281616025485670100246427240000100240000240000500551956719593941200210120043120043399843400244801002002400002400002004802407200001200431200431180201100991001008000080000100240000042022400165201824000216441405109126111200490240000240000100120055120054120053120054120062
480204120054931112000190030001120038161694334819651002509872400001002400002400005005519812193279412002901200541200623999034003548010020024000024000020048000072000012005412020511802011009910010080000800001002400141444002400164511724000216441405110117111200490240000240000100120053120053120055120054120063
48020412005393111000017005741112004016161484843001002499942400001002400002400005005519932193300112003701200501200523999134003448010020024000024000020048000072000012005212005321802011009910010080000800001002400141444002400165322124000216441405109117111200490240000240000100120053120052120054120054120052
480204120053930110002119007194112003816160254888971002474622400001002400002400005005519932194140212002601200621200523998874003648010020024000024000020048000072000012005112005311802011009910010080000800001002400151544012400163301824000216461405110117111200490240000240000100120054120054120053120055120056
480204120052931110001210800898711200381616147484972100248662240000100240000240000500551995619470021200280120054120052399903400354801002002400002400002004800007200001200551200522180201100991001008000080000100240014154420240016801924000216441435109117111200480240000240000100120054120053120053120055120053
480204120052931110000200079961120039161602549082310024804124000010024000024021650055322401933596120026012005112005339988340034480100200240000240000200480000720000120207120052118020110099100100800008000010024001414445202400167812024000216441415110117111200480240000240000100120055120054120208120054120054

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f202324373a3f46494f51schedule uop (52)schedule int uop (53)schedule simd uop (54)schedule ldst uop (55)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map ldst uop (7d)map simd uop (7e)map int uop inputs (7f)map ldst uop inputs (80)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd store (99)inst ldst (9b)9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache miss st (a2)a4ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acafbcl1d cache miss st nonspec (c0)c2branch cond mispred nonspec (c5)cdcfd5map dispatch bubble (d6)d9daddfetch restart (de)e0e2? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
48002812005293100000910006854012002916002548872210244052240000102400002400005055195671957165012002112004312004339984340025480010202400002400002048000072000012004212019811800211091010800008000010240000042032400020002400022000050205170765120039024000024000010120043120353120044120199120201
48002412264896711322642640005070012048501627192484258102437872401201024011724021650553702419480270120440120351120349400731234263248541020240120240120204804807203601205081203515180021109101080000800001024018004215422401220286224006224220050317170465120040024000024000010120044120045120044120045120044
480024120042964000063000858201200361616025486437102468482400001024000024000050551956719495070120021120042120043399843400264800102024000024000020480000720000120043120042118002110910108000080000102400000420024000210224000224200050205170265120040024000024000010120044120045120044120045120044
4800241200439640000030001190601200281616025485011102450012400001024000024000050551956728516830120021120043120043399843400254800102024000024000020480000720000120043120043118002110910108000080000102400000420024000210224000204200050205170154120040024000024000010120222120734120044120044120044
480024120043964000003000557101200281616025486171102464302400001024000024000050551956719564020120021120043120043399843400264800102024000024000020480000720000120043120044118002110910108000080000102400000420024000230224000224200050204170063120039024000024000010120047120044120048120044120044
48002412004396500000400033530120028161602548429910246430240000102400002400005055195671938087012002112004312004339984340026480010202400002400002048000072000012013412004211800211091010800008000010240000000024000000524000004400050205170165120040024000024000010120044120044120044120044120044
480024120043964000012300042850120028160025486437102492852400001024000024000050551956719464190120021120136120042399843400254800102024000024000020480000720000120042120043118002110910108000080000102400000420024000210224000224400050209170164120039024000024000010120044120044120044120045120044
4800241200439640000040007140012002916002548430210245721240000102400002401175055195671958729012002112004312004339984340025480010202400002400002048000072000012004312004311800211091010800008000010240000042002400020032400022000050205170055120040024000024000010120044120044120044120044120044
4800241200439640000030005726012002801602549214910245998240000102400002400005055195671947618012002112004312004339984340025480010202400002400002048000072000012004314459711800211091010800008000010240000000024000200224000224200050204170153120039024000024000010120053120044120044120044120044
480024120042964000003001744701200281616025486435102464272400001024000024000050551956719423890144885120043120042399843400254800102024000024000020480000720000120043120043118002110910108000080000102400000420024000200224000224200050205170065120039024000024000010120046120045120043120044120044