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

SHA256SU0

Test 1: uops

Code:

  sha256su0 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)03l2 tlb miss data (0b)1e3f4e51schedule 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
10042037150061937251000100010006898412018203720371788318951000100020002037203711100110000073116111969100020382038203820382038
10042037150061937251000100010006898412018203720371788318951000100020002037203711100110000073116111969100020382038203820382038
10042037150061937251000100010006898412018203720371788318951000100020002037203711100110000073116111969100020382038203820382038
100420371500619372510001000100068984120182037203717883189510001000200020372037111001100001873116111969100020382038203820382038
10042037150061937251000100010006898412018203720371788318951000100020002037203711100110000073116111969100020382038203820382038
10042037150061937251000100010006898412018203720371788318951000100020002037203711100110000073116111969100020382038203820382038
10042037150061937251000100010006898412018203720371788318951000100020002037203711100110000073116111969100020382038203820382038
10042037160082937251000100010006898412018203720371788318951000100020002037203711100110000073116111969100020382038203820382038
10042037150061937251000100010006898412018203720371788318951000100020002037203711100110000073116111969100020382038203820382038
10042037150061937251000100010006898412018203720371788318951000100020002037203711100110000073116111969100020382038203820382038

Test 2: Latency 1->1

Code:

  sha256su0 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)031e3f4e51schedule 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)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
1020420037150061993725101001001000010010000500707984020018200372003718638318745101002001000020020000200372003711102011009910010010000100000071011611199670100001002003820038200382003820038
1020420037150061993725101001001000010010000500707984020018200372003718638318745101002001000020020000200372003711102011009910010010000100000071011611199670100001002003820038200382003820038
102042003715043261988025101001001000010010000500707984020018200372003718638318745101002001000020020000200372003711102021009910010010000100006071011611199670100001002003820038200382003820038
1020420037150661993725101001001000010010000500707984120018200372003718638318745101002001000020020000200372003711102011009910010010000100000071011611199670100001002003820038200382003820038
1020420037150061993725101001001000010010000500707984020018200372003718638318745101002001000020020000200372003711102011009910010010000100000071011611199670100001002003820038200382003820038
1020420037150061993725101001001000010010000500707984020018200372003718638318745101002001007020020000200372003711102011009910010010000100000071011611199670100001002003820038200382003820038
1020420037150061993725101001001000010010000500707984020018200372003718638318745101002001000020020000200372003711102011009910010010000100000071011622199670100001002003820038200382003820038
1020420037150375210993725101001021000010010000500707984020018200372003718638318745101002001000020020000200372008511102011009910010010000100010071011611199670100001002003820038200382003820038
10204200371501861993725101001001000010010000500707984120018200372003718638318745101002001000020020000200372003711102011009910010010000100000071011611199670100001002003820038200382003820038
1020420037150661993725101001001000010010000500707984120018200372003718638318745101002001000020020000200372003711102011009910010010000100000071011611199670100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)03181e3a3f4e51schedule 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)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)ld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
10024200371500006199372510010101000010100005070798420018200372003718660318767100102010000202000020037200371110021109101010000100000640216221996910000102003820038200382003820038
10024200371500006199372510010101000010100005070798420018200372003718660318767100102010000202000020037200371110021109101010000100214585640216221996910000102003820038200382003820038
1002420037150027072699372510010101000010100005070798420018200372003718660318767100102010000202000020037200371110021109101010000100000640216221996910000102003820038200382003820038
1002420037150036061993725100101010000101000050707984200182003720037186601118767100102010000202000020037200371110021109101010000100000640216221996910000102003820038200382003820038
1002420037150042906199372510010101000010100005070798420018200372003718660318767100102010000202000020037200371110021109101010000100013640216221996910000102003820038200382003820084
100242003715002408299372510010101000010100005070798420018200842003718660718767100102010000202000020037200371110021109101010000102001003640216221996910000102003820038200382003820038
100242003715002106199372510010101000010100005070798420018200372003718660318767100102010000202000020037200371110021109101010000100000640216221996910000102003820038200382003820038
100242003715003906199372510010101000010100005070798420018200372003718660318767100102010000202000020037200371110021109101010000100010640216221996910000102003820038200382003820038
10024200371500606199372510010101000010100005070798420018200372003718660318767100102010000202000020037200371110021109101010000100000640216221996910000102003820038200382003820038
10024200371500306199372510010101000010100005070798420018200372003718660318767100102010058202000020037200372110021109101010000100009656216221996910000102003820038200382003820038

