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

LD1 (multiple, post-index, 4 regs, 4H)

Test 1: uops

Code:

  ld1 { v0.4h, v1.4h, v2.4h, v3.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): 4.000

Issues: 3.000

Integer unit issues: 1.000

Load/store unit issues: 2.000

SIMD/FP unit issues: 0.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)0e0f1e22233a3f43464951schedule uop (52)schedule int uop (53)schedule ldst uop (55)dispatch int uop (56)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)5f696b6d6emap rewind (75)map stall (76)dispatch uop (78)map ldst uop (7d)map ldst uop inputs (80)8283flush restart other nonspec (84)85inst all (8c)inst simd load (98)inst ldst (9b)l1d 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)c2cfd0d2l1i 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
6400528340212126032400070050462787500123287300010002000100020005000100011816214027909282473103000400040002798928031116100110001000200004200501022000408400141781030672503414106119217338438071758572790410001403112097130082000200010002834128184281232839028003
6400428283211024002300020050692816501023130300010002000100020005000100031316203027887281323103000400040002816428164116100110001000200004200200052000402600141641032472313458105719173339438121760612786510001442412102131172000200010002831128311282032852628228
64004282872120260020000700522028084010231023000100020001001200050001000315162393281102834531030004000400028201282101161001100010002000042002020220024006001380210193720734299611921233963815761602805810001452812307130802000200010002819928283282452855728325
6400428336211024002300012005087280010022299630001000200010002000500010000141624602795128263310300040004000281102823211610011000100020033420020005200000242013986102987274345696019201337738151054552792910001397112049130542000200010002839328482282492839628262
6400428270211025002100057005257279340122314330001000200010002000500010001111623202786128239310300040004000280982803711610011000100020003620050212200040262113956102137162330386119331343438141059622789310001424312207131272000200010002830628301281812862928288
64004282092120220025100210517927909200230973000100020001000200050001000313162470279482830131030004000400028334280491161001100010002000042002010020004044001373810266708834259541925033343813958622806010001461312191132772000200010002829628365282552854128344
64004283212120270023000120052092805400123141300010002000100020005000100021416243027872283103103000400040002823828247116100110001000200006200004022002404400140151026072073385105719359338138131452582793310001469312186133052000200010002811828242282802833928261
640042830421112100210005005155279732012315730001000200010002000500010012116270028152282863103000400040002819128192116100110001000200004200002042000204200138031000972593429125519511341038222055572789010001443112438130572000200010002843828208282052846828328
6400428290211120002300040051082811400122948300010002000100020005000100009162450280322837231030004000400028410281591161001100010002000042005045022000404400135631017572573436135119264331338121155632797310001432612200133992000200010002829728221282062835228322
6400428352212020002200050050202799000123142300010002000100020005000100031416269028109281963103000400040002814828371116100110001000200024200301703200041440014267998072103374126119317338738101760572793810001477612227133782000200010002816028290283472830328343

Test 2: throughput

Count: 8

Code:

  ld1 { v0.4h, v1.4h, v2.4h, v3.4h }, [x6], x8
  ld1 { v0.4h, v1.4h, v2.4h, v3.4h }, [x6], x8
  ld1 { v0.4h, v1.4h, v2.4h, v3.4h }, [x6], x8
  ld1 { v0.4h, v1.4h, v2.4h, v3.4h }, [x6], x8
  ld1 { v0.4h, v1.4h, v2.4h, v3.4h }, [x6], x8
  ld1 { v0.4h, v1.4h, v2.4h, v3.4h }, [x6], x8
  ld1 { v0.4h, v1.4h, v2.4h, v3.4h }, [x6], x8
  ld1 { v0.4h, v1.4h, v2.4h, v3.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 instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)0e0f18191e1f233a3f4346494f51schedule uop (52)schedule int uop (53)schedule ldst uop (55)dispatch int uop (56)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)606167696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map ldst uop (7d)map int uop inputs (7f)map ldst uop inputs (80)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)92inst 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)l1d cache writeback (a8)a9acafb5b6bbl1d cache miss ld nonspec (bf)l1d tlb miss nonspec (c1)c2branch mispred nonspec (cb)cdcfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0e7? int output thing (e9)eaeb? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
