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, 8H)

Test 1: uops

Code:

  uadalp v0.8h, 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)031e3f4e51inst 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)a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
100430372208225482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372306125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037231806125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372306125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372306125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372308425482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372206125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723061254825100010001000398313030183037303724153289510001000200030373037111001100004273116112630100030383038303830383038
100430372306125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372308225482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  uadalp v0.8h, 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)03080918191e1f3a3f4e51inst 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)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)9fa1a6a7a8a9acc2c5branch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225000000061295482510100100100001001000050042773131300180300373003728265032874510100200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038
1020430037225000000061295482510100100100001001000050042773131300180300373003728265032874510253200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038
1020430037225000000061295482510100100100001001000050042773131300180300373003728265032874510100200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038
1020430037225000000061295482510100100100001001000050042773131300180300373003728265032874510100200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038
1020430037225000000061295482510100100100001001000050042773131300180300373003728265032874510100200100002002000030037300371110201100991001001000010000000000074011611296340100001003003830038300383003830038
1020430037225000000061295482510100100100001001000050042773131300180300373003728265032874510100200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038
1020430037224000000061295482510100100100001001000050042773131300180300373003728265032874510100200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038
1020430037225000000061295482510100100100001001000050042773131300180300373003728265032874510100200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038
1020430037225000000061295482510100100100001001000050042773131300180300373003728265032874510100200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038
1020430037225000000061295482510100100100001001000050042773131300180300373003728265032874510100200100002002000030037300371110201100991001001000010000000000073511611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03081e3f4e51inst 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)9fa0a8a9acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372251074129548251001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001040200640416552963010000103003830038300383003830038
10024300372250072629548251001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001000000640516552963010000103003830038300383003830038
10024300372250025129548251001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001000000669516552963010000103003830038300383003830038
100243003722400134429548251001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001000000640516562963010000103003830038300383003830038
1002430037225006129548251001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001000000640616662963010000103003830038300383003830038
10024300372250072629548251001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001000000640516642963010000103003830038300383003830038
1002430037225006129548251001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001000000640516662963010000103003830038300383003830038
1002430037224006129548251001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001000000640616652963010000103003830038300383003830038
1002430037225006129548251001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001000000640516662963010000103003830038300383003830038
1002430037225006129548251001010100001010000504277313300183003730037282873287671001020100002020000300373003711100211091010100001000000640616652963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  uadalp v0.8h, 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)033f4e51inst 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)9fa8a9acc5branch mispredict (cb)cdcfd6e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372256129547251010010010000100100005004277160030018030037300372827162874110100200100082002001630037300371110201100991001001000010000011171816296460100001003003830038300383003830038
10204300372256129547251010010010000100100005004277160130018030037300372827162874110100200100082002001630037300371110201100991001001000010000011171716296460100001003003830038300383003830038
10204300372256629547251010010010000100100005004277160130018030037300372827162874110100200100082002001630037300371110201100991001001000010000011171716296450100001003003830038300383003830038
10204300372256129547251010010010000100100005004277160030018030037300372827172874110100200100082002001630037300371110201100991001001000010000011171816296450100001003003830038300383003830038
10204300372256129547251010010010000100100005004277160130018030037300372827162874110100200100082002001630037300371110201100991001001000010000011171716296460100001003003830038300383003830038
10204300372256129547251010010010000100100005004277160130018030037300372827172874110100200100082002001630037300371110201100991001001000010000011171816296450100001003003830038300383003830038
10204300372256129547251010010010000100100005004277160130018030037300372827172874010100200100082002001630037300371110201100991001001000010000011171716296460100001003003830038300383003830038
10204300372256129547251010010010000100100005004277160030018030037300372827162874010100200100082002001630037300371110201100991001001000010000011171716296450100001003003830038300383003830038
10204300372256129547251010010010000100100005004277160130018030037300372827172874010100200100082002001630037300371110201100991001001000010000011171816296460100001003003830038300383003830038
10204300372256129547251010010010000100100005004277160030018030037300372827162874010100200100082002001630037300371110201100991001001000010000011171716296460100001003003830038300383003830085

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)031e3f4e51inst 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)9fa8acc2cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722506129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000101600640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160030018300373003728286328767100102010000222000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100001640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
1002430037225666129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640217222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  uadalp v0.8h, v8.16b
  movi v1.16b, 0
  uadalp v1.8h, v8.16b
  movi v2.16b, 0
  uadalp v2.8h, v8.16b
  movi v3.16b, 0
  uadalp v3.8h, v8.16b
  movi v4.16b, 0
  uadalp v4.8h, v8.16b
  movi v5.16b, 0
  uadalp v5.8h, v8.16b
  movi v6.16b, 0
  uadalp v6.8h, v8.16b
  movi v7.16b, 0
  uadalp v7.8h, 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)031e3f51inst 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)9facc5branch mispredict (cb)cdcfd6e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204200911500292580116100800161008002850064019620045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
