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

RMIF

Test 1: uops

Code:

  rmif x1, #1, #1
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4
  mov x4, 5

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 1.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)03191e1f3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)606d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst int alu (97)l1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
1004103580006191725100010001000622501103510358053882100010002000103510411100110000007322722990100010361036103610361036
1004103580006191725100010001000622501103510358053882100010002000103510411100110000007322722990100010361036103610361036
1004103580006191725100010001000622501103510358053882100010002000103510411100110000007322722990100010361036103610361036
1004103580006191725100010001000622501103510358053882100010002000103510411100110000007322722990100010361036103610361036
10041035800021391725100010001000622500103510358053882100010002000103510411100110000007322722990100010361036103610361036
10041035700061917251000100010006225001035103580538821000100020001035104111001100001207322722990100010361036103610361036
1004103580006191725100010001000622501103510358053882100010002000103510411100110000007322722990100010361036103610361036
1004103580906191725100010001000622501103510358053882100010002000103510411100110000007322722990100010361036103610361036
1004103580006191725100010001000622501103510358053882100010002000103510411100110000007322722990100010361036103610361036
1004103570006191725100010001000622501103510358053882100010002000103510411100110000007322722990100010361036103610361036

Test 2: Latency 2->1

Chain cycles: 1

Code:

  rmif x1, #1, #1
  cset x1, cc
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4
  mov x4, 5

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 1 chain cycle): 1.0035

retire uop (01)cycle (02)03l2 tlb miss data (0b)191e1f3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc3branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020420035156000075199302520100201002011212972330491695520035200351742561748720112202243023620035104112020110099100201001010000000001111318162001120000101002003620036200362003620036
20204200351550000168199302520100201002011212972330491695520035200351742561748720112202243023620035104112020110099100201001010000000301111318162001120000101002003620036200362003620036
20204200351550000106199302520100201002011212972330491695520035200351742561748720112202243023620035104112020110099100201001010000000001111338242004620023101002008220082200362008120081
2020420080156000061199302520100201002011212972331491695520035200351742561748720112202243023620035104112020110099100201001010000000021111318162001120000101002003620036200362003620036
2020420035161000061199302520100201002011212972330491695520035200351742561748720112202243023620035104112020110099100201001010000000239001111338162001120000101002003620036200362003620036
202042003515500001548199302520100201002011212972331491695520035200351742561748720112202243023620035104112020110099100201001010000000001111318162001120000101002003620036200362003620036
20204200351550000475199302520100201002011212972330491695520035200351742561748720112202243023620035104112020110099100201001010000000001111318162001120000101002003620036200362003620036
20204200351550000231199302520100201002011212972330491695520035200351742561748720112202243023620035104112020110099100201001010000000001111318162001120000101002003620036200362003620036
20204200351550000190199302520100201002011212972330491695520035200351742561748720112202243023620035104112020110099100201001010000000001111318162001120000101002003620036200362003620036
20204200351550000231199302520100201002011212972330491695520035200351742561748720112202243023620035104112020110099100201001010000000001111318162001120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code, minus 1 chain cycle): 1.0035

