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

LD4R (post-index, 2D)

Test 1: uops

Code:

  ld4r { v0.2d, v1.2d, v2.2d, v3.2d }, [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): 6.000

Issues: 7.008

Integer unit issues: 1.000

Load/store unit issues: 2.000

SIMD/FP unit issues: 4.008

retire uop (01)cycle (02)03l1i tlb fill (04)l1d tlb fill (05)mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)0e0f18191e1f233a3f43464951schedule 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)l1d cache writeback (a8)a9acafb5bbl1d 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
660052965223730200100000190048122896402217070701210004012200010004000200050001000047570900229762922729511310700020004000300080002946329462116100110001000020033820062142002648211314792946912313416020348319438093660662870510001658713366145802000400010002942929602295512958129508
6600429633239011112100001900471229025002171417018100040182000100040002000500010004476181010230072931129587310700020004000300080002938929247116100110001000020033420030042000628211322793386956313616520336327638052761572887410001615313006145262000400010002956629480296062963429481
660042944723601011110000800462028901002169897016100040162000100040002000500010004476221400230172915029367310700020004000300080002930629390116100110001000020033620060142002446221308092536958313006220293320138022554532859310001628513261144062000400010002933029336294032945429447
66004294202380121110000040047752900300017258700810004012200010004000200050001000047522910229602923629620310700020004000300080002943929404216100110001000020003220051052000222211340693276956306906120252327838083361642878310001651213136145302000400010002949329670295152950029571
6600429518238011112100016004741289860001727470081000400820001000400020005000100004749830023059297062961464770072000400030008000292962934811610011000100002002562000002492000424211332894656916315716120404333038043261562872410011644413333144032000400010002947629662295282951629416
660042949122801110000000600479328858010170367012100040122000100040002000500010000475801205230132925929503310700020004000300080002940129388116100110001000020043220020122002242211329693276910311706720236332038133052652860010001619713269146682000400010002947829519294532950029511
660042954722901211210010400470928988000170567016100040162000100040002000500010000476061100229682936529430310700020004000300080002943829414116100110001000020035420030122000424211323093196822315506320508323338022864602875410001623213236145162000400010002952529666294742953729693
66004294972290121111000140046572897700017205701210004008200010004000200050051000047582800230962930529609310700020004000300080002933629363116100110001000020043220030122000222211320093596958309715920378323738082860572873110001647113245143542000400010002944429473295192947029559
660042944222901211210001200471228930000171217008100040082000100040002000500010000476241509230052934829604310700020004000300080002943829402116100110001000020000420000002000404001319194557052314626120328327138172868662876310001634913202144722000400010002959729521296452947329516
66004295562300030060000000046012902100017332700810004008200010004000200050001001047518000230562931529573710700020004004300080002944929384116100110001000020000020000002000204001314892776910317255220480324038173364572869410001632313472142392000400010002952429561295332946829540

Test 2: throughput

Count: 8

