Apple M1 Microarchitecture Research by Dougall Johnson

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

SSRA (vector, 4H)

Test 1: uops

Code:

  ssra v0.4h, v1.4h, #3
  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)03081e3f4e51inst issue (52)~issue fp/simd (54)~dispatch fp/simd (57)huge thing fp/simd (5b)696d6edispatch 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
100430372300612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372300612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372300612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723001282548251000100010003983133018303730372415328951000100020003037303711100110000073116112663100030383038303830383038
100430372200612548251000100010003983133054303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372300612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372300612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372300612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230181032548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372200612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  ssra v0.4h, v1.4h, #3
  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)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)9fa8c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250612954825101001001000010010000500427731303001830037300372827262874010100200100082002001630037300371110201100991001001000010001117180160029647100001003003830038300383003830038
10204300372250612954825101001001000010010000500427731303001830037300372827272874010100200100082002001630037300371110201100991001001000010001117170160029646100001003003830038300383003830038
10204300372250612954825101001001000010010000500427731303001830037300372827262874110100200100082002001630037300371110201100991001001000010001117180160029646100001003003830038300383003830038
10204300372240612954825101001001000010010000500427731303001830037300372827272874010100200100082002001630037300371110201100991001001000010001117170160029647100001003003830038300383003830038
10204300372250822954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372250612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372250612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372250612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372250612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830083
102043003722504412954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)030b181e3f4e51inst 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)9fa6a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037225000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225009842954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  ssra v0.4h, v0.4h, #3
  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)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)9fa0a1a6a8acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225000000612954725101001091000010010000500427716013001830228300372825262873310100200100002002000030037300371110201100991001001000010000000011172222422296290100001003003830038300383003830038
1020430037225000000972954725101001001000010010000500427716013001830037300372825262873310100200100002002000030037300371110201100991001001000010000000011172222422296290100001003003830038300383003830038
102043003722500000020829547251010010010000100103005004277160130018300373003728252628733101002001000020020000300373003711102011009910010010000100000011216011172222422296290100001003003830038300383003830038
1020430037225000000612954725101001001000010010000500427716013001830037300372827172874010100200100082002001630037300371110201100991001001000010000000011171701600296450100001003003830038300383003830038
1020430037225000000612954725101001081000010010000500427716013001830037300372827162874010100200100082002001630037300371110201100991001001000010000000011171801600296460100001003003830038300383003830038
1020430037224000000612954725101001001000010010000500428226913001830037300372827162874110100200100082002001630037300371110201100991001001000010000000011171701600296460100001003003830038300383003830038
1020430037225000000612954725101001001000010010000500427716013001830037300372827172874110100200100082002001630037300371110201100991001001000010000000011171701600296450100001003003830038300383003830038
1020430037226000000612954725101001001000010010000500427716013001830037300372827172874010100200100082002001630037300371110201100991001001000010000000011171801600297140100001003003830038300383003830038
1020430037225000000612954725101461001000010010000500427716013001830037300372827172881410100200100082002001630037300371110201100991001001000010000000011171701600296460100001003003830038300383003830038
10204300372250004001242954725101001001000010010000500427716013001830037300372827162874010100200105112002001630037300371110201100991001001000010000000011171801600296460100001003003830038300383003830038

1000 unrolls and 10 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)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)9fa8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722500061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640416552962910000103003830038300383003830038
1002430037224201861295472510010101000010100005042771600300183003730037282863287671001020100002020336300373008421100211091010100001000640516552962910000103003830038300383003830038
100243003722500061295472510010101000010100006642771601300183003730037282863287671001020100002020000300373003711100211091010100001000640616662962910000103003830038300383003830038
100243003723300061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640516662962910000103003830038300383003830038
100243003722500061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640516552962910000103003830038300383003830038
100243003722500061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640416552962910000103003830038300383003830038
100243003722500061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640516552962910000103003830038300383003830038
100243003722400061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640616642962910000103003830038300383003830038
100243003722500061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640516552962910000103003830038300383003830038
100243003722500061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001050640516462962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  ssra v0.4h, v8.4h, #3
  movi v1.16b, 0
  ssra v1.4h, v8.4h, #3
  movi v2.16b, 0
  ssra v2.4h, v8.4h, #3
  movi v3.16b, 0
  ssra v3.4h, v8.4h, #3
  movi v4.16b, 0
  ssra v4.4h, v8.4h, #3
  movi v5.16b, 0
  ssra v5.4h, v8.4h, #3
  movi v6.16b, 0
  ssra v6.4h, v8.4h, #3
  movi v7.16b, 0
  ssra v7.4h, v8.4h, #3
  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)03191e3f5051inst 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)cdcfd5d6e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204200891500029200492580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000011110119116200621600001002006620066200662006620066
