Apple M1 Microarchitecture Research by Dougall Johnson

Firestorm: Overview | Base Instructions | SIMD and FP Instructions
Icestorm:  Overview | Base Instructions | SIMD and FP Instructions

AESD

Test 1: uops

Code:

  aesd v0.16b, v1.16b
  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 (01)cycle (02)03181e3f4e51inst issue (52)~issue fp/simd (54)~dispatch fp/simd (57)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op fp/simd (7e)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst neon or fp (9a)accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
100430372303612548251000100010003983130301830373037241532895100010002000303730371110011000073116112630100030383038303830383038
100430372200612548251000100010003983130301830373037241532895100010002000303730371110011000073116112630100030383038303830383038
100430372200612548251000100010003983130301830373037241532895100010002000303730371110011000073116112630100030383038303830383038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000073116112630100030383038303830383038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000073116112630100030383038303830383038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000073116112630100030383038303830383038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000373116112630100030383038303830843038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000073116112630100030383038303830383038
10043037231132612548251000100010003983130301830373037241532895100010002000303730371110011000073116112630100030383038303830383038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  aesd v0.16b, v1.16b
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)031e1f3a3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a8acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722500076829548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
102043003722400012429548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
102043003722500063129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
102043003722500064329548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
102043003722500048029548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
102043003722500034629548251010011010024100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
102043003722500039429548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
102043003722500012429548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
102043003722400029229548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
102043003722500022329548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)0308090b18191e1f3a3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a6a8a9acc2c5cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372320000090061295482510010101000010100005042773133001830037300372828732876710160201000020200003003730084111002110910101000010000000006612164229630010000103003830038300383003830038
100243003723300000000945295482510010101000010100005042786703001830037300372828732876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
10024300372330000000019132954825100101010000101000050427731330018300373003728287122876710012201000020203363003730037111002110910101000010000000006402162229630010000103003830038300383003830038
10024300372330000026400554295482510010101000010100005042773133001830084300372828732886210010201016620200003003730037111002110910101000010000000206612162229630010000103003830038300383003830038
10024300372330000026400145295482510028101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038301323003830038
100243003723300000000532295482510010101000810100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000020006402162429630010000103003830038300383003830038
100243003723300000600569295482510010101000010100005042773133001830084300372828732876710010201000020200003003730037111002110910101000010000000206612162229630010000103003830038300383003830133
100243003723200000000124295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
10024300372330000101240810295482510010101000010100005042773133001830133300372828732876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
1002430037233000001500106295482510010101000817100005042786703001830037300372828732876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830086300383003830038

Test 3: Latency 1->2

Code:

  aesd v0.16b, v0.16b
  movi v0.16b, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03080b18191e1f3a3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a6a7a8a9acc2c5branch mispredict (cb)cdcfd0d5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037233000000061295282510100100100001041000053342771603001830037300372827162874110100200100082002001630037300371110201100991001001000010000000000111722032422296290100001003003830038300383003830038
