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

LD3 (multiple, post-index, 2S)

Test 1: uops

Code:

  ld3 { v0.2s, v1.2s, v2.2s }, [x6], x8
  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, 1
  mov x1, 2
  mov x8, 0

(no loop instructions)

1000 unrolls and 1 iteration

Retires (minus 60 nops): 5.000

Issues: 6.006

Integer unit issues: 1.000

Load/store unit issues: 2.000

SIMD/FP unit issues: 3.006

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)0e0f18191e1f223a3f464951schedule 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)5f6061696d6emap 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 simd load (98)inst ldst (9b)9dl1d tlb access (a0)l1d tlb miss (a1)l1d cache miss ld (a3)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acafb5bbl1d cache miss ld nonspec (bf)c2c3c9cfd0d2l1i cache miss demand (d3)l1i tlb miss demand (d4)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaebec? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
650052943222616001500000400465028882001703760061000300620001000300020005000100003562940022911291702939731060002000300030006000292082922011610011000100002000042002000020004060001310393746874318284520185324238141143432847010001618213302143292000300010002928829351292632927529243
650042925222719002000000801461228874001698460091000300920001000300020005000100033572430022943290372947031060002000300030006000292822918511610011000100002000062000000020000040001311994966920310994320063325038121739412850110001609613142142642000300010002936629226293112923129396
650042946122715002000000000469328805001687060061000300620001000300020005000100003562560022867292422932331060002000300030006000292962926311610011000100032000062000000020004060001312493276864311454620361313538151242422843810001601113186145102000300010002935829346292532932329312
650042926422713002100000800459328885001706960001000300620001000300020005000100003559900022960291352933731060002000300030006000291532929311610011000100002000042004000020024040001316793546921314574020230323738151747452844310001632713211143842000300010002949429351293922933129328
65004292652272300160000021014663288820016853600010003000200010003000200050001000035687205228662909629284810600020003000300060002911329172116100110001000020000420010011020006060001286794176932315974320127323038161042402851510001640413129141622000300010002921129240292002932629300
6500429175228150014000001200460828846001689260061000300620001000300020005000100003573400022989291742933931060002000300030006000292502914611610011000100012000062000010020004040001314694866897307444220212322338141541392856010001603213241142922000300010002929829358293422927529311
6500429380226161018001000004640289610017073600610003006200010003000200050001000035613000228972905329263310600020003000300060002913629178116100110001000120000020000100200040600012963930169383090104020171321538161437382851910001598413497144322000300010002916029535292842933929286
6500429297227210020000005880464528819001700260061000301220001000300020005005100763566800022930291702932431060002000300030006000292372929411610011000100012000042000000020000240001314094746927309473920204317238121446442842910001593013511145722000300010002920929393293362930429301
650042930822717001400000300453128848001702860061000300920001000300020005000100003572800022928291512934831060002000300030006000293332923511610011000100012000062000000020004040001310595426936317694520337322138161240412861110001616513384142722000300010002961629434292282930029220
6500429287227130013000023004616288140016967601210003000200010003000200050001000035722200229022910629327310600020003000300060002922829210116100110001000020000620000000200400600013324937268753066104520330317938151535422852510001611613289144422000300010002949729568293382945329329

Test 2: throughput

Count: 8