retire uop (01)cycle (02)03181e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)6061696a6b6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)acbranch mispred nonspec (cb)cfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003516102416919918252001020010200101297247034916955020035200351742831750420010200203002020035104112002110910200101001000100127000127111999520000100102003620036200362003620036
200242003516001213119918252001020010200101297247034916955020035200351742831750420010200203002020035104112002110910200101001000000127000227111999520000100102003620036200362003620036
20024200351610010319918252001020010200101297247134916955020035200351742831750420010200203002020035104112002110910200101001000030127000127111999520000100102003620036200362003620036
2002420035160007319918252001020010200101297247134916955020035200351742831750420010200203002020035104112002110910200101001000130127030127111999520000100102003620036200362003620036
20024200351610013119918252001020010200921297247104916955020035200351742831750420010200203002020035104112002110910200101001000100127030127111999520000100102003620036200362003620036
20024200351550126119918252001020010200101297247134916955020035200351742831750420010200203002020035104112002110910200101001000000127000127111999520000100102003620036200362003620036
20024200351550128219918252001020010201031297247104916955020035200351742831750420010200203002020035104112002110910200101001000130127000127111999520000100102003620036200362003620036
20024200351550126119918252001020010200101297247104916955020035200351742831750420010200203002020035104112002110910200101001000000127030127111999520000100102003620036200362003620036
2002420035161006119918252001020010200101297247104916955020035200351742831750420010200203002020035104112002110910200101001000030127030127111999520000100102003620036200362003620036
20024200351610013119918252001020010200101297247034916955020035200351742831750420010200203002020035104112002110910200101001000000127000127111999520000100102003620036200362003620036

Test 3: Latency 2->2

Code:

  rmif x0, #1, #1
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4
  mov x4, 5

(non-fused SUB/CBNZ loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03l2 tlb miss data (0b)181e3a3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst int alu (97)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204100357500159061992725102001020010210647712049695510035100358673687361021010224202481003511011102011009910100001117192160010010101001001003610036100361003610036
102041003575000061992725102001020010210647712049695510035100358673787361021010224202481003511011102011009910100001117191160010010101001001006710036100361003610036
1020410035750000103992725102001020010210647712049695510035100358673787361021010224202481003511011102011009910100001117190160010010101001001003610036100361003610036
102041003575000082992725102001020010210647712149695510035100358673787361021010224202481003511011102011009910100001117190160010010101001001003610036100361003610036
102041003575009061992725102001020010210647712149695510035100358673787361021010224202481003511011102011009910100301117191160010010101001001003610036100361003610036
1020410035750000619927251020010200102106477120496955100351003586731187361021010224202481003511011102011009910100001117190160010010101001001003610036100361003610036
102041003575000061992725102001020010210647712149695510035100358673687361021010224202481003511011102011009910100001117190160010010101001001003610036100361003610036
102041003575000084992725102001020010210647712049695510035100358673787361021010224202481003511011102011009910100001117190160010010101001001003610036100361003610036
102041003575100061992725102001020010210647712149695510035100358673787361021010224202481003511011102011009910100001117190160010010101001001003610036100361008410036
102041003576000061992725102001020010210647712149695510035100358673787371021010224202481003511011102011009910100001117190160010010101461001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss instruction (0a)0f191e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst int alu (97)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002410035750000252619918251002010020100206472964969551003510035867838754100201002020020100351041110021109100100064032733999310010101003610036100361003610036
10024100357500000619918251002010020100206472964969551003510035867838754100201002020020100351041110021109100100064032733999310010101003610036100361003610036
10024100357500000619918251002010020100206472964969551003510035867838754100201002020020100351041110021109100100064042743999310010101003610036100361003610036
10024100357500016619918251002010020100206472964969551003510035867838754100201002020020100351041110021109100100064042734999310010101003610036100361003610036
10024100357500000619918251002010020100206472964969551003510035867838754100201002020020100351041110021109100100064032733999310010101003610036100361003610036
100241003575000072619918251002010020100206472964969551003510035867838754100201002020020100351041110021109100100064032733999310010101003610036100361003610036
10024100357500000619918251002010020100206472964969551003510035867838754100201002020020100351041110021109100101064032734999310010101003610036100361003610036
10024100357500000619918251002010020100206472964969551003510035867838754100201002020020100351041110021109100100064032733999310010101003610036100361003610036
10024100357500000619918251002010020100206472964969551003510035867838754100201002020020100351041110021109100100064032733999310010101003610036100361003610036
10024100357500000619918251002010020100206472964969551003510035867838754100201002020020100351041110021109100100064032735999310010101003610036100361008110036

Test 4: throughput

Count: 8

Code:

  ands xzr, xzr, xzr
  rmif x0, #1, #1
  ands xzr, xzr, xzr
  rmif x0, #1, #1
  ands xzr, xzr, xzr
  rmif x0, #1, #1
  ands xzr, xzr, xzr
  rmif x0, #1, #1
  ands xzr, xzr, xzr
  rmif x0, #1, #1
  ands xzr, xzr, xzr
  rmif x0, #1, #1
  ands xzr, xzr, xzr
  rmif x0, #1, #1
  ands xzr, xzr, xzr
  rmif x0, #1, #1
  mov x0, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)031e1f3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d cache writeback (a8)acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)dbe0? int output thing (e9)? int retires (ef)f5f6f7f8fd
