Apple M1 Microarchitecture Research by Dougall Johnson

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

SUQADD (vector, 16B)

Test 1: uops

Code:

  suqadd 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)03080b18191e1f3f4e51inst 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)a0a1a8a9acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
100430372300000061254825100010001000398313130183037303724153289510001000200030373037111001100000000073316112630100030383038303830383038
100430372300000061254825100010001000398313130183037303724153289510001000200030373037111001100000000073116112630100030383038303830383038
100430372300000061254825100010001000398313130183037303724153289510001000200030373037111001100000000073116112630100030383038303830383038
100430372300000082254825100010001000398313130183037303724153289510001000200030373037111001100000000073116112630100030383038303830383038
100430372300000061254825100010001000398313130183037303724153289510001000200030373037111001100000000073116112630100030383038303830383038
100430372300000061254825100010001000398313130183037303724153289510001000200030373037111001100000000073116112630100030383038303830383038
100430372300000061254825100010001000398313130183037303724153289510001000200030373037111001100000000073116112630100030383038303830383038
100430372300000061254825100010001000398313130183037303724153289510001000200030373037111001100000000073116112630100030383038303830383038
100430372300000061254825100010001000398313130183037303724153289510001000200030373037111001100000000073116112630100030383038303830383038
100430372200000061254825100010001000398313130183037303724153289510001000200030373037111001100000000073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  suqadd 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)030b18191e1f3f4e51inst 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)9fa0a6a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003726000030612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296340100001003003830038300383003830038
102043003726000000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296340100001003003830038300383003830038
1020430037260000001032954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296340100001003003830038300383003830038
102043003726000000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296340100001003003830038300383003830038
102043003724100000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030085300373110201100991001001000010000000071011611296340100001003003830038300383003830038
102043003724200000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296341100001003003830038300383003830038
102043003724100000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296340100001003003830038300383003830038
1020430037242000420612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296340100001003003830038300383003830038
102043003723300000612954825101001001000010010000500427731303001830037300862826532874510100200100002002132630131301321110201100991001001000010000100071011611296340100001003008630126300383008530086
102043008423310000612954825101001001000010010000516427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296340100001003003830038300383003830038

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)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)9fa1a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722500612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640416442963010000103003830038300383003830038
100243003722500612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640416342963010000103003830038300383003830038
100243003722500612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640416432963010000103003830038300383003830038
100243003722500612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640416432963010000103003830038300383003830038
100243003722500612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640416342963010000103003830038300383003830038
100243003722500612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640416442963010000103003830038300383003830038
100243003722500612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640316342963010000103003830038300383003830038
100243003722500612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640316342963010000103003830038300383003830038
100243003722500612954825100101010000101000050427731303001830037300372828732876710010201000020200003008430037111002110910101000010000640316342963010000103003830038300383003830038
100243003722400612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640416442963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  suqadd 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)0318191e3f4e51inst 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)9fa0a8acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225000612954725101001001000010010000500427716030018030037300372825262873310100200100002002000030037300371110201100991001001000010000001117222242229629100001003003830038300383003830038
102043003722500216762954725101001001000010010000500427716030018030037300372825462873310100200100002002000030037300371110201100991001001000010000001117222242229629100001003003830038300383003830038
1020430037225000972954725101001001000010010000500427716030018030037300372825262873310100200100002002000030037300371110201100991001001000010000001117222242229629100001003003830038300383003830038
1020430037225000972954725101001001000010010000500427716030018030037300372825262873310100200100002002000030037300371110201100991001001000010000001117222242229629100001003003830038300383003830038
1020430037225000972954725101001001000010010000500427716030018030037300372825262873310100200100002002000030037300371110201100991001001000010000001117222242229629100001003003830038300383003830038
1020430037225110972954725101001001000010010000500427716030018030037300372825262873310100200100002002000030037300371110201100991001001000010000001117222242229629100001003003830038300383003830038
10204300372250009729547251010010010000100100005004277160300180300373003728252112873310100200100002002000030037300371110201100991001001000010000001117222242229629100001003003830038300383003830038
1020430037225000972954725101001001000010010000500427716030018030037300372825262873310100200100002002000030037300371110201100991001001000010000001117222242229629100001003003830038300383003830038
1020430037224000972954725101001001000010010000500427716030018030037300372825262873310100200100002002000030037300371110201100991001001000010000001117222242229629100001003003830038300383003830038
1020430037224000972954725101001001000010010000500427716030018030037300372825262873310100200100002002000030037300371110201100991001001000010000301117222242229629100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03080b18191e1f3f4e51inst 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? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037225000000103295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000000030640216222962910000103003830038300383003830038
10024300372250000561061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000000000640216222962910000103003830038300383003830038
10024300372250000543061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000000000640216222962910000103003830038300383003830038
100243003722500005130281295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000000000640216222962910000103003830038300383003830038
100243003722500000061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000000000640216222962910000103003830038300383003830038
100243003722500000061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000000000640216222962910000103003830038300383003830038
100243003722500000061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000000000640216222962910000103003830038300383003830038
100243003722501000061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000000000640216222962910000103003830038300383003830038
100243003722500000061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000000000640216222962910000103003830038300383003830038
100243003722500000082295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000000000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  suqadd v0.16b, v8.16b
  movi v1.16b, 0
  suqadd v1.16b, v8.16b
  movi v2.16b, 0
  suqadd v2.16b, v8.16b
  movi v3.16b, 0
  suqadd v3.16b, v8.16b
  movi v4.16b, 0
  suqadd v4.16b, v8.16b
  movi v5.16b, 0
  suqadd v5.16b, v8.16b
  movi v6.16b, 0
  suqadd v6.16b, v8.16b
  movi v7.16b, 0
  suqadd 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)03080b18191e1f3f51inst 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)9fa0a1a6a7a8a9acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16020420088150000000292580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000000000011110119016002006201600001002006620066200662006620066
