Apple M1 Microarchitecture Research by Dougall Johnson

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

UADALP (vector, 1D)

Test 1: uops

Code:

  uadalp v0.1d, v1.2s
  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)03191e1f3f4e51inst 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)a6a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
100430372200061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372200061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372310061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303722090175254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372200061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372300061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372306061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372200061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372300061254825100010001000398313130183037303724153289510001000200030373037111001100000073119112630100030383038303830383038
100430372300061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  uadalp v0.1d, v1.2s
  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)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)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)9fa0a1a6a7a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372240000570061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000100071011611296340100001003003830038300383003830038
1020430037225000030061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000000071011611296340100001003003830038300383003830038
1020430037225000000061295482510100100100001001000050042773130300183003730085282653287451010020010000200200003008530133311020110099100100100001000000000071011611296340100001003003830038300383003830038
1020430037225000000094295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000000071011611296340100001003003830038300383003830038
1020430037225000000061295482510100100100001001000050042773131300183003730037282653287451010020010000200226363046030084111020110099100100100001000000000071011611296340100001003003830038300383003830038
1020430037225000000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000000071011611296340100001003003830038300383003830038
1020430037225000000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000000071011611296340100001003003830038300383003830038
1020430037225000090061295482510100100100001001000050042773131300183008430037282653287451010020010000200200003003730037111020110099100100100001000000200071011611296340100001003003830038300383003830038
1020430037225000000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000000071011611296340100001003003830038300383003830038
10204300372250000240061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000000071011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)033f4e5051inst 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)9fa8acc5branch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037225536295480251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000640216222963010000103003830038300383003830038
1002430037225251295480251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100600640216222963010000103003830038300383003830038
10024300372256129548025100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010011400640216222963010000103003830038300383003830038
1002430037224612954802510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001001200640216222963010000103003830038300383003830038
10024300372256129548025100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010011400640216212963010000103003830038300383003830038
100243003722561295480251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000640216222963010000103003830038300383003830038
100243003722461295480251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100300640216222963010000103003830038300383003830038
10024300372256129548025100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010015000640216222963010000103003830038300383003830038
1002430037224612954802510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001001800640216222963010000103003830038300383003830038
10024300372256129548025100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010017700640216222963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  uadalp v0.1d, v0.2s
  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)030818191e1f3a3f4e51inst 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)9fa1a8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250000006129547251010010010000100100005004277160130018300373003728271112874010100200100082002001630037300371110201100991001001000010000011171701600296460100001003003830038300383003830038