160204534344000028271601201601201601281063738049503285340853408333476333571601281602401602405340866111602011009910016010010026011110119160534051600201005340953409534095344353409
160204534084000028271601201601201601281063738049503285340853408333476333571601281602401602405340866111602011009910016010010020011110119160534051600201005340953409534095340953409
160204534084000028271601201601201601281063738049503285340853647333476333571601281602401602405340866111602011009910016010010010011110119160534051600201005340953409534095340953409
160204534084000028271601201601201601281063738049503285340853408333476333571601281602401602405340866111602021009910016010010010011110119160534051600201005340953409534095340953409
160204534084000028271601201601201601281063738049503285340853408333476333571601281602401602405340866111602011009910016010010080011110119160534051600201005340953409534095340953600
160204534084000028271601201601201601281063738049503285340853408333476333571601281602401602405340866111602011009910016010010010011110119160534051600201005340953409534095340953409
160204534084000028271601201601201601281063738049503285340853408333476333571601281602401602405340866111602011009910016010010010011110119160534051600201005340953409534095340953409
160204534084000028271601201601201601281063738049503285344353408333476333571601281602401602405340866111602011009910016010010070011110119160534051600201005340953409534095340953409
160204534084000028271601201601201601281063738049503285340853408333476333571601281602401602405340866111602011009910016010010010011110119160534051600201005340953409534095340953409
160204534084000028271601201601201601281063738049503285340853408333476333571601281602401602405340866111602011009910016010010020011110119160534051600201005340953409534095340953599

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1i tlb fill (04)mmu table walk data (08)09l2 tlb miss data (0b)18191e1f3a3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)5f60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaeb? int retires (ef)f5f6f7f8fd
16002453392400100000120043251600101600101600101029388114950294533745337433331333351160010160020160020533746611160021109101600101000000481002331128191113737533701600002111105351753375533755337553468
160024533744000100000008725160010160010160010102938811495029453374533743333133335116001016002016002053374661116002110910160010100000001002231139191114141533701600002111105337553375533755337553375
160024533744000000000004325160010160010160010102938811495029453563533743333133335116001016002016002053374661116002110910160010100000001002331135191113135533701600002111105337553375533755337553375
160024533743990000002640017125160010160010160010102938811495029453374533743333133335116001016002016002053374661116002110910160010100000001002331139191113939533701600002111105337553375533755337553375
160024533744000000006935208525160010160010160010102938811495029453374533743333133335116001016002016002053374661116002110910160010100000001002231138191112737533701600002111105337553563533755337553375
160024533743990000200008525160010160010160010102938811495029453374533743333133335116001016002016002053374661116002110910160010100000001002331136191113721533701600002111105337553375533755337553375
1600245337440000000000012725160010160010160010102938811495029453374533743333133335116001016002016002053374661116002110910160010100000001002332234191114040533701600002111105337553375533755337553375
160024533744000000000004325160010160010160010102938811495029453374533743333133335116001016002016002053374661116002110910160010100000001002331124191113826533701600002111105337553375534155337553375
1600245337440000003015004325160010160010160010102938811495029453374533743333133335116001016002016002053374661116002110910160010100000101002231140191114038533701600002111105337553375533755337553375
160024533744000000000004325160010160010160010102938811495029453374533743333133335116001016002016002053374661116002110910160010100000001002231138191113931533701600002111105337553375533755337553375