160204200651500292580116100800161008002850064019620045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
160204200651510292580116100800161008002850064019620045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
16020420065150171292580116100800161008002850064019620045200652014661280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620146
160204200651500292580116100800161008002850064019620045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
16020420065150105292580116100800161008002850064019620045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
1602042006515001242580116100800161008002850064019620045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
16020420065150426292580116100800161008002850064019620045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
160204200651500292580116100800161008002850064019620045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
160204200651510292580116100800161008002850064019620045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030708090a0b18191e3f51inst 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)5f6061696d6escheduler 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)9fa0a1a6a7a8a9acc2cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaebec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1600242008415000000000452780010108000010800005064000011520032200512005132280010208000020160000200512006011160021109101016000010000000001003481110252121210200592001160000102005220052200522005220052
1600242005115000000001245278001010800001080000506400001152003220051200513228001020800002016000020060200621116002110910101600001000000000100368211025211910200482001160000102005220052200522005220052
1600242005115000000000452780010108000010800005064000001520041200602006032280010208000020160000200512005111160021109101016000010000000001003584212252111011200484001160000102005220052200522005220061
1600242005115000010000452780010108000010800005064000001520032200512005132280010208000020160000200512005111160021109101016000010000000001003385211252111212200484101160000102005220063200522005220052
16002420051151000001007102780010108000010800005064000011520043200602005132280010208000020160000200602005111160021109101016000010000000001003484113252111111200484001160000102006120063200632006120063
1600242006015000000000452780010108000010800005064000011520032200512005132280010208000020160000200512005111160021109101016000010000000001003384112364121112200572001160000102005220052200522005220052
1600242005115000000000452780010108000010800005064000011520032200512005132280010208000020160000200512005111160021109101016000010000000001003684111252111311200482001160000102005220052200522005220052
160024200511500000000045278001010800001080000506400001152003220051200623228001020800002016000020060200601116002110910101600001000000000100338411436411910200592001160000102005220052200522005220061
1600242005115000000000452780010108000010800005064000011520032200512005132280010208000020160000200512005111160021109101016000010000000001003584112252111210200482001160000102005220052200522005220052
1600242005115000000000452780010108000010800005064000001520032200512005132280010208000020160000200602006011160021109101016000010000000001003484110252111112200482001160000102005220052200522005220052

Test 5: throughput

Count: 16

Code:

  uadalp v0.8h, v16.16b
  uadalp v1.8h, v16.16b
  uadalp v2.8h, v16.16b
  uadalp v3.8h, v16.16b
  uadalp v4.8h, v16.16b
  uadalp v5.8h, v16.16b
  uadalp v6.8h, v16.16b
  uadalp v7.8h, v16.16b
  uadalp v8.8h, v16.16b
  uadalp v9.8h, v16.16b
  uadalp v10.8h, v16.16b
  uadalp v11.8h, v16.16b
  uadalp v12.8h, v16.16b
  uadalp v13.8h, v16.16b
  uadalp v14.8h, v16.16b
  uadalp v15.8h, 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)031e373f51inst 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)696b6d6edispatch 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)9fa0a1a6a7a8a9acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204400603000039251601081001600181001600205002477133400200400494004919977620000160120200160032200320064400404004811160201100991001001600001000000005341111011821622400371600001004005540050400404004940041
