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

SHA1SU1

Test 1: uops

Code:

  sha1su1 v0.4s, v1.4s
  movi v0.16b, 1
  movi v1.16b, 2

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 0.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 1.000

retire uop (01)cycle (02)03191e3f4e51schedule uop (52)schedule simd uop (54)dispatch simd uop (57)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map simd uop (7e)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst simd alu (9a)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
10042037150061937251000100010006898402018203720371788318951000100020002037203711100110000073116111969100020382038203820382038
10042037150061937251000100010006898402018203720371788318951000100020002037203711100110000073116111969100020382038203820382038
100420371500619372510001000100068984020182037203717883189510001000200020372037111001100001873116111969100020382038203820382038
10042037150061937251000100010006898402018203720371788318951000100020002037203711100110000073116111969100020382038203820382038
10042037160061937251000100010006898402018203720371788318951000100020002037203711100110000373116111969100020382038203820382038
100420371501261937251000100010006898402018203720371788318951000100020002037203711100110000073116111969100020382038203820382038
100420371500619372510001000100068984020182037203717883189510001000200020372037111001100001573116111969100020382038203820382038
10042037160061937251000100010006898412018203720371788318951000100020002037203711100110000073116111969100020382038203820382038
10042037150061937251000100010006898402018203720371788318951000100020002037203711100110000073116111969100020382038203820382038
10042037150061937251000100010006898402018203720371788318951000100020002037203711100110000373116111969100020382038203820382038

Test 2: Latency 1->1

Code:

  sha1su1 v0.4s, v1.4s
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)031e1f3f4e51schedule 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)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 tlb miss (a1)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1020420037150006199372510100100100001001000050070798412001820037200371863831874510100200100002002000020037200371110201100991001001000010000817101161119967100001002003820038200382003820038
1020420037150006199372510100100100001001000050070798412001820037200371863831874510100200100002002000020037200371110201100991001001000010000967101161119967100001002003820038200382003820038
10204200371500061993725101001001000010010000500707984120018200372003718638318745101002001000020020000200372003711102011009910010010000100001027101161119967100001002003820038200382003820038
1020420037150002519937251010010010000100100005007079841200182003720037186383187451010020010000200200002003720037111020110099100100100001000097101161119967100001002003820038200382003820038
102042003715000619937251010010010000114100005007079841200182003720037186383187451010020010000200200002003720037111020110099100100100001000067101161119967100001002003820038200382003820038
102042003715000619937251010010010000100100005007079840200182003720037186383187451010020010000200200002003720037111020110099100100100001000007101161119967100001002003820038200382003820038
102042003715000619937251010010010000100100005007079841200182003720037186383187451010020010000200200002003720037111020110099100100100001000007101161119967100001002003820038200382003820038
102042003715000619937251010010010000100100005007079841200182003720037186383187451010020010000200200002003720037111020110099100100100001000007101171119967100001002003820038200382003820038
102042003715000619937251010010010000100100005007079840200182003720037186383187451010020010000200200002003720037111020110099100100100001000307101161119967100001002003820038200382003820038
102042003715000619937251010010010000100100005007079841200182003720037186383187451010020010000200200002003720037111020110099100100100001000007100161119967100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)03191e3f4e51schedule 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)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 tlb miss (a1)st unit uop (a7)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
10024200371500061993725100101010000101000050707984120018200372003718660318767100102010000202000020037200371110021109101010000100000640216221996910000102003820038200382003820038
10024200371500061993725100101010000101000050707984120018200372003718660318767100102010000202000020037200371110021109101010000100000640216221996910000102003820038200382003820038
10024200371500061993725100101010000101000050707984120018200372003718660318767100102010000202000020037200371110021109101010000100013640216221996910000102003820038200382003820038
10024200371500061993725100101010000101000050707984120018200372003718660318767100102010000202000020037200371110021109101010000100000640216221996910000102003820038200382003820038
1002420037150006199372510010101000010100005070798412001820037200371866031876710010201000020200002003720037111002110910101000010000102640216221996910000102003820038200382003820038
10024200371500061993725100101010000101000050707984020018200372003718660318767100102010000202000020037200371110021109101010000100000640216221996910000102003820038200382003820038
10024200371500082993725100101010000101000050707984120018200372003718660318767100562010000202000020037200372110021109101010000100000640324221996910000102003820038200382003820038
10024200371500061989925100101010000101000050707984020018200372003718660318767100102010000202000020037200371110021109101010000100020640216221996910000102003820038200382003820038
10024200371500061993725100101010000101000050707984020018200372003718660318767100102010000202000020037200371110021109101010000100000640216221996910000102003820038200382003820038
10024200371500061993725100101010000101000050707984120018200372003718660318767100102010000202000020037200371110021109101010000100010640216221996910000102003820038200382003820038