16020420065150002902580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000011110119016200621600001002006620066200662006620066
16020420065151002902580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000311110119016200621600001002006620066200662006620066
1602042006515102129025801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010006311110119016200621600001002006620066200662006620066
16020420065150007302580116100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001000011110119016200621600001002006620066200662006620066
16020420065150002902580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000011110119016200621600001002006620066200662006620066
160204200651500242902580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000011110119016200621600001002006620066200662006620066
16020420065150002902580116100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001000011110119016200621600001002006620066200662006620066
160204200651500019202580116100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001000011110119016200621600001002006620066200662006620066
16020420065150002902580116100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001000011110119016200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03040b1e3f51inst 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)9fa8acc5cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1600242007415020045278001010800001080000506400001120032200512005132280010208000020160000200512005111160021109101016000010000100263115252113520048201160000102005220052200522005220052
1600242005115000045278001010800001080000506400001120032200512005132280010208000020160000200512005111160021109101016000010000100273114252114420048201160000102005220052200522005220052
1600242005115000045278001010800001080000506400001120032200512005132280010208000020160000200512005111160021109101016000010000100273114252114320048201160000102005220052200522005220052
1600242005115000068278001010800001080000506400001120032200512005132280010208000020160000200512005111160021109101016000010000100283115252115420048201160000102005220052200522005220052
1600242005115000045278001010800001080000506400001120032200512005132280010208000020160000200512005111160021109101016000010000100273112252113420048201160000102005220052200522005220052
1600242005115000045278001010800001080000506400001120032200512005132280010208000020160000200512005111160021109101016000010000100283113252112320048201160000102005220052200522005220052
1600242005115010045278001010800001080000506400001120032200512005132280010208000020160000200512005111160021109101016000010000100283115252113520048201160000102005220052200522005220052
1600242005115000045278001010800001080000506400001120032200512005132280010208000020160000200512005111160021109101016000010000100273113252112320048401160000102005220052200522005220052
1600242005115000045278001010800001080000506400001120032200512005132280010208000020160000200512005111160021109101016000010000100263115252113420048201160000102005220052200522005220052
1600242005115000045278001010800001080000506400001120032200512005132280010208000020160000200512005111160021109101016000010000100273315252113420048202160000102005220052200522005220052

Test 5: throughput

Count: 16

Code:

  ssra v0.4h, v16.4h, #3
  ssra v1.4h, v16.4h, #3
  ssra v2.4h, v16.4h, #3
  ssra v3.4h, v16.4h, #3
  ssra v4.4h, v16.4h, #3
  ssra v5.4h, v16.4h, #3
  ssra v6.4h, v16.4h, #3
  ssra v7.4h, v16.4h, #3
  ssra v8.4h, v16.4h, #3
  ssra v9.4h, v16.4h, #3
  ssra v10.4h, v16.4h, #3
  ssra v11.4h, v16.4h, #3
  ssra v12.4h, v16.4h, #3
  ssra v13.4h, v16.4h, #3
  ssra v14.4h, v16.4h, #3
  ssra v15.4h, v16.4h, #3
  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)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)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)9fa6a8a9acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204400593000000030251601081001600081001600205001280132140020040039400391997761999016012020016003220032006440039400391116020110099100100160000100020571111011801600400361600001004018140040400404004040040
16020440090301110007425160108100160008100160020500128013214002004003940039199776199901601202001600322003200644003940039111602011009910010016000010004031111011801600400361600001004004040040400404004040040
160204400393000000072251601081001600081001600205001280132140020040039400391997761999016012020016003220032006440039400391116020110099100100160000100000241111011801600400361600001004004040040400404004040040
16020440039299000003025160108100160008100160020500128013204002004003940039199776199901601202001600322003200644003940039111602011009910010016000010004001111011801600400361600001004004040040400404004040040
160204400392990000030251601081001600081001600205001280132140020040039400911997761999016012020016003220032006440039400391116020110099100100160000100000211111011801600400361600001004004040040400944004040040
160204400393000000151056251601081001600081001600205001280132140020040039400391997761999016012020016003220032006440039400391116020110099100100160000100000301111011801600400361600001004004040040400404004040040
1602044003930000000302516010810016000810016002050012801321400200400394003919977619990160120200160032200320064400394003911160201100991001001600001000001201111011801600400361600001004004040040400404004040040
1602044010131000000515116010810016000810016002050012801321400200400394003919977619990160120200160032200320064400394003921160201100991001001600001000001201111011801600400361600001004004040040400404004040040
160204400393000000330251601081001600081001600205001280132040020040039400391997761999016012020016003220032006440039400391116020110099100100160000100000811111011801600400361600001004004040040400404004040040
16020440039300003303025160108100160008100160020500128013204002004003940039199776199901601202001600322003200644003940039111602011009910010016000010004001111011801600400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030b1e3f51inst 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)9fa8acbranch mispredict (cb)cdcfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0? int output thing (e9)eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002440051300006725160010101600001016000050128000010104002040039400391999632001916001020160000203200004003940039111600211091010160000100300100221332616222554003603110160000104004040040400404004040040
160024400393000052251600101016000010160000501280000011040020400394003919996320019160010201600002032000040039400391116002110910101600001062000100241652516422774003603025160000104004040040400404004040040
160024400392990052251600101016000010160000501280000111040020400394003919996320019160010201600002032000040039400391116002110910101600001001200010022135151621187400360155160000104004040040400404004040040
160024400393000052251600101016000010160000501280000010400204003940039199963200191600102016000020320000400394003911160021109101016000010030010022135161622156400360155160000104004040040400404004040040
1600244003930000462516001010160000101600005012800001110400204003940039199963200191600102016000020320000400394003911160021109101016000010019030010022135171621188400360155160000104004040040400404004040040
1600244003929910522516001010160000101600005012800001110400204003940039199963200191600102016000020320000400394003911160021109101016000010000010022135171621165400360155160000104004040040400404004040040
1600244003930000616251600101016000010160000501280000111040020400394003919996320019160010201600002032000040039400391116002110910101600001024300100241662616422974003603110160000104004040040400404004040040
1600244003930000462516001010160000101600005012800000110400204003940039199963200191600102016000020320000400394003911160021109101016000010030010022135181621198400360155160000104004040040400404004040040
1600244003929900462516001010160000101600005012800001110400204003940039199963200191600102016000020320000400394003911160021109101016000010030010022135191621167400360155160000104004040040400404004040040
160024400392990052251600101016000010160000501280000011040020400394003919996320019160010201600002032000040039400391116002110910101600001009510010022135151621165400360155160000104004040040400404004040040