1020430037225000000256295472510100100100001001000050042771601300183003730037282717287411010020010008200200163003730037111020110099100100100001000015611171701600296460100001003003830038300383003830038
1020430037225000000631295472510100100100001001000050042771601300183003730037282716287401010020010008200200163003730037111020110099100100100001000018011171801600296450100001003003830038300383003830038
102043003722500000053629547251010010010000100100005004277160130018300373003728271728741101002001000820020016300373003711102011009910010010000100003011171701600296460100001003003830038300383003830038
1020430037225000000612954725101001001000010010000582427716013001830037300372827162874110100200100082002001630037300371110201100991001001000010000611171701600296450100001003003830038300383003830038
10204300372250000006129547251010010010000100100005004277160130018300373003728271728740101002041000820020016300373003711102011009910010010000100008711171801600296450100001003003830038300383003830038
1020430037225000900612954725101001001000010010000500427716013001830037300372827172874110100200100082002001630037300371110201100991001001000010000011171701600296450100001003003830038300383003830038
102043003722500000061295472510100100100001001000050042771601300183003730037282717287411010020010008200200163003730037111020110099100100100001000015311171801600296460100001003003830038300383003830038
102043003722500000061295472510100100100001001000050042771601300183003730037282716287411010020010008200200163003730037111020110099100100100001000013811171801600296450100001003003830038300383003830038
1020430037225000000612954725101001001000010010000516427716013001830037300372827162874010100200100082002001630037300371110201100991001001000010020011171801600296460100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03080b181e1f3f4e51inst 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)91inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a6a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250000061295472510010101000010100005042771603001830037300372828632876710160201000020200003003730037111002110901010100001000000006402162229629010000103003830038300383003830038
100243003722500000612954725100101010000101000050427716030018300373003728286328767100102010000202000030037300371110021109010101000010000200306402162229629010000103003830038300383003830038
100243003722500000942954725100101010000101000050427716030018300373003728286328767100102010000202000030037300371110021109210101000010000390006402162229629010000103003830038300383003830038
10024300372250000061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110901010100001000000306402162429667010000103003830038300383003830038
10024300372250000061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110901010100001000000306402162229629010000103003830038300383003830038
10024300372250000061295472510010101000010100005042785123001830037300372828632876710010201000020200003003730037111002110901010100001000000606402162229629010000103003830038300383003830038
10024300372250000061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110901010100001000010306402162229629010000103003830038300383003830038
10024300372250000061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110901010100001000010306402162229629010000103003830038300383003830038
10024300372250000061295272510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110901010100001000010606402162229629010000103003830038300383003830038
10024300372250000061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110901010100001000000006402162229629010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  uadalp v0.1d, v8.2s
  movi v1.16b, 0
  uadalp v1.1d, v8.2s
  movi v2.16b, 0
  uadalp v2.1d, v8.2s
  movi v3.16b, 0
  uadalp v3.1d, v8.2s
  movi v4.16b, 0
  uadalp v4.1d, v8.2s
  movi v5.16b, 0
  uadalp v5.1d, v8.2s
  movi v6.16b, 0
  uadalp v6.1d, v8.2s
  movi v7.16b, 0
  uadalp v7.1d, v8.2s
  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)03181e3f51inst 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)60696d6escheduler 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)9fa8acc5branch mispredict (cb)cdcfd0d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602042008815000502580116100800161008002850064019602004520065200656338012820080028200160056200652006511160201100991001001600001004011110127391687200621600001002006620066200662006620066
1602042006515120292580116100800161008002850064019612004520065200656128012820080028200160056203062006511160201100991001001600001001150111110127081687200621600001002006620066200662006620066
1602042006515002413425801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010001211110127031678200621600001002006620066200662006620066
16020420065151002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010011811110127081697200621600001002006620066200662006620066
1602042006515000292580116100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001000311110127081688200621600001002006620066200662006620066
16020420065150012292580116100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001001311110126081688200621600001002006620066200662006620066
16020420065150002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010010311110127081688200621600001002006620066200662006620066
1602042006515100292580116100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001000011110127081683200621600001002006620066200662006620066
1602042006515000292580116100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001000011110127081688200621600001002006620066200662006620066
1602042006515000292580116100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001000011110127071688200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03191e3f51inst 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)9fa8accfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)dfe0ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002420064150004525800101080000108000050640000112002720046200463228001020800002016000020046200501116002110910101600001000100353126204113422004315160000102004720047200472004720047
16002420046150004525800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001040100333114202128622004330160000102004720047200472004720047
16002420050150004525800101080000108000050640832112002720046200463228001020800002016000020050200461116002110910101600001003100323129202117622004315160000102004720047200472004720047
16002420050150004525800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001040100323114202114322004315160000102004720047200472004720047
160024200461500051258001010800001080000506400001120027200462004632280010208000020160000200462004611160021109101016000010030100323116202116422004315160000102004720051200472004720047
16002420050150004525800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001040100343126204117622004315160000102005120047200472004720047
1600242004615000452580010108000010800005064000011200272004620046322800102080000201600002004620046111600211091010160000101412100326114202114322004715160000102004720047200472004720047
16002420046150004525800101080000108000050640000012002720046200463228001020800002016000020046200461116002110910101600001033100313116202114922004315160000102004720047200472004720047
16002420046150004525800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001050100343114202124422004315160000102004720047200472004720047
16002420046150004525800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001003100313114202116622004315160000102004720047200472004720047