Test 3: Latency 1->2

Code:

  sha1su1 v0.4s, v0.4s
  movi v0.16b, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)031e3a3f4e51schedule 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)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 tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
10204200371500061993625101001001000010010000500707921120018200842003718644618740101002001000820020016200372003711102011009910010010000100000031117171160219965100001002003820038200382003820038
10204200371500061993625101001001000010010000500707921020018200372003718644618741101002001000820020016200372003711102011009910010010000100000001117170160019978100001002003820038200382003820038
10204200371500061993625101001001000010010000500707921020018200372003718644618741101002001000820020016200372003711102011009910010010000100000001117180160019978100001002003820038200382003820038
102042003714900726993625101001001000010010000500707921120018200372003718644618741101002001000820020016200372003711102011009910010010000100000001117180160019978100001002003820038200382003820038
102042003715000944993625101001001000010010000500707921020018200372003718644618740101002001000820020016200372003711102011009910010010000100000001117180160019979100001002003820038200382003820038
102042003715000212993625101001001000010010000500707921120018200372003718644718741101002001000820020016200372003711102011009910010010000100000001117170160019978100001002003820038200382003820038
102042003715000124993625101001001000010010000500707921120018200372003718644718740101002001000820020016200372003711102011009910010010000100000001117170160019979100001002003820038200382003820038
102042003715000103993625101001001000010010000500707921120018200372003718644618740101002001000820020016200372003711102011009910010010000100000001117180160019979100001002003820038200382003820038
10204200371500061993625101001001000010010000500707921020018200372003718644618740101002001000820020016200372003711102011009910010010000100000001117180160019978100001002003820038200382003820038
102042003715000533993625101001001000010010000500707921020018200372003718644618741101002001000820020016200372003711102011009910010010000100000001117180160019978100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)03181e3f4e51schedule 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)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 tlb access (a0)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0ea? simd retires (ee)? int retires (ef)f5f6f7f8fd
100242003715000458993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100006402162219968010000102003820038200382003820038
10024200371500061993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100106402162219968010000102003820038200382003820038
10024200371500061993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100206402162219968010000102003820038200382003820038
100242003715000126993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100006402162219968010000102003820038200382003820038
100242003715000619936251001010100001010000507079210200182003720037186593187671001020100002020000200372003711100211091010100001002566402162219968010000102003820038200382003820038
100242003715000163993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100006402162219968010000102003820038200382003820038
100242003715000166993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100006402162219968010000102003820038200382003820038
100242003715000168993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100006402162219968010000102003820038200382003820038
100242003715000168993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100006402162219968010000102003820038200382003820038
100242003715000189993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100006402162219968010000102003820038200382003820038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  sha1su1 v0.4s, v8.4s
  movi v1.16b, 0
  sha1su1 v1.4s, v8.4s
  movi v2.16b, 0
  sha1su1 v2.4s, v8.4s
  movi v3.16b, 0
  sha1su1 v3.4s, v8.4s
  movi v4.16b, 0
  sha1su1 v4.4s, v8.4s
  movi v5.16b, 0
  sha1su1 v5.4s, v8.4s
  movi v6.16b, 0
  sha1su1 v6.4s, v8.4s
  movi v7.16b, 0
  sha1su1 v7.4s, v8.4s
  movi v8.16b, 9