Test 5: throughput

Count: 4

Code:

  fcmp s0, s0
  rmif x0, #1, #1
  rmif x0, #1, #1
  rmif x0, #1, #1
  rmif x0, #1, #1
  mov x0, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)031e1f3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)flags prf full (73)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)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 alu (9a)9facbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
502041343710100282550122401121001040143100135751278009701339513416134166139246777110501564045710013805022002613416134161150201100991004010010000100011132210160013413400121001341713416134171341713417
5020413416100088282550122401121001040143100135751278009701339513416134166139245677110501564025110013803022002613416134161150201100991004010010000100011132210161013413400121001341713417134171341713417
502041341610000282550122401121001040143100135751278009701339513416134166137245677110501564025110013803022002613416134161150201100991004010010000100011132210160013413400121001341713417134171341713417
50204134161003270282550122401121001040143100135751278009701339513416134166139245677110501564025110013803022002613416134161150201100991004010010000100011132210160013413400121001341713417134171341713417
502041341610000282550122401121001040143100135751278009701339513416134166139245677110501564025110013803022002613416134161150201100991004010010000100011132200160013413400121001341713416134171341713416
502041341610000492550122401121001040143100135751278009701339513416134166137246777204501564025210014803042002813437134371150201100991004010010000100022232301351113432400121001343813438134381343813438
5020413437100006431501224011210010401431001357510480098013411134381343761282469107109501564025210014803042002813437134371150201100991004010010000100322232301351113432400121001343813438134381343813438
5020413437100306431501224011210010401431001357510480098013411134371343861302480107109501564025210014803042002813437134371150201100991004010010000100022232301351213432400121001343813438134381343813438
50204134371010061231501224011210010401431001357510480098113411134371343761302480107109501564025210014803042002813438134371150201100991004010010000100022232301351113432400121001343813438134381343813438
5020413437101006431501224011210010401431001357510480098013411134371343761302480107109501564025210014803042002813437134371150201100991004010010000100022232301351113432400121001343813438134391343813438

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03181e3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)696d6emap stall dispatch (70)flags prf full (73)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)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 alu (9a)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
5002413384100004525500104001010000400101000057345680000133531338213382557537843710950010400201000080020200001338213382115002110910400101000010003140419441337940000101338313383133831338313383
5002413382100004525500104001010000400101000057345680000133531338213382557737843710950010400201000080020200001338213382115002110910400101000010003140419521337940000101338313383133831338313383
5002413382101006625500104001010000400101000057345680000133531338213382557737843710950010400201000080020200001338213382115002110910400101000010003140419521337940000101338313383133831338313383
5002413382100006625500104001010000400101000057345680000133531338213382557737953710950010400201000080020200001338213382115002110910400101000010003140219241337940000101338313383133831338313383
5002413382100094525500104001010000400101000057345680000133531338213382557737843710950010400201000080020200001338213382115002110910400101000010003140419341337940000101338313383133831338313383
5002413382100004525500104001010000400101000057345680000133531338213382557537843710950010400201000080020200001338213382115002110910400101000010003140219241337940000101338313383133831338313383
50024133821000124525500104001010000400101000057345680000133531338213382557737953710950010400201000080020200001338213382115002110910400101000010033140219421337940000101338313383133831338313383
5002413382101004525500104001010000400101000057345680000133531338213382557537953710950010400201000080020200001338213382115002110910400101000010003140219241337940000101338313383133831338313383
5002413382100004525500104001010000400101000057345680000133531338213382557737953710950010400201000080020200001338213382115002110910400101000010003140419451337940000101338313383133831338313383
5002413382100004525500104001010000400101000057345680000133531338213382557737953710950010400201000080020200001338213382115002110910400101000010003140419421337940000101338313383133831338313383