Test 5: throughput

Count: 16

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03070a1e373f51inst 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)60696b6d6edispatch 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)9fa8acc5branch mispredict (cb)cdcfd0d2d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204400673001101750625160108100160017100160020500239915914003004004040039199776199911601202001600322003200644004040048111602011009910010016000010030111101180021611400461600001004004140041400404004140040
1602044004930011004025160109100160017100160020500128013214002004003940040199776199911601202001600322003200644004940039111602011009910010016000010000111101180011611400461600001004005040049400504004040041
1602044004030011013125160117100160009100160020500132013214002004003940049199776200001601202001600322003200644004940040111602011009910010016000010000111101180011611400461600001004004140050400504004040041
1602044004030011017311031601081001600081001600205002399187140021040155401001997761999116012020016003220032006440040400401116020110099100100160000100150111101180011611400371600001004004140040400404004940040
1602044004829911613125160117100160017100160020500132013214002004004040048199776199911601202001600322003200644004940039111602011009910010016000010013111101180011611400371600001004005040041400504004040041
160204400493001101769625160108100160017100160020500132013214002104004940040199776199991601202001600322003200644003940040111602011009910010016000010000111101180011611400371600001004005040050400414004040050
1602044004929911017479925160108100160008100160020500132013214002104004040040199776200001601202001600322003200644003940040111602011009910010016000010000111101180011611400361600001004005040050400414004040050
1602044004030011013025160109100160009100160020500128013214002004004040049199776199911601202001600322003200644004040039111602011009910010016000010000111101180011611400451600001004004040053400494004140041
1602044004930011013025160571100160009100160020500132013114002004004840040199776199911601202001600322003200644004040039111602011009910010016000010000111101180011611400451600001004004040040400494004040040
1602044004830011014025160108100160008100160020500132013214003004004040049199776199901601202001600322003200644004040049111602011009910010016000010000111101180011611400361600001004004040050400404004940050

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0307080a1e1f373a3f51inst 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)5f6061696d6edispatch 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)9fa0a8a9acc5branch mispredict (cb)cfd0d2icache miss (d3)itlb miss (d4)d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002440058300101150004625160010101600001016000050131999711540020400394003919996262001916001020160000203200004003940039111600211091010160000100000001002283103716111212640036217160000104004040041400494004940040
160024400493001010000582516002810160000101600005012800001154002040039400391999632001916001020160000203200004004840039111600211091010160000100000001002483101616111262240036217160000104004040041400404004040040
160024400393000000001552516002710160001101600005012800001154002940039400391999632001916012220160000203200004004940039111600211091010160000100000001002583211516111252140036217160000104004040053400404004040040
1600244003930010100012542516002810160001101600005024388651154002040039400491999632001916001020160000203200004003940039111600211091010160000100000001002483102216111212540036217160000104004040050400414004040040
1600244003930010000015825160027101600171016000050243886511540030400494003919996320019160010201600002032000040039400391116002110910101600001000000010024113102516111162540036217160000104004040041400494004940040
1600244004029910100015625160027101600001016000050128000001540020400394003919996320019160010201600002032000040039400391116002110910101600001001000010024113102516111192640046217160000104004040041400414004040040
1600244003930010100015825160010101600001016000050128000011540020400394003919996320028160010201600002032000040039400391116002110910101600001001001010022114101516112261540036217160000104004040041400404004940040
16002440049299101001805625160028101600001016000050128000011540020400394003919996320019160010201600002032000040049400491116002110910101600001005000010024831026163111428400364114160000104004040041400494004040040
1600244003929910100171672516001010160017101600005012800001154002040039400391999632001916001020160000203200004003940039111600211091010160000100000001002483101716111262040036217160000104004040053400404004040040
160024400393001010000464316001010160000101600005012800000154002040039400391999632001916001020160000203200004003940039111600211091010160000104000001002283102516111242540046217160000104004040041400404004040040