(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)l2 tlb miss data (0b)18191e1f3f51schedule 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)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 tlb miss (a1)l1d cache writeback (a8)acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
1602048003960000000057525801001008000010080000500640000180019800388003859970659991801002008000820016001680038800381116020110099100100160000100000011110117016008003501600001008003980039800398003980039
16020480038599000000181225801001008000010080000500640000180019800388003859970659991801002008000820016001680038800381116020110099100100160000100000011110117016008003501600001008003980039800398003980039
1602048003859900000032125801001008000010080000500640000180019800388003859970660021801002008000820016001680038800381116020110099100100160000100000011110132016008003501600001008003980039800398003980039
16020480038599000000220825801001008000010080000500640000180019800388003859970659991801002008000820016001680038800381116020110099100100160000100000011110117016008003501600001008003980039800398003980039
16020480038599000000210125801001008000010080000500640000180019800388003859970659991801002008000820016001680038800381116020110099100100160000100200011110117016008003501600001008003980087800878008780185
1602048003859900002103825801001008000010080000500640000180019800388003859970659991801002008000820016001680038800381116020110099100100160000100013211110117024008003501600001008003980039800398003980039
160204800386000000008025801001008000010080000500640000180019800388003859970659991801002008000820016001680038800381116020110099100100160000100010011110117016008003501600001008003980039800398003980039
1602048003860000000045325801001008000010080000500640000180019800388003859970659991801002008000820016001680038800381116020110099100100160000100000011110117016008003501600001008003980039800398003980039
16020480038599000000241125801001008000010080000500640000180019800388003859970659991801002008000820016001680038800381116020110099100100160000100000011110117016008003501600001008003980039800398008780039
160204800385990000308025801001008000010080000500640000180019800388003859970659991801002008000820016001680038800381116020110099100100160000100013011110117016008003501600001008003980039800978003980039

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03191e1f3a3f51schedule 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)5f60696d6emap stall dispatch (70)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 tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002480039599000173232580010108000010800005064000001800198003880038599863600188001020800002016000080038800381116002110910101600001000000001002462291642243800932013160000108003980039800398003980039
16002480038599000171912580010108000010800005064000001800198003880038599863600188001020800002016000080038800381116002110910101600001000003001002432241642244800354026160000108003980039800398003980039
16002480038600000139122580010108000010800005064000001800198003880038599863600188001020800002016000080038800381116002110910101600001000000001002461231622234800352026160000108003980039800398003980096
16002480038600000152102580010108000010800005064000001800198003880038599863600188001020800002016000080038800381116002110910101600001000000001002462231642234800352013160000108003980039800398003980039
1600248003859900014552580010108000010800005064000011800198003880038599863600188001020800002016000080038800381116002110910101600001000040001002231171621144800352013160000108003980039800398003980039
160024800385990001755258001010800001080000506400001180019800388003859986360018800102080000201600008003880038111600211091010160000100031565001002231141621143801452013160000108003980039800398018380087
16002480086599117788137368180056108002310800505064039011800198003880038599863600188001020800002016000080038800871116002110910101600001022009001002231141621164800352013160000108003980039800398003980039
1600248003860000015782580010108000010800005064000011800198003880038599863600188001020800002016000080038800381116002110910101600001000000001004531151621176800352013160000108003980039800398003980039
16002480038600000185532580010108000010800005064000011800198003880038599863600188001020800002016000080038800381116002110910101600001000000001002231141621176800352013160000108003980039800398003980039
1600248003859900016552580010108000010800005064000011800198003880038599863600608001020800002016000080038800381116002110910101600001000000001002231161621177800352013160000108003980039800398003980039

Test 5: throughput

Count: 16