1602044004830000302516010910016000910016002050012801324002004004940039199776200001601202001600322003200644003940048111602011009910010016000010000000001111011811611400461600001004004040041400414004040050
160204400403000181252516011710016000910016002050012801324002004003940048199776199901601202001600322003200644003940048111602011009910010016000010000000001111011811622400491600001004004040050400584005040049
160204400493000196524160133100160017100160028500238802240039040058400491997610199861601282001600382003200764004940058111602011009910010016000010000000062221012832344400451600001004005040050400494004940050
16020440049300017642616013310016003510016002850013463734003004004840048199769199861601282001600382003200764004840049111602011009910010016000010000000092221012832333400461600001004005040050400504005040049
16020440049300018642416013310016003310016002850023880224003004005040049199769199881601282001600382003200764004940058111602011009910010016000010000000002221012832333400461600001004005040049400494004940049
16020440048300017642616011710016003310016002850012805984002904004840049199769199881601282001600382003200764004940058111602011009910010016000010000000062221012932333400461600001004005040049400494005040050
16020440049300018446271601191001600181001600285002388872400300400494004919976101998616012820016003820032007640049400491116020110099100100160000100000000932221012832333400461600001004005040049400504005040072
16020440049300017642416011910016003310016015250023877994002904004840048199716200211601002001600002003200004004840048111602011009910010016000010000000032221012842333400461600001004005040050400594005040050
16020440048300018892616012010016003310016002850023879954003204004840049199761019989160128200160038200320076400494006011160201100991001001600001000000001082221012832334400551600001004007640049400514005040058

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03081e1f373f51inst 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)9fa6a8accdcfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0? int output thing (e9)eaebec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1600244004029900005625160010101600181016000050128000001540020400394003919996320019160010201600002032000040039400481116002110910101600001006601002232116162117114003604060160000104004040049400404004940049
16002440039300000175525160027101600171016000050239899911104002040039400481999632001916001020160000203200004003940039111600211091010160000102890100221321101621113104003602060160000104004940040400404004040040
16002440048300000175525160044101600011016000050131999911104002940048400391999632001916001020160000203200004004840039111600211091010160000100790100221321101621112124003602090160000104004040049400404004040050
16002440040300018005525160011101600011016000050128000011104002040039400481999632001916001020160000203200004003940039111600211091010160000100890100221312110162118114009902090160000104004040049400404004040040
1600244003930000005525160044101600001016000050128000011104002940039400481999632001916001020160000203200004004840039111600211091010160000100523010022133111162118124003602060160000104004940040400404004940050
1600244004830000017612516002710160000101600005012800001110400204004940039199963200191600102016000020320000400394004811160021109101016000010049601002213311216211974004502090160000104005040040400494004040041
16002440075300000046251600291016000010160518501280000111040020400484003919996320019160010201600002032000040048400391116002110910101600001006001002213317162118104003602090160000104004040049400404004040040
1600244003930000014625160044101600011016000050239899911104002940039400391999632001916001020160000203200004003940039111600211091010160000100613010022133110162111084003602060160000104004040049400904004940050
16002440039300000055251600111016001810160112501280000001040029400484003919996320028160010201600002032000040048400391116002110910101600001000720100221642121642181040036020120160000104005040041400404004040040
16002440039300030017552516023310160000101600005023990271110400294003940075199963200191600102016000020320000400484003911160021109101016000010051301002231112162117104004502060160000104004940040400494004040040