Test 3: Latency 1->2

Code:

  sha256su0 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)696d6emap 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)9facc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1020420037150006199362510100100100001001000050070792120018200372003718644618741101002001000820020016200372003711102011009910010010000100001117171619979100001002003820038200382003820038
1020420037150006199362510100100100001001000050070792120018200372003718644618741101002001000820020016200372003711102011009910010010000100001117171619978100001002003820038200382003820038
1020420037150006199362510100100100001001000050070792120018200372003718644718740101002001000820020016200372003711102011009910010010000100001117181619978100001002003820038200382003820038
1020420037150006199362510100100100001001000050070792120018200372003718644718741101002001000820020016200372003711102011009910010010000100021117171619978100001002003820038200382003820038
1020420037150006199362510100100100001001000050070792120018200372003718644618741101002001000820020016200372003711102011009910010010000100001117181619979100001002003820038200382003820038
1020420037150006199362510100100100001001000050070792120018200372003718644618740101002001000820020016200372003711102011009910010010000100001117181619979100001002003820038200382003820038
10204200371501506199362510100100100001001000050070792120018200372003718644618740101002001000820020016200372003711102011009910010010000100001117181619978100001002003820038200382003820038
1020420037150006199362510100100100001001000050070792120018200372003718644618740101002001000820020016200372003711102011009910010010000100001117171619978100001002003820038200382003820038
1020420037150006199362510100100100001001000050070792120018200372003718644718740101002001000820020016200372003711102011009910010010000100001117171619979100001002003820038200382003820038
1020420037150006199362510100100100001001000050070792120018200372003718644718741101002001000820020016200372003711102011009910010010000100001117181619979100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)031e3f4e51schedule 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)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
10024200371500103993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100000640316221996810000102003820038200382003820038
1002420037150061993625100101010000101000050707921120018200372003718659318767100102010000202000020037200371110021109101010000100000640216221996810000102003820038200382003820038
1002420037150061993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100000640216221996810000102003820038200382003820038
1002420037150061993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100000640216221996810000102003820038200382003820038
1002420037150061993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100000640216221996810000102003820038200382003820038
1002420037150061991625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110022109101010000100000640216221996810000102003820038200382003820038
1002420037150061993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100000640216221996810000102003820038200382003820038
1002420037150061993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100000640216221996810000102003820038200382003820038
1002420037150061993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100000640216221996810000102003820038200382003820038
1002420037150061993625100101010000101000050707921020018200372003718659318767100102010000202000020037200371110021109101010000100000640216221996810000102003820038200382003820038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  sha256su0 v0.4s, v8.4s
  movi v1.16b, 0
  sha256su0 v1.4s, v8.4s
  movi v2.16b, 0
  sha256su0 v2.4s, v8.4s
  movi v3.16b, 0
  sha256su0 v3.4s, v8.4s
  movi v4.16b, 0
  sha256su0 v4.4s, v8.4s
  movi v5.16b, 0
  sha256su0 v5.4s, v8.4s
  movi v6.16b, 0
  sha256su0 v6.4s, v8.4s
  movi v7.16b, 0
  sha256su0 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 instruction (07)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 miss (a1)l1d cache writeback (a8)acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