Code:

  ld4r { v0.2d, v1.2d, v2.2d, v3.2d }, [x6], x8
  ld4r { v0.2d, v1.2d, v2.2d, v3.2d }, [x6], x8
  ld4r { v0.2d, v1.2d, v2.2d, v3.2d }, [x6], x8
  ld4r { v0.2d, v1.2d, v2.2d, v3.2d }, [x6], x8
  ld4r { v0.2d, v1.2d, v2.2d, v3.2d }, [x6], x8
  ld4r { v0.2d, v1.2d, v2.2d, v3.2d }, [x6], x8
  ld4r { v0.2d, v1.2d, v2.2d, v3.2d }, [x6], x8
  ld4r { v0.2d, v1.2d, v2.2d, v3.2d }, [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.0008

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss data (0b)0e0f18191e1f22243a3f4346494e4f51schedule 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)c2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0e7? int output thing (e9)eaeb? ldst retires (ed)? simd retires (ee)? int retires (ef)f5f6f7f8fd
480205800696200001100430100800482121200255601848010032008416000080100320000160000480499960649960000000800538006380063003425601002001601323200002002400006400008006380060118020110099100100800008000011001600000330160037003716003761374000510911711800601800611410160000320000801008006780064800648006480064
48020480063620000000043000280048001200255601848010032008416000080100320000160000480499960650960000000800418006380063003275605552001600003200002002400006400008006380060118020110099100100800008000001001600000410160036103016003761304100510911711800600800001414160000320000801008006480064800648006480043
480204800636210100000430002800482121200255605588010032008416000080100320000160000480499960649960000000801778006080063003455601002001600003200002002400006405368006380060118020110099100100800008000001001600000410160037003616003961303300510911711800600800001414160000320000801008006180064800648006180064
4802048006362000000000000280048212120025560184801003200841600008010032000016000048049996370096000000080041800638006300345560100200160000320000200240000640000800638006311802011009910010080000800000100160000041016000000401600366129330051361171180060080134014160000320000801008006480064800648006480061
480204800426200000001376000280048212120025560184801003200841600008010032000016000048049996065296000000080041800638006300327560100200160000320000200240000640000800638006011802011009910010080000800001100160000041016003720301600376130000510911711800600800001414160000320000801008006480061800648006480064
48020480042620000000036000280048212120025560184801003200841600008010032000016000048049996068496000000080041800638020000345560100200160000320000200240000640000800638006011802011009910010080000800000100160000000160030003716003761304100510911711800570800001510160000320000801008006480064800648006480064
4802048006562000000004300008004801212002556018480100320084160000801003200001600004804999606521056000800800418006380060003455601002001600003200002002400006400008006880063118020110099100100800008000001001600000400160037002916003761294100510911711800600800001614160000320000801008006180067800648006480064
480204800636200100100430002800482121200255601008010032008416000080100320000160000480499959996415999200800328006380063003425601002001600003200002002400006400008006380063118020110099100100800008000001001600000001600371001600386134330051091171180057180000011160000320000801008006180064800438006480064
4802048006362100000004300028004821212002556018480100320084160000801003200001600004804999606509600008008004480063800450034556010020016000032000020024000064000080065800631180201100991001008000080000410016000000016003700371600370104100510911711800600800001414160000320000801008006480066800648004680064
48020480063620010000043000280048012120025560184801003200841600008010032000016000048049996064996000000080041800638006000345560100200160000320000200240000640000800638006011802011009910010080000800001100160000033016003700371601670103520513721722801961801301410160000320000801008041380228804118023180233

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1d tlb fill (05)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)0e0f18191e1f22243a3f4346494e4f51schedule 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)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)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)a5ld unit uop (a6)st unit uop (a7)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
48002580069621000001000430001800453121200255600868001032009616000080010320000160000480048960680960000008004480069800634035256046520160000320000202400006400008006080060118002110901010800008000001016000003301600120001616003961304100506351655800620800001410160000320000800108006480064800648004380064
480024800456201000000005500038021121200025560010800103200761600008001032025216000048004896110810880752080050800698006900345560010201600003200002024000064000080069800691180021109010108000080000010160010114301600501005516003761104100502151655800660800681310160000320000800108006480043800708006480061
480024800696200000000004301038005221212002556008680010320084160000800103200001600004800489606521056000808004680069800633034556001020160000320000202400006400008006380060118002110901010800008000001016000003301600511016716003901304100502131755800600800001410160000320000800108006480064800488006480064
480024800646200000000001200018004821212002556009480010320096160000800103200001600004800499606509600000080044800638006300342560010201600003200002024000064054480063800631180021109010108000080000010160011103301600370102016003060503300502151645800660800001310160000320000800108006980043800488006480061
48002480069621000000000560004800542612002556007480010320064160000800103200001600004800489610391088075208005080071800423034556001020160000320000202400006400008006080060118002110901010800008000001016001111430160012101251600396104100502151755800420800001414160000320000800108004380064800648006780064
480024800606210000010003500038004821212102556009480010320076160000800103200001600004800489599969600000080044800698006400345560010201600003200002024000064000080063800621180021109010108000080000010160011110016005000156160039614943100502151655800450800001410160000320000800108007080070800708004680070
4800248006962000000000044000180048212120025560034800103200721600008001032000016000048004996065296000000800448006980063303455600102016000032000020240000640000800608006311800211090101080000800001101600000330160052100711600396130410050215175380062080000140160000320000800108006480064800618006480064
48002480060621000000000430011800482121200255600948001032009616000080010320000160000480049960650960000008004480063800630032456001020160000320000202400006400008006380060118002110901010800008000001016001211410160037001831600006050410150211225955800660800001310160000320000800108006480061800708006480061
480024800696200000011006500118004501212002556010680076320080160000800103200001600004800489611471088075208004480072800693034556001020160000320000202400006400008023380069118002110901010800008000001016001311001600520005816003901304301502151635800660800001314160000320000800108006480064800648006580064
480024800636210000000004300038004821212002556009480010320064160000800103200001600004800499603304620936080044800458004206134556001020160000320000202400006400008006380063118002110901010800008000001016001113001600370011716000061493300502131635800661800001313160000320000800108006480064800708007080061