320205800696430100100000540018002611800252401008013916000080100160000480499961168100800168004180041032924010020032000020032000080041800411180201100990100100800008000001001600000581600470048160014614745000051115411722800380800001010160000160000801008004280042800428004780042
32020480041643000000000053002800261091672524010080100160000801001600004804999612761508001680041800410323240100200320000200320000800418004111802011009901001008000080000010016000005816004710671600246134441110051115421621800450800001010160000160000801008004280047800498004780049
3202048004164310100000008300180026244183573240217801801600008018116007848073097174815280170802238013751772240217200320312200320468801368013631802011009911001008000080000010016022614571602840311501601986165441000051595413522801990800391010160000160000801008013880227802278013380494
3202048167065400111100233292640280208109178348240807802171601568017816015648073196652315080170802198013223203022402172003203122003200008004180132118020110099010010080000800000100160000057160047004816012061474300005109001172180038080000100160000160000801008004280042800428004880042
320204800416430000101000538801800261081722524010080100160000801001600784804999614421508001680041800410323240100200320000200320000801358004111802011009901001008000080000010016000005716004700597160047614843000051235321722800380800001010160000160000801008004280133800428004780134
3202048013164301001000016500280026100022524010080100160000801001600004804999611900508001680041800410323240100200320000200320000800418004111802011009901001008000080000010016000004316004720501600486047000005111532172280038080000100160000160000801008004280042800428004780042
320204800426430000100000530018002610916382524010080100160000801001600004804999602041508001680041800414323240100200320000200320000800418004111802011009901001008000080000010016000005716018011701601236162441100051115411622800430800001010160000160000801008004780049800478011380047
3202048004664210101000008300280031164182902524010080100160000801001600004804989602771008001680108800410323240100200320000200320000800418004111802011009901001008000080000010016000004916004530471600466144410001511100217128003808000066160000160000801008004280042800428004280042
3202048004164301000000006500180026111523025240100801001600008010016000048049996070500080016800418004103232401002003200002003200008004180041118020110099010010080000800000100160000049160045105116004561464100005109001171380038080039156160000160000801008014180140801328024380042
3202048004164300000010006618801800261114220252401008010016000080100160000480499960704000800168004180041032324010020032000020032046880041800412180201100990100100800008000001001603620491604051030931603296145410200511100217128003808000066160000160000801008007880042800428004280042

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 instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)0e0f18191e1f233a3f4346494f51schedule uop (52)schedule int uop (53)schedule ldst uop (55)dispatch int uop (56)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)6067696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map ldst uop (7d)map int uop inputs (7f)map ldst uop inputs (80)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)e0? int output thing (e9)eaeb? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
320025800426211001010000560028002626632524001080010160000800101600004800499614251080016800418004103232400102032000020320000800418004111800211091010800008000001016001112431600510114916003961504311105019817191980038800001313160000160000800108004580042800428004280042
3200248004162110000000005800280026256325240010800101600008001016000048004996127900800938004180041032324001020320000203200008004180041118002110910108000080000010160010124416005003105316003961504310005019171718980039800001413160000160000800108004280043800448004280042
3200248004163010000121006600280026315100252400108001016000080010160000480049960914008001680041800410323240010203200002032000080041800411180021109101080000800000101600121040160046000481600376150401110501917171817800388000099160000160000800108004280042800428004280042
320024800416201011000000520028002621413025240010800101600008001016000048004996001900800168004180041032324001020320000203200008004180041118002110910108000080000110160011114016004801147160036614801000501919171019800388000099160000160000800108004280042800428004280042
3200248004162010010000005400280026315140252400108001016000080010160000480049960946008001680041800410323240010203200002032000080041800411180021109101080000800000101600111240160049001461600360147401100501919171919800388000099160000160000800108004280042800428004280042
320024800416201010000000540028002621515025240010800101600008001016000048004996100400800168004180041032324001020320000203200008004180041118002110910108000080000110160011110160047000471600366147401000501917171817800388000099160000160000800108004280042800428004280042
320024800416211010000000165002800262141402524001080010160000800101600004800499608840080016800418004103232400102032000020320000800418004111800211091010800008000001016001110401600100104716003700464010005019181715188003880000109160000160000800108004280042800428004280042
32002480041621100100000055002800263140025240010800101600008001016000048004996088400800168004180041032324001020320000203200008004180041118002110910108000080000010160012114016004901047160037604640110050199171818800388000009160000160000800108004280042800428004280222
320024800416211010000000520028002621400252400108001016000080010160000480049960874008001680041800410323240010203200002032000080041800411180021109101080000800000101600111340160048011461600376148401110501918171017800388000009160000160000800108004280042800428004280042
3200248004162010000000005200280026214150252400108001016000080010160000480049960874108001680041800410323240010203200002032000080041800411180021109101080000800000101600121240160048000461600366147401100501991714188003880000912160000160000800108004280042800428004280042