160204800406000000000382580100100800001008000050064000008001980038800385997065999180100200800082001600168003880038111602011009910010016000010000001111011721600800351600001008003980039800398003980039
160204800386000000000382580100100800001008000050064000008001980038800385997065999180100200800082001600168003880038111602011009910010016000010000001111011701600800351600001008003980039800398003980039
160204800385990000000382580146100800001028000050064019518005680038800385997065999180100200800082001600168003880038111602011009910010016000010040001111011701600800351600001008003980039800398003980039
1602048003859900000003825801001008000010080000500640000080019800388003859970355999180100200800082001600168003880038111602011009910010016000010002161101111013412400800351600001008003980039800398003980039
1602048003859900001200382580100100800001008000050064000008001980038800385997065999180100200800082001600168003880038111602011009910010016000010000301111011701600800351600001008003980039802338003980039
160204800385990000000382580100100800001008000050064000008001980038800385997065999180100200800082001600168003880038111602011009910010016000010000001111011701600800351600001008003980039800398003980039
160204800386000000000382580100100800231008000050064000008001980038800385997065999180100200800082001600168003880038111602011009910010016000010000001111011701600800951600001008003980039800398003980039
160204800385990000000382580100100800001008000050064000018001980038800385997065999180100200800082001600168003880038111602011009910010016000010000001111016713201800351600001008003980039800398003980039
160204800386000000000382580100100800001008000050064000008001980038800385997065999180100200800082001600168003880038111602011009910010016000010000001111011701600800351600001008003980039800398003980039
1602048003860000000007032580100100800001008000050064000018001980038800385997066004180100200800082001600168003880038111602011009910010016000010000001111011701600800351600001008003980039800398003980039

1000 unrolls and 10 iterations

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

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)5f6061696d6emap 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)accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
1600248003859975552580010108000010800005064000011108001980038800385998636001880010208000020160000800388003811160021109101016000010000100221321111621169800352013160000108003980039800398003980039
16002480038599055258001010800001080000506400001110800198003880038599863600188001020800002016000080038800381116002110910101600001000310022135151621159800352013160000108003980039800398003980039
16002480038600055258001010800001080000506400001010800198003880038599863600188001020800002016000080038800381116002110910101600001010010022135191621159800352013160000108003980039800398003980039
16002480038599246125800101080000108000050640000110800198003880038599863600188001020800002016000080038800381116002110910101600001000010024165261642259800354026160000108003980039800398003980039
160025800385990612580010108000010800005064000001108001980038800385998636001880010208000020160000800388003811160021109101016000010006100221642101622299800354026160000108003980039800398003980039
160024800385990612580010108000010800005064000000108001980038800385998636001880010208000020160000800388003811160021109101016000010000100241652516412711800354026160000108003980039800398003980039
1600248003859906125800101080000108000050640000011080019800388003859986360018800102080000201600008003880038111600211091010160000100031002262192441159800352013160000108003980039800398003980039
1600248003860006125800101080000108000050640000101080019800388003859986360018800102080000201600008003880038111600211091010160000100001002216619164121010800352026160000108003980039800398003980039
16002480038599061258001010800001080000506400000110800198003880038599863600188001020800002016000080038800381116002110910101600001000610024167261642299800354026160000108003980039800398003980039
16002480038599034625800101080000108000050640000011080019800388003859986360018800102080000201600008003880038111600211091010160000100983100241652916422106800354026160000108003980039800398003980039

Test 5: throughput

Count: 16

Code:

  sha256su0 v0.4s, v16.4s
  sha256su0 v1.4s, v16.4s
  sha256su0 v2.4s, v16.4s
  sha256su0 v3.4s, v16.4s
  sha256su0 v4.4s, v16.4s
  sha256su0 v5.4s, v16.4s
  sha256su0 v6.4s, v16.4s
  sha256su0 v7.4s, v16.4s
  sha256su0 v8.4s, v16.4s
  sha256su0 v9.4s, v16.4s
  sha256su0 v10.4s, v16.4s
  sha256su0 v11.4s, v16.4s
  sha256su0 v12.4s, v16.4s
  sha256su0 v13.4s, v16.4s
  sha256su0 v14.4s, v16.4s
  sha256su0 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)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 access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd2d5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1602041600391199000000382516010010016000010016000050012800000160019160038160038139971613999216010020016000820032001616003816003811160201100991001001600001000000011110117001600160035160000100160039160039160039160039160039
