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, 4H)

Test 1: uops

Code:

  ld3 { v0.4h, v1.4h, v2.4h }, [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.009

Integer unit issues: 1.000

Load/store unit issues: 2.000

SIMD/FP unit issues: 3.009

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)0e181e1f223a3f43464951schedule 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)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 simd load (98)inst ldst (9b)l1d tlb access (a0)l1d cache miss ld (a3)ld unit uop (a6)acafb5b6bbl1d cache miss ld nonspec (bf)l1d tlb miss nonspec (c1)cfd0d2l1i 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
650052859421325023000401503528127001160216006100030092000100030002000500010003357487229242826028237310600020003000300060002831128314116100110001000200042002220024026014225103697254342395119023333738071757572800610001486111829127662000300010002826828325281992809728446
6500428308212160190007005157280100111590760091000300920001000300020005000100113569518229382820028306310600020003000300060002841128287116100110001000200042002220024026013619103697240349864219194333338131056532804610001461011874128632000300010002832428081281942845528230
65004282662111201800013005032280320111608660061000300620001000300020005000100033569318229502818428353310600020003000300060002828528282116100110001000200042002220024026013653101587216337785019275336138181154442784310001444512160130862000300010002824428391282512822328259
65004282242121701710037005041280790021593860091000300920001000300020005000100033570682293828141283353106000200030003000600028221282531161001100010002000620022200240260139369882721733298491915334093809847492802210001462712158129882000300010002823528329283172819428196
65004282002111802100080052012801301216116600610003006200010003000200050001000235695182295428143282863106000200030003000600028165280851161001100010002000420022200240260141561033471713348115019212324538111549532794710001405512126127492000300010002831028366283152820528306
65004280742111701700040050302800801116159600910003015200010003000200050001000235704122294228222282663106000200030003000600028336281961161001100010002003420022200260260139881058871663353105019283321438071063512792910001447612083127052000300010002839528111282502821728468
650042830021220025100700497728131021160806009100030092000100030002000500010003357581122929281082819431060002000300030006000282732822711610011000100020034200211200240262137761025871753471125419039343338091354552804610001422312034130202000300010002837328350285752828628336
65004284652132301500070049962809001015986600610003009200010003000200050001000235714722900282112826831060002000300030006000282782822711610011000100020004200252002402601387610578722534769551944233153817952562794310001448211992127442000300010002822928429281412817728285
6500428539212221171002000501928030011158446009100030092000100030002000500010002357121722938282062816431060002000300030006000281142815011610011000100020004200252002402601385810054723733593481930633063803853582783010001489612082127662000300010002813728212282532838028212
65004283062121802000070050682813202016120600910003009200010003000200050001000035709722896283242821731060002000300030006000283762827111610011000100020004200242002402401366710335722135067461916934003804854532790010001433011644124632000300010002824528197282562833328494

Test 2: throughput

Count: 8

Code:

  ld3 { v0.4h, v1.4h, v2.4h }, [x6], x8
  ld3 { v0.4h, v1.4h, v2.4h }, [x6], x8
  ld3 { v0.4h, v1.4h, v2.4h }, [x6], x8
  ld3 { v0.4h, v1.4h, v2.4h }, [x6], x8
  ld3 { v0.4h, v1.4h, v2.4h }, [x6], x8
  ld3 { v0.4h, v1.4h, v2.4h }, [x6], x8
  ld3 { v0.4h, v1.4h, v2.4h }, [x6], x8
  ld3 { v0.4h, v1.4h, v2.4h }, [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)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss data (0b)0e0f18191e1f233a3f4346494f51schedule 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)6067696d6emap 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 tlb miss (a1)l1d cache miss ld (a3)a5ld unit uop (a6)l1d cache writeback (a8)a9acafb5b6bbl1d cache miss ld nonspec (bf)l1d tlb miss nonspec (c1)c2cfd5map dispatch bubble (d6)ddfetch restart (de)e0e7? int output thing (e9)eaeb? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