16020420065150000000292580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000000100011110119016002006201600001002006620066200662006620066
16020420065150000000292580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000000800011110119016002006201600001002006620066200662006620066
16020420065153000000502580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000000100011110119016002006201600001002006620066200662006620066
16020420065150000000292580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000000100011110119016002006201600001002006620066200662006620066
16020420065150000000292580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000000100011110119016002006201600001002006620066200662006620066
160204200651500000308802580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000000000011110119016002006201600001002006620066200662006620066
16020420065150000000292580116100800161008002850064019612004520065200656128012820080028200160056201332006511160201100991001001600001000000200011110119016002006201600001002006620066200662006620066
1602042006515000001206942580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000000700011110119016002006201600001002006620066200662006620066
16020420065150000000292580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000000000011110119016002006201600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0308181e3f51inst 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)5f60696b6d6escheduler 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)9fa8cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002420068150000452580010108000010800005064000011200270200462005032280010208000020160000200462004611160021109101016000010010044611212021121102004315160000102004720051200472004720051
16002420046150000512580010108000010800005064000001200270200502005032280010208000020160000200462004611160021109101016000010010036622102442211192004730160000102005120051200512005120051
160024200501500005202580010108000010800005064000001200270200462005032280010208000020160000200502004611160021109101016000010010048322212421210222004315160000102004720047200512005120047
16002420050150000512580010108000010800005064000011200313200502004632280010208000020160000200502004611160021109101016000010010035622212442210222004330160000102005120051200472005120047
160024200501500004525800101080000108000050640000112002702004620050322800102080000201600002004620050111600221091010160000100100326129242222192004315160000102004720051200512005120047
160024200501500004525800101080000108000050640000012002702004620050322800102080000201600002004620050111600211091010160000100100323229202212192004730160000102004720051200472005120051
16002420046150000512580010108000010800005064000011200310200462004632280010208000020160000200502005011160021109101016000010010047621212422110222004330160000102004720051200472005120047
160024200501500005125800101080000108000050640000112003102005020050322800102080000201600002005020050111600211091010160000100100356229244228212004730160000102005120051200512005120051
16002420050150003351258001010800001080000506400000120027020050200463228001020800002016000020050200461116002110910101600001001004731121204112192017530160000102005120051200512005120047
1600242004615000051258001010800001080000506400001120027020046200463228001020800002016000020050200501116002110910101600001001004431121202119212004315160000102005120047200472004720051

Test 5: throughput

Count: 16

Code:

  suqadd v0.16b, v16.16b
  suqadd v1.16b, v16.16b
  suqadd v2.16b, v16.16b
  suqadd v3.16b, v16.16b
  suqadd v4.16b, v16.16b
  suqadd v5.16b, v16.16b
  suqadd v6.16b, v16.16b
  suqadd v7.16b, v16.16b
  suqadd v8.16b, v16.16b
  suqadd v9.16b, v16.16b
  suqadd v10.16b, v16.16b
  suqadd v11.16b, v16.16b
  suqadd v12.16b, v16.16b
  suqadd v13.16b, v16.16b
  suqadd v14.16b, v16.16b
  suqadd 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.2502

retire (01)cycle (02)03070a1e3f51inst 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)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)9fa0a1a8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204400593001103025160108100160008100160020500128013214002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000001111013611611400361600001004004040040400404004040040
160204400393001103025160108100160008100160020500128013204002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040
160204400393001103025160108100160008100160020500128013204002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040
160204400393001103025160108100160008100160020500128013204002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040
160204400393001103025160108100160008100160020500128013214002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004009340145400404004040040
160204400393011103025160108100160008100160020500128013204002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040
160204400393001103025160108100160008100160020500128013214002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040
160204400393001103025160108100160008100160020500128013204002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040
160204400393001103025160108100160008100160020500128013204002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040
160204400393001103025160108100160008100160020500128013204002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004024740040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0318191e3f51inst 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)9fa8accfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160024400573000004625160010101600001016000050128000011540020400394003919996320019160010201600002032000040039400391116002110910101600001000100228211916211151440036206160000104004040040400404004040040
160024400393000004625160010101600001016000050128000011540020400394003919996320019160010201600002032000040039400391116002110910101600001000100228211516211151540036206160000104004040040400404004040040
160024400392990004625160010101600001016000050128000011540020400394003919996320019160010201600002032000040039400391116002110910101600001000100228211716211171740036206160000104004040040400404004040040
160024400393000104625160010101600001016000050128000011540020400394003919996320019160010201600002032000040039400391116002110910101600001000100228211516211101740036206160000104004040040400934004040040
160024400392990008825160010101600001016000050128000011540020400394003919996320019160010201600002032000040039400391116002110910101600001000100228311416211151440036206160000104004040040400404004040040
160024400392990004625160010101600001016000050128000011540020400394003919996320019160010201600002032000040039400391116002110910101600001000100228211516211151540036206160000104004040040400404004040040
1600244003930000052125160010101600001016000050128000011540020400394003919996320019160010201600002032000040039400391116002110910101600001000100228211016211141240036206160000104004040040400404004040040
160024400392990004625160010101600001016000050128000011540020400394003919996320019160010201600002032000040039400391116002110910101600001000100228211616211172040036206160000104004040040400404004040040
160024400393000004625160010101600001016000050128000011540020400394003919996320019160010201600002032000040039400391116002110910101600001000100228211316211161640036206160000104004040040400404004040040
160024400392990004625160010101600001016000050128000011540020400394003919996320019160010201600002032000040039400391116002110910101600001000100228211616211151540036206160000104004040040400404004040040