10204300372330000001821295472510100100100001001000050042771603001830037300702825262873310100200100002002000030037300371110201100991001001000010000000000111722022422296291100001003003830038300853008630038
1020430037233000000197295472510100100100001001015052242771603001830037300372825262873310100200100002002000030037300371110201100991001001000010000000000111722022422296290100001003003830038300383003830038
102043003723201001320197295472510100104100001001000050042771603009030037300372825262878910100200100002002000030037300371110201100991001001000010000000002111722022422297000100001003003830038300383003830038
1020430037233001000197295472510100100100001001000050042771603001830037300372825262873310100200100002002046630037300371110201100991001001000010000000000111722025632296290100001003003830038300383013430038
10204300372340000001139295472510100100100001001000050042771603001830037300372825262873310100200101652042000030132301324110201100991001001000010000002000111718004000296451100001003003830038300383013430038
102043003723300002101972954725101001001000010010000500427716030018300373003728252102873310100200101672002000030037300372110201100991001001000010000000000111722022422296290100001003003830086300383003830132
1020430037233000000197295472510100100100001001000050042771603001830037300742825262873310100200100002002000030037300371110201100991001001000010000001030111722022422297020100001003003830038300383022930038
102043003723300005640197295472510100100100001001000051142771603001830037300372825262873310100200100002002000030037300371110201100991001001000010000000000111722022422296290100001003003830038300383003830038
102043003723200300011392954725101001001000010010000500427716030018300373003728252628753101002101000020020000300373003711102011009910010010000100000010109560111769023222296290100001003003830038300383008630038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)0307080a0b18191e1f3a3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a6a8a9acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003723310100000225829547251001010100001010000504277160130018300373003728286328767101602010000202000030037300371110021109101010000100000055100644101610112962910000103003830038300383003830038
10024300372341010000026829547251001010100001010000504277160130018300373003728290328767100102010000202000030037300371110021109101010000100000000644101610102962910000103003830038300383003830038
10024300372331011000026829547251001010100081010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000102000000644111610102962910000103003830038300383003830038
1002430037241101000002682954725100101010000101000050427716013005430037300372828632876710160201000020200003003730037111002110910101000010000000064483210112962910000103003830038300383003830038
10024300372331010000026829547251001010100001010000504277160130018300373003728286328805100102010000202000030037300371110021109101010000100200000644111610112962910000103003830038300383003830038
10024300372321010000882682954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000064411165102962910000103003830038300383003830038
1002430037232101000276026829547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000000665101610102962910000103003830038300383003830038
10024300372331010000026829547251001010100001010000504277160130018300843003728286328767100102010000202000030037300371110021109101010000100000000644101612102962910000103003830132300383003830038
10024300372331010000026829547251001010100001010000504277160130090300373003728286328767100102010000202000030037300371110021109101010000100000000644111616102966710000103003830038300383003830038
1002430037233101000002682954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000064410165102962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03080b18191e3f51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)696d6escheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a8acc2c5branch mispredict (cb)cdcfd5d6dde0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16020420090155000002925801161008001610080028500640196201112006520065612801282008002820016005620065200651116020110099100100160000100000001111011911602006201600001002006620066200662006620162
16020420065155000002925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100000001111011901602006201600001002006620066200662006620066
1602042006515600000292580116100800161008002850064019620045200652006561280128200800282001600562006520065111602011009910010016000010000059801111011901602019501600001002006620066200662006620066
16020420065155000002925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100000021111011901602006201600001002006620066200662006620066
16020420065156000002925801161008012310080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100000001111011901602006201600001002006620066200662006620066
16020420065155000002925801161008001610080028500641036200452006520065612801282008002820016005620065200651116020110099100100160000100000001111011901602028101600001002006620066200662006620066
16020420065155000002925801161008001610080028500640196200452006520065634801282008002820016005620065200651116020110099100100160000100000001111011901602006201600001002006620066200662006620222
16020420065156001002925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100300001111011901602006201600001002006620066200662006620066
160204200651560000012425801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100000001111011901602006201600001002006620066200662006620066
16020420065156000002925801161008001610080028500640196201952006520065612801282008002820016005620065200651116020110099100100160000100000001111011901602006201600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0304080b18191e1f3a3f51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)5f60696d6escheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a6a7a9acc2cfd0d2icache miss (d3)itlb miss (d4)d5d6d9dadbddinst fetch restart (de)e0? int output thing (e9)ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1600242006015510000001802580010108000010800005064000001200332005220052322800102080000201600002005220052111600211091010160000100000098101004164213126322262620049032160000102005320054200532005320053
1600242005215510000000181525800101080000108000050640000012003320053200523228001020800002016000020052200521116002110910101600001000000001004964212826322292920049031160000102005320053200532005320053
160024200521552000000127025800101080000108000050640000012003320052200523228001020800002016000020052200521116002110910101600001000000001005464213326322193120049031160000102005320053200532005320053
16002420052155200000008025800101080000108000050640000012003420053200523228001020800002016000020052200521116002110910101600001000000001005764212926322203120049031160000102005420053200532005320053
16002420052156200000007425800101080000108000050640000012003320052200523228001020800002016000020052200521116002110910101600001000000001004564212326322272320049031160000102005320053200532005320053
16002420052155100000005725800101080000108000050640000012003320052200523228001020800002016000020052200521116002110910101600001000000001005764213126322291620049132160000102005320053200532005320053
16002420052156200000005125800101080208108000050640000012003320052202123228001020800002016000020052200521116002110910101600001000000001005564213026322203120049031160000102005420053200532005320053
16002420052155200000017425800101080000108000050640000012003420052200523228001020800002016000020052200521116002110910101600001000000001005364212326322321920049031160000102005320053200532005320053
160024200521552000000013925800101080000108000050640000012003320052200523228001020800002016000020052200521116002110910101600001020200001005764213226322293020049031160000102005320053200532005320053
1600242005215620000249007425800101080000108000050640000012003320052200523228001020800002016000020052200521116002110910101600001000000001005864213126322303120049031160000102005320053200532005320053

