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, 16B)

Test 1: uops

Code:

  ssra v0.16b, v1.16b, #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)03181e3f4e51inst issue (52)~issue fp/simd (54)~dispatch fp/simd (57)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op fp/simd (7e)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst neon or fp (9a)a8cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004303723002512548251000100010003983130301830373037241532895100010002000303730371110011000073216332630100030383038303830383038
100430372200612548251000100010003983130301830373037241532895100010002000303730371110011000073316332630100030383038303830383038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000073316332630100030383038303830383038
100430372200612548251000100010003983130301830373037241532895100010002000303730371110011000073316332630100030383038303830383038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000073316332630100030383038303830383038
100430372300822548251000100010003983130301830373037241532895100010002000303730371110011000073316332630100030383086303830383038
100430372200612548251000100010003983130301830373037241532895100010002000303730371110011000073316322630100030383038303830383038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000073316332630100030383038303830383038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000273316332630100030383038303830383038
100430372200612548251000100010003983130301830373037241532895100010002000303730371110011000073316222630100030383038303830383038

Test 2: Latency 1->1

Code:

  ssra v0.16b, v1.16b, #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)9fa8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225606129548251010010010000100100005004277313130018300373003728272728741101002001000820020016300373003711102011009910010010000100001117180160029646100001003003830038300383003830038
1020430037225426129548251010010010000100100005004277313130018300373003728272728741101002001000820020016300373003711102011009910010010000100001117170160029646100001003003830038300383003830038
1020430037225186129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
10204300372254086129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
10204300372244326129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
1020430037225366129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
10204300372252461295482510100100100001001000050042773130300183003730037282651128745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
10204300372252526129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
10204300372254056129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
10204300372254116129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03040708090a0b18191e1f3a3f4e51inst 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)9fa1a6a7a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250000000000266295482510010101000010100005042773130300183003730037282873287671046020100002020000300373003711100211091010100001000000006441116101029630010000103003830038300383003830038
10024300372250000000000256522954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000000064451651029630010000103003830038300383003830038
10024300372250000000000266295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006441216101029630010000103003830038300383003830038
1002430037225000000007290266295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006441016101029630010000103003830038300383003830038
10024300372250000000000266295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006441016101229630010000103003830038300383003830038
10024300372240000000000266295482510010101000010100005042773131300183003730037282873287851001020100002020000300373003711100211091010100001000000006441016101029695010000103003830038300383003830038
10024300372250000000000266295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006441016101029630010000103003830038300383003830038
100243003722500000000002662954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000003064412168829630010000103003830038300383003830038
10024300372250000000000266295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006441016101029630010000103003830038300383003830038
10024300372250000000000266295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006441016101029630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  ssra v0.16b, v0.16b, #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)0318191e1f3a3f4e51inst 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)9fa0a1a6a7a8a9acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250000061295472510100100100001001000050042771601300183003730037282717287411010020010008200200163003730037111020110099100100100001000000000011171801600296460100001003003830038300383003830038
1020530037225000002019295472510100100100001001000050042771601300183003730037282716287401010020010008200200163003730037111020110099100100100001000000000011171701600296450100001003003830038300383003830038
10204300372250000061295472510100100100001001000050042771601300183003730037282717287401010020010008200200163003730037111020110099100100100001000000000011171801600296450100001003003830038300383003830038
10204300372250000061295472510100100100001001000050042771601300183003730037282716287411010020010008200200163003730037111020110099100100100001000000000011171701600296450100001003003830038300383003830038
10204300372240000061295472510100100100001001000050042771601300183003730037282717287411010020010008200200163003730037111020110099100100100001000000000011171801600296450100001003003830038300383003830038
10204300372250000061295472510100100100001001000050042771601300183003730037282717287401010020010008200200163003730037111020110099100100100001000000000011171801600296450100001003003830038300383003830038
10204300372250000061295472510100100100001001000051642771601300183003730037282716287411010020010008200200163003730037111020110099100100100001000000000011171801600296460100001003003830038300383003830038
102043003722500000612954725101001001000010010000500427716013001830037300372827162874110100200100082002001630037300371110201100991001001000010000004700011171801600296460100001003003830038300383003830038
10204300372250000061295472510100100100001001000050042771601300183003730037282717287401010020010008200200163003730037111020110099100100100001000000000011171801600296460100001003003830038300383003830038
10204300372250000061295472510100100100001001000050042771601300183003730037282716287401010020010008200200163003730037111020110099100100100001000000000011171801600296450100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)031e3a3f4e51inst 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
10024300372250061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
100243003722512061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
100243003722500631295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
10024300372240061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
100243003722500726295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  ssra v0.16b, v8.16b, #3
  movi v1.16b, 0
  ssra v1.16b, v8.16b, #3
  movi v2.16b, 0
  ssra v2.16b, v8.16b, #3
  movi v3.16b, 0
  ssra v3.16b, v8.16b, #3
  movi v4.16b, 0
  ssra v4.16b, v8.16b, #3
  movi v5.16b, 0
  ssra v5.16b, v8.16b, #3
  movi v6.16b, 0
  ssra v6.16b, v8.16b, #3
  movi v7.16b, 0
  ssra v7.16b, v8.16b, #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)033f51inst 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)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602042009015029258011610480016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