16020416003811980000003825160100100160000100160000500128000011600191600381600381399716139992160100200160008200320016160038160038111602011009910010016000010000081011110117001600160035160000100160039160039160039160039160039
1602041600381199000000382516010010016000010016000050012800000160019160038160038139971613999216010020016000820032001616003816003811160201100991001001600001000025011110117001600160035160000100160039160039160039160039160039
1602041600381199000600102412516012310016002310016007750012801950160056160038160038139971614009016010020016000820032001616003816003811160201100991001001600001000003011110117001600160035160000100160039160039160039160039160039
160204160038119900006003825160100100160000100160000500128000001600191600381600381399716139992160100200160008200320016160038160038111602011009910010016000010000001511110117001600160035160000100160039160039160039160039160039
1602041600381198000000382516010010016000010016000050012800000160019160038160038139971613999216010020016000820032001616003816003811160201100991001001600001000000011110117001600160035160000100160039160039160039160039160039
1602041600381198000000382516010010016000010016000050012800000160019160038160038139971613999216010020016000820032001616003816003811160201100991001001600001000000011110117001600160035160000100160039160039160039160039160039
1602041600381199000000382516010010016000010016000050012800000160019160038160086139971613999216010020016000820032001616003816003811160201100991001001600001000001011110117001600160035160000100160039160039160039160039160039
16020416003811980000008982516010010016000010016000050012800000160019160038160038139971613999216010020016000820032001616003816003811160201100991001001600001000000011110117001600160035160000100160039160039160039160039160039
1602041600381199000000382516010010016000010016000050012800000160019160038160038139971613999216010020016000820032001616003816003811160201100991001001600001000000011110117001600160035160000100160039160039160039160039160039

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)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)5f6061696b6d6emap stall dispatch (70)simd prf full (72)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)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002416003911980109541766125160079101600001016000050128000001016001901600381600381399860314001816018522160000203200801600381600381116002110910101600001002000000010053112121642123160071302616000010160039160039160039160039160039
160024160038119900060612516001010160000101600005012800001101600190160038160038139986031400561600102016000020320088160038160038111600211091010160000100000000001002464141642123160033301416000010160039160039160039160039160039
160024160038119900000612516001010160000101600005012800001151600190160038160038139986031400181600102016000020320000160038160038111600211091010160000100000000001002234131621133160033151316000010160039160039160039160039160039
160024160038119800000552516001010160000101600005012800001151600190160038160038139986031400181600102016000020320000160038160038111600211091010160000100000000001002235131641132160033151316000010160039160039160039160039160039
1600241600381199000004352516001010160000101600005012800001151600190160038160038139986031400181600102016000020320000160038160038111600211091010160000100000000001002235131641233160033152616000010160039160039160039160039160039
160024160038119900000552516001010160000101600005012800001151600190160038160038139986031400181600102016000020320000160038160038111600211091010160000100000000001002284141621143160033151316000010160039160039160039160039160039
1600241600381199000007202516001010160000101600005012800001101600190160038160038139986031400181600102016000020320000160038160038111600211091010160000100000000001002284131621132160033151316000010160039160039160039160039160039
160024160038119900000552516001010160000101600005012800001151600190160038160038139986031400181600102016000020320000160038160038111600211091010160000100000000001002284131621132160033151316000010160039160039160039160039160039
1600241600381199000007202516001010160000101600005012800001151600190160038160038139986031400181600102016000020320000160038160038111600211091010160000100000000001002284131621124160033151316000010160039160039160039160039160039
160024160038119900000556216010210160000101600005012800001151600190160038160038139986031400181600102016000020320000160038160038111600211091010160000100000000001002284131621132160033151316000010160039160039160039160039160039