Test 5: throughput

Count: 16

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)0307080a0b18191e1f3f51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a7a8a9acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204400593100010000030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000014701111011811611400361600001004004040040400404014640040
16020440039311101000903025160108100160008100160020500128013204002040090400391997762004416012020016003220032006440039400391116020110099100100160000100000002701111011831611400361600001004004040040400404004040040
160204400393101010000020425160108100160008100160020500128013204002040039400391997761999016012020016003220032006440154400391116020110099100100160000100000003001111011811611400361600001004004040040400404004040040
1602044003931010100000302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000070901111011814111400361600001004004040040400404004040040
160204400393101010000030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000062901111011811611400361600001004004040040400404004040040
16020440039310101000011610226160116100160016100160435500128019604002940049400491997691998616012820016003820032007640048400481116020110099100100160000100000701202221012822322400461600001004004940050400504004940049
160204400483110000000064261601161001600161001600285001284280140029400484004919976101998616012820016003820032007640048400491116020110099100100160000100000340002221012822322400451600001004004940049400504005040050
160204400493100000000045426160116100160016100160028500128019614002940049400481997692001416012820016003820032007640049400481116020110099100100160000100000100922221012832322400461600001004004940049400494004940049
1602044004831100002000642616011610016001610016002850012801960400294004840049199769199861601282001600382003200764004840048111602011009910010016000010000060902221016322322400451600001004004940049400494004940050
1602044004831000000000642616011610016001610016002850012801961400294004840049199769199861601282001600382003200764004940048111602011009910010016000010000000902221012822322400461600001004004940049400504004940050

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030708090b18191e1f3f51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)5f60696d6edispatch stall (70)72scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a6a7a8a9acc2cdcfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160024400393100010000027025160010101600001016000050128000001400204003940039199960162001916001020160000203200004003940140111600211091010160000100200000001002232222164121717400363010160000104004040040400884004040040
160024400393110000000046251600101016000010160000501280000114002040039400391999603200191600102016000020320000400394010811160021109101016000010000000002100223112016211201740036155160000104004040040400684004040040
1600244003931000002000462516001010160000101600005012800000140020400394003919996032001916001020160000203200004017540039111600211091010160000100000000001002231120162111921400361510160000104004040040400684004040040
16002440039310000000004625160010101600001016010650128000011400204003940039199960320019160010201600002032000040039400391116002110910101600001000002052500100223111716211201940036155160000104004040040400664004040040
16002440039311000000011646251600101016000010160000561280000114002040039400391999603200191600102016000020320000400394003911160021109101016000010000030000100223111716211202040036155160000104004040040400664004040040
16002440039311000000002521001600101016000010160000501280836014002040144400391999603200191600102016000020320000400394003911160021109101016000010200000000100243111939211171740036155160000104004040040400684004040040
160024400393110001000046251600101016000010160000501280000114002040039400391999603200191600102016021120320424400394003911160021109101016000010000000040100223111816211141640036155160000104004040040400624004040040
160024400393100010000046251600101016000010160000501280000114002040039400392002403200191600102016000020320000401434003911160021109101016000010200030000100223111416211192040036155160000104004040040400654004040040
1600244003931000000000331251600101016000010160000501280000114002040039400391999603200191600102016000020320000400394003911160021109101016000010000010000100223111716211191940036175160000104004040040400644004040040
1600244003931100000000462516010910160000101600005012800001140020400394003919996711200991600102016000020320000400394003911160021109101016000010000054000100223111716211201940036155160000104004040040400714004040040