Code:

  sha1su1 v0.4s, v16.4s
  sha1su1 v1.4s, v16.4s
  sha1su1 v2.4s, v16.4s
  sha1su1 v3.4s, v16.4s
  sha1su1 v4.4s, v16.4s
  sha1su1 v5.4s, v16.4s
  sha1su1 v6.4s, v16.4s
  sha1su1 v7.4s, v16.4s
  sha1su1 v8.4s, v16.4s
  sha1su1 v9.4s, v16.4s
  sha1su1 v10.4s, v16.4s
  sha1su1 v11.4s, v16.4s
  sha1su1 v12.4s, v16.4s
  sha1su1 v13.4s, v16.4s
  sha1su1 v14.4s, v16.4s
  sha1su1 v15.4s, v16.4s
  movi v16.16b, 17

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3a3f51schedule 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)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 tlb access (a0)l1d tlb miss (a1)st unit uop (a7)l1d cache writeback (a8)a9acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfl1i cache miss demand (d3)d5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1602041600391199003000041251601001001600001001600005001280000016001916003816003813997161399921603502001600082003202981600381600381116020110099100100160000100000000011110117001600160035160000100160039160039160039160039160039
1602041600381199000300038251601001001600001001600005001280000016001916003816003813997161399921601002001600082003200161600381600381116020110099100100160000100000000011110117001610160035160000100160039160039160039160039160039
16020416003811990000000703251601001001600001001600005001280000016001916003816003813997161399921601002001600082003200161600381600385116020110099100100160000100200009011110117001600160035160000100160039160039160039160039160039
1602041600381199100000038251601001001600001001600005001280000016001916003816003813997161399921601002001600082003200161600861600861116020110099100100160000100000000011110117001600160035160000100160039160039160039160039160039
1602041600381198000000038251601001001600001001600005001280000116001916003816003813997161399921601002001600082003200161600381600381116020110099100100160000100000000011110170001600160083160000100160039160039160039160039160039
1602041600381199010000038251601001001600001001600005001280000116001916003816003813997161401321601002001600082003200161600381602301116020110099100100160000100000003011110173001600160035160000100160039160039160039160229160039
1602041602321199000000038251601001001600001001600005001280000016001916003816018413997161399921601002001600082003200161600381600381116020110099100100160000100000420011110117001600160035160000100160039160039160039160039160039
160204160038120000003900703251601001001600001001600005001280000116001916003816003813997161399921601002001600082003200161600381600381116020110099100100160000100000003011110117001600160035160000100160039160039160039160039160039
1602041600381199010000038251601001001600001001600005001280000116001916003816003813997161399921601002001600082003200161600381600381116020110099100100160000100000300011110117001600160035160000100160039160039160039160039160039
1602041600381199100000038251601001001600001001600005001280000016001916003816003813997161399921601002001600082003200161600381600381116020110099100100160000100000000011110117001601160035160000100160039160039160039160039160039

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3f51schedule 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)5f6061696b6d6emap stall dispatch (70)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)9fst unit uop (a7)l1d cache writeback (a8)acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
160024160039119905542160010101600001016000050128000011516001901602321600381399863140018160010201600002032000016003816018211160021109101016000010000000100228212216211199160033151316000010160039160039160039160039160039
1600241600381199073525160010101600001016000050128000011516001901600381600381399863140018160010201600002032000016003816003811160021109101016000010000000100228211916211199160033151316000010160039160039160039160039160039
1600241600381199955251600101016000010160000501280000110160019016003816003813998631400181600102016000020320000160038160038111600211091010160000100000001002282119162111919160033151316000010160039160039160039160039160039
160024160038119907202516001010160000101600005012800001151600190160038160038139986314001816001020160000203200001600381600381116002110910101600001000000010022821916211916160083152616000010160039160039160039160039160039
160024160038119906125160010101600001016000050128000011516001931600381600381399863140018160010201600002032000016003816003811160021109101016000010053000010022832916422919160033302616000010160039160039160039160039160039
1600241600381199055251600101016000010160000501280000115160019016003816003813998631400181600102016003320320000160038160038111600211091010160000100000001002282119162111919160033151316000010160039160039160039160039160039
1600241600381199365525160010101600001016000050128000011516001901600381600381399863140018160010201600002032000016003816003811160021109101016000010010000100228219162111919160033302616000010160039160039160039160039160039
1600241600381198055801600101016000010160000501280000115160019016003816003813998631400181600102016000020320000160038160038111600211091010160000100000001002283219164221915160033302616000010160039160039160039160039160039
16002416003811990552516001010160000101600005012801951151600190160038160038139986314001816001020160000203200001600381600381116002110910101600001000000010024113219164221919160033302616000010160039160039160039160039160039
16002416003811990726175160010101600001016005050128000001516001901601971600381399863140018160035201600002032020216023116003811160021109101016000010102878000100241132716422919160033302616000010160039160039160039160039160039