1602042006515029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
1602042006515029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
1602042006515129258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
160204200651502925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010001171111011901600200621600001002006620066200662006620066
1602042006515029258011610080016102800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
1602042006515129258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
1602042006515029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
160204200651515225801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010001021111011901600200621600001002006620066200662006620066
1602042006515029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

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)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)9fa1a8acc9cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaebec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160024200751861245278001010800001080000506400001152003220051200513228001020800002016000020051200511116002110910101600001000001003083152542268200574002160000102006120061200612006120061
16002420060185045278001010800001080000506400001152004120060200603228001020800002016000020060200601116002110910101600001000001002682152521153200482002160000102005220052200522005220052
160024200511860512980010108000010800005064000011520032200512005132280010208000020160000200512005111160021109101016000010000010031113243442236200574002160000102006120061200612006120061
160024200511860452780010108000010800005064000001520041200602006032280010208000020160000200602006011160021109101016000010000010031113272522288200574002160000102006120061200612006120061
16002420060174078227800101080000108000050640000015200412006020060322800102080000201600002006020060111600211091010160000100054001002882172521247200482001160000102005220052200522005220052
160024200511730512980010108000010800005064000011520032200512005132280010208000020160000200512005111160021109101016000010000010031113263442275200574002160000102006120061200612006120061
160024200601740452780010108000010801295064000011520032200512005132280010208000020160000200512005111160021109101016000010000010032113253442246200574002160000102006120061200612006120052
160024200601741287278001010800001080000506400000152004120060200603228001020800002016000020060200601116002110910101600001001301003482182541135200482001160000102005220052200522005220061
160024200511611242782980010108000010800005064000011520032200512005132280010208000020160000200512005111160021109101016000010000010033113243442253200574002160000102006120061200612005220061
16002420060160454529800101080000108000050640000015200412006020060322800102080000201600002006020060111600211091010160000100003100313180692021136200431500160000102004720047200472004720047

Test 5: throughput

Count: 16

Code:

  ssra v0.16b, v16.16b, #3
  ssra v1.16b, v16.16b, #3
  ssra v2.16b, v16.16b, #3
  ssra v3.16b, v16.16b, #3
  ssra v4.16b, v16.16b, #3
  ssra v5.16b, v16.16b, #3
  ssra v6.16b, v16.16b, #3
  ssra v7.16b, v16.16b, #3
  ssra v8.16b, v16.16b, #3
  ssra v9.16b, v16.16b, #3
  ssra v10.16b, v16.16b, #3
  ssra v11.16b, v16.16b, #3
  ssra v12.16b, v16.16b, #3
  ssra v13.16b, v16.16b, #3
  ssra v14.16b, v16.16b, #3
  ssra v15.16b, v16.16b, #3
  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)03081e3f51inst 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)9fa8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602044006129900302516010810016000810016002050012801324002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011811632400361600001004004040040400404004040040
1602044003929900302516010810016000810016002050012801324002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011811641400361600001004004040040400404004040040
1602044003930000302516010810016000810016002050012801324007140039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011821632400361600001004004040040400404004040040
1602044003930000302516010810016000810016002050012801324002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011811631400361600001004004040040400404004040040
1602044003930000302516010810016000810016002050012801324002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011821632400361600001004004040040400404004040040
1602044003929900302516010810016000810016002050012801324002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011821632400361600001004004040040400404004040040
1602044003930000302516010810016000810016002050012801324002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011821632400361600001004004040040400404004040040
1602044003930000302516010810016000810016002050012801324002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011821621400361600001004004040040400404004040040
1602044003930000302516010810016000810016002050012801324002040039400391997761999016012020016003220032006440039400391116020110099100100160000100201111011811622400361600001004004040040400404004040040
1602044003930000302516010810016000810016002050012801324002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011821622400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03081e3f51inst 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)9fa1a8accdcfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaebec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002440051299004625160010101600001016000050128000011040020400394003919996320019160010201600002032000040039400391116002110910101600001000001002231111162111084003615510160000104004040040400404004040040
1600244003930000462516001010160000101600005012800001104002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223111216211818400361558160000104004040040400404004040040
16002440039300004625160010101600001016000050128000011040020400394003919996320019160010201600002032000040039400391116002110910101600001010001002231110162111010400361559160000104004040040400404004040040
1600244003930000462516001010160000101600005012800001104002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223111016211107400361556160000104004040040400404004040040
1600244003930001246251600101016000010160000501280000110400204003940039199963200191600102016000020320280400394003911160021109101016000010000010022311816211107400361556160000104004040040400404004040040
1600244003930000462516001010160000101600005012800001104002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223111016211710400361557160000104004040040400404004040040
160024400392990046251600101016000010160000501280000110400204003940039199963200191600102016000020320000400394003911160021109101016000010000010022321816211710400363058160000104004040040400404004040040
1600244003930000462516001010160000101600005012800000104002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223111016211107400361557160000104004040040400404004040040
1600244003930000462516001010160000101600005012800000104002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223111016211107400361555160000104004040040400404004040040
16002440039300004625160010101600001016000050128000011040020400394003919996320019160010201600002032000040039400391116002110910101600001000001002231110162111012400361558160000104004040040400404004040040