400205800566200010000012001800272121202548014280100240054160000801002400001600004804999603303121104008002380154801554601675480426200160108240000200240000480000801568004221802011009910010080000800000100160102225016023300690160136610250051301171180039180000106160000240000801008015580043801578004380043
40020480156620000000200176018025221212818348047380208240210160112802622401621601084811439633623134342008020780267801572301712648042420016010824016220024016248064880270801553180201100991001008000080000010016020600016023800291600296122250051091171180039180000612160000240000801008004380043800438004380043
4002048004262000000000360028002721500254801728010024006916000080100240000160000480499960029312334600800238004280042003244801002001600002400002002400004800008004280042118020110099100100800008000001001600111240016004701481600376146401015109117118003918000006160000240000801008004380043800438004380043
4002048004262000000000360018002721212025480100801002400551600008010024000016000048049996032631211040080023800428004200324480100200160000240000200240000480000800428004211802011009910010080000800000100160000025016002900291600296022250051091171180039080000610160000240000801008004380043800438004380043
400204800426200000000048000800272120025480154801002400551600008010024000016000048049996033231211040080023800428004200324480100200160000240000200240000480000800428004211802011009910010080000800000100160000025016002200301600306122250051091171180039080000610160000240000801008004380043800438004380043
400204800426210000000000018002721212025480100801002400631600008010024000016000048049996033831199940080023800428004200324480100200160000240000200240000480000800428004211802011009910010080000800000100160000025016000000301600300122250051091171180039180000610160000240000801008004380043800438004380043
40020480042621000000003600180027212120254801548010024005716000080100240000160000480499960331312121500800238004280042003244801002001600002400002002400004800008004280042118020110099100100800008000001001600000270160000003316003061222500510911711800390800001010160000240000801008004380043800438004380043
40020480042621000001000011800272121202548010080100240054160000801002400001600004804999603623121763008002380042800420032448010020016000024000020024000048000080042800421180201100991001008000080000010016000000016002900321600296122250051091171180039180000010160000240000801008004380043800438004380043
40020480042620000000002800180027212120254801558010024005416000080100240000160000480499960340312107300800238004280042003244801002001600002400002002400004800008004280042118020110099100100800008000001001600000250160030003316003061222500510911711800390800001010160000240000801008004380043800438004380043
40020480042621000010002800180027200025480154801002400551600008010024000016000048049996036031210640080023800428004200324480100200160000240000200240000480000800428004211802011009910010080000800000100160000027016002900331600306022250051091171180039080000100160000240000801008004380043800438004380043

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)0e0f18191e1f233a3f4346494f51schedule 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)simd prf full (72)map rewind (75)map stall (76)77dispatch 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 call (8e)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)c2cdcfd2d5map dispatch bubble (d6)ddfetch restart (de)e0e7? int output thing (e9)eaeb? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
40002580058600000000470018002721212025480064800102400551600008001024000016000048004996033131312340800238004280042073240480010201600002400002024000048000080042800421180021100910108000080000110160000033160030010301600216122330050190117118003908000006160000240000800108004380043800438004380043
400024800426210001004000080027000025480064800102400551600008001024000016000048004996032831308431800238004280042003240480010201600002400002024000048000080042800421180021100910108000080000010160000029160030000321600306122000501901171180039080000106160000240000800108004380043800438004380043
400024800426210000003500180027212120254800528001024005416000080010240000160000480049960331312107308002380042800420032404800102016000024000020240000480000800428004211800211009101080000800000101600000251600300003216000060323300501901171180039180000610160000240000800108004380043800438004380043
4000248004262000000012001800272121202548006480010240054160000800102400001600004800499599963120091080023800428004200324048001020160000240000202400004800008004280042118002110091010800008000001016000002516000000029160029612233005019011711800391800001010160000240000800108004380043800438004380043
4000248004262100000047001800272121202548006480010240051160000800102400001600004800499603313121353080023800428004200324048001020160000240000202400004800008004280042118002110091010800008000001016000002516003000001600306122330050190117148132418000060160000240000800108004380043800438015780043
4000248004262000000028001800272121202548006580010240054160000800102401621600004800499603403132466080023800428004200324048001020160000240000202400004800008004280042118002110091010800008000001016000023316003000033160030612100050190117118003908005406160000240000800108004380043800438004380043
4000258015562000100036001800272120025480064800102400551600008001024000016000048004996033031278370800238004280042003240480010201600002400002024000048000080042800421180021100910108000080000010160000025160030010221600006102800501901171180039080000610160000240000800108004380043800438004380043
4000248004262000000035000800272121202548006480010240054160108800102400001600004800499603313132261080023800428015500324048001020160000240000202400004800008004280042118002110091010800008000041016000000160032010316003061223300501901171180039180000106160000240000800108004380043800438004380043
400024800426210001003500180027212120254800648001024005416000080010240000160000480049959996312134908002380042800420037404800102016000024000020240000480000800428004211800211009101080000800000101600000251600290002916002961033005019012511800391800001010160000240000800108004380043800438004380043
400024800426210000003500080027012122725480054800102400571600008001024000016000048004996037031218800800238004280042003240480334201600002400002024000048000080042800421180021100910108000080000010160000025160026000221600296130001501901173180039080000612160000240000800108004380043801348004380043