Code:

  ld3 { v0.2s, v1.2s, v2.2s }, [x6], x8
  ld3 { v0.2s, v1.2s, v2.2s }, [x6], x8
  ld3 { v0.2s, v1.2s, v2.2s }, [x6], x8
  ld3 { v0.2s, v1.2s, v2.2s }, [x6], x8
  ld3 { v0.2s, v1.2s, v2.2s }, [x6], x8
  ld3 { v0.2s, v1.2s, v2.2s }, [x6], x8
  ld3 { v0.2s, v1.2s, v2.2s }, [x6], x8
  ld3 { v0.2s, v1.2s, v2.2s }, [x6], x8
  mov x7, x6
  mov x8, x6
  mov x9, x6
  mov x10, x6
  mov x11, x6
  mov x12, x6
  mov x13, x6
  mov x8, 0

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss data (0b)0f18191e1f23243a3f4346494f5051schedule 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)696d6emap stall dispatch (70)simd prf full (72)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 load (98)inst ldst (9b)9d9fl1d tlb access (a0)l1d cache miss ld (a3)ld unit uop (a6)l1d cache writeback (a8)acafb5b6bbl1d cache miss ld nonspec (bf)c2cfd5map dispatch bubble (d6)ddfetch restart (de)e0e7? int output thing (e9)eaeb? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
400205800716200101003600008002721200025480154801002400571600008010024000016000048049996032831217638002380042800420032448010020016000024000020024000048000080042800421180201100991001008000080000010016000027160030022160028610330510911711800391800001010160000240000801008004380043800438004380043
40020480042620000000510001800272121200254801548010024005416000080100240000160000480499960331312116180023800428004200324480100200160000240000200240000480000800428004211802011009910010080000800000100160000251600300211600306122330510911711800391800001012160000240000801008004380043800438004380043
40020480042620000000360000800272121200254801548010024004416000080100240000160000480499960364312118180023800428004200324480100200160000240000200240000480000800428004211802011009910010080000800000100160000251600300241600306122330510911711800390801631014160000240000801008004380043800438004380043
4002048004262000000036000180027012120025480154801002400541600008010024000016000048049996033031210738002380042800420032448010020016000024000020024000048000080042800421180201100991001008000080000010016000025160029030160030612233051091171180039080000100160000240000801008004380043800438004380043
4002048004262000030039000180027212120025480154801002400541600008010024000016000048049996033031211558002380042800420032448010020016000024000020024000048000080042800421180201100991001008000080000010016000033160030122160029012039051091171180039080000100160000240000801008004380043800438004380043
40020480042621000000480001800272121200254801548010024005516000080100240000160000480499960330312107380023800428004200324480100200160000240000200240000480000800428004211802011009910010080000800000100160000371600300331600216122330510911711800391800001010160000240000801008004380043800438004380043
4002048004262100000036000180027212000254801548010024005416000080100240000160000480499960338312108880023800428004200324480100200160000240000200240000480000800428004211802011009910010080000800000100160000331600300331600226122330510911711800390800001010160000240000801008004380043800438004380043
40020480042620000000270001800272121200254801548010024005516000080100240000160000480499960331312110480023800428004200324480100200160000240000200240000480000800428004211802011009910010080000800000100160000251600300211600006130330510911711800391800001011160000240000801008004380043800438004380043
40020480042621000000360001800272121200254801558010024005416000080100240000160000480499960338312105180115801568004200172448010020016010824000020024000048032480042800421180201100991001008000080000010016000033160022030160030612133051091171180039180000100160000240000801008004380043800438004380043
4002048004262100000036000180027212120025480154801002400551600008010024000016000048049996033131199948002380042800420032448010020016000024000020024000048000080042800421180201100991001008000080000010016000001600300301600306122250510911711800391800001010160000240000801008004380043800438004380043

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)l2 tlb miss data (0b)0e0f18191e1f22233a3f4346494f51schedule 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)60696b6d6emap 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 load (98)inst ldst (9b)9d9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache miss ld (a3)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acafb5b6bbl1d cache miss ld nonspec (bf)l1d tlb miss nonspec (c1)c2branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0e7? int output thing (e9)eaeb? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
4000258005862000011004301008002720120254800738001024006316000080010240000160000480049960650312176808002308004280042032448001020160000240000202400004800008004280042118002110910108000080000110160000033160037020301600370129431100501941734800390800001313160000240000800108004380043800438004380043
4000248004262010010006700028002726132548008580010240075160000800102400001600004800489612733124651080023080042800420324480010201600002400002024000048064880042800421180021109101080000800000101600111043160050011501600396150431100501951744800390800001313160000240000800108004380043800438004380043
4000248004262111111005501028002726632548008680010240071160000800102400001600004800499612793124571080023080042800420324480010201600002400002024000048000080042800421180021109101080000800001101600121243160049011531600396149431100501971747800390800001314160000240000800108004380043800438004380043
4000248004262010111005600028002706632548008680010240075160000800102400001600004800499612833124559080023080042800420324480010201600002400002024000048037280042800421180021109101080000800000101600101143160051060561600396149431010501971765800390800001313160000240000800108004380043800438004380043
40002480042621100110055000280027276325480083800102400751600008001024000016000048004996130331245550800230800428004203244800102016000024000020240000480000800428004211800211091010800008000001016001111431600500005016003961504311005019817558038408000000160000240000800108004380043800438004380043
400024800426210001100350100800272121202548007380010240063160000800102400001600004800499606493119994080023080042800420324480010201600002400002024000048000080042800421180021109101080000800000101600000411600000000160037013741000501941745800390800001413160000240000800108004380043800438004380043
400024800426210001100480002800270120025480073800102400001600008001024000016000048004995999631217760800230800428004203244800102016000024000020240000480000800428004211800211091010800008000001016000003316000000037160037612941000501931734800390800001610160000240000800108004380043800438004380043
40002480042620000010043000280027212002548007380010240063160000800102400001600004800499599963119994080023080042800420324480010201600002400002024000048000080042800421180021109101080000800000101600000331600370003716000061041000501941754800390800001410160000240000800108004380043800438004380043
40002480042621000110000002800272012025480073800102400631600008001024000016000048004995999631199940800230800428004203244800102016000024000020240000480000800428004211800211091010800008000011016000003316003700037160000612941000501941754800390800001410160000240000800108004380043800438004380043
4000248004262000011014300008002721212025480073800102400631600008001024000016000048004996078131200940800230800428004203244800102016000024000020240000480000800428004211800211091010800008000001016000003316003000030160037613741000501941764801420800001410160000240000800108004380043800438004380043