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, 2D)

Test 1: uops

Code:

  ssra v0.2d, v1.2d, #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)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
100430372206125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372206125482510001000100039831313018303730372415328951000100020003037303711100110003073216222630100030383038303830383038
100430372206125482510001000100039831313018303730372415328951000116320003037303711100110000073216222630100030383038303830383038
100430372206125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383085
100430372206125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372306125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372306125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
1004303722025125482510001000100039831313018303730372415328951000100023223037303711100110000073216222630100030383038303830383038
100430372336125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372306125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038

Test 2: Latency 1->1

Code:

  ssra v0.2d, v1.2d, #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)030b1e3f4e51inst 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)9fa0a8c2cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225024612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003722500612954825101001001000010010000500427779713001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003722500612954825101001001000710010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731303001830227300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830085300383008630038
102043003722500612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003722506612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003722506612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)030818191e1f3a3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a6a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037224000240061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003722500000061295482510010101000010100005042773131300183003730037282873287671001020101802020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003722500000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003722500000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003722500000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003722500000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003722500000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003722500000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003722500000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243003722400000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  ssra v0.2d, v0.2d, #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)030918191e3a3f4e51inst 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)9fa8a9acc5branch mispredict (cb)cdcfd6dde0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225000006129547251010010010000100100005004277160130018300373003728271062874010100200100082002001630037300371110201100991001001000010000011171716029646100001003003830038300383003830038
10204300372250000061295472510100100100001001000050042771601300183003730037282710112874010100200100082002001630037300371110201100991001001000010000011171716029645100001003003830038300383003830038
1020430037225000006129547251010010010000100100005004277160030018300373003728271062874110100200100082002001630037300371110201100991001001000010000011171716029645100001003003830038300383003830069
1020430037225000006129547251010010010000100100005004277160030018300373003728271062874110100200100082002001630037300371110201100991001001000010000011171816029645100001003003830038300383003830038
1020430037224100006129547251010010010000100100005004277160030018300373003728271072874110100200100082002001630037300371110201100991001001000010000011171816029646100001003003830038300383003830038
10204300372250008406129547251010010010000100100005004277160030018300373003728271072874110100200100082002001630037300371110201100991001001000010000011171716029646100001003003830038300383003830038
1020430037225000006129547251010010010000100100005004277160030018300373003728271072874110100200100082002001630037300371110201100991001001000010000011171716029646100001003003830038300383003830038
1020430037225000006129547251010010010000100100005004277160030018300373003728271062874110100200100082002001630037300371110201100991001001000010000011171816029646100001003003830038300383003830038
1020430037225000006129547251010010010000100100005004277160030018300373003728271072874010100200100082002001630037300371110201100991001001000010000011171816029645100001003003830038300383003830038
1020430037225000006129547251010010010000100100005004277160030018300373003728271072874110100200100082002001630037300371110201100991001001000010000011171816029646100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)030b1e3f4e51inst 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
10024300372250061295472510010101000010100005042771601300183003730085282863287671001020100002020000300373003711100211091010100001000640316332962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000640316333003310000103003830038300383003830038
10024300372250061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000640316332962910000103003830038300383003830038
10024300372250061295474410010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000640316332962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000640316332962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000640316332962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000640316332962910000103003830038300383003830038
10024300372240061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000640316332962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000640316332962910000103003830038300383003830038
10024300372240061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000640316332962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  ssra v0.2d, v8.2d, #3
  movi v1.16b, 0
  ssra v1.2d, v8.2d, #3
  movi v2.16b, 0
  ssra v2.2d, v8.2d, #3
  movi v3.16b, 0
  ssra v3.2d, v8.2d, #3
  movi v4.16b, 0
  ssra v4.2d, v8.2d, #3
  movi v5.16b, 0
  ssra v5.2d, v8.2d, #3
  movi v6.16b, 0
  ssra v6.2d, v8.2d, #3
  movi v7.16b, 0
  ssra v7.2d, v8.2d, #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)03191e3f51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)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
160204200911501029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100191111011901600200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100701111011901600200621600001002006620066201312006620066
160204200651500029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
1602042006515000541258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03080a0b18191e1f3f51inst 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)9fa0a8a9acc2cfd0d2icache miss (d3)itlb miss (d4)d5d6d9dadbddinst fetch restart (de)e0eaec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160024200701500000000452580010108000010800005064000011102002720046200463228001020800002016000020046200461116002110910101600001000000100453410212021119920043150160000102004720047200472004720047
160024200461500000000175258001010800001080000506400001110200272005020046322800102080000201600002004620046111600211091010160000100000010033136101020211212120043150160000102004720047200472004720047
16002420046150000000045258001010800001080000506408321010200272004620046322800102080000201600002004620046111600211091010160000100000010042135102120211211020043150160000102004720047200472004720047
1600242004615100000005125800101080000108000050640000111020027200462004632280010208000020160000200462004611160021109101016000010000001004513110202021121920043150160000102004720047200472004720047
16002420046150000000045258001010800001080000506400001102002720046200463228001020800002016000020046200461116002110910101600001000000100441311082021120720043150160000102004720047200472004720047
16002420046150000000042525800101080000108000050640000101020027200462004632280010208000020160000200502004611160021109101016000010000001004413510182021120720043150160000102005120047200472004720047
160024200461500000090452580010108000010800005064000011102002720050200463228001020800002016000020046200461116002110910101600001000000100443110202021220920043150160000102004720047200472004720047
1600242004615000000004525800101080000108000050640000110200272004620046322800102080000201600002004620046111600211091010160000100000010041135102020411202020043150160000102004720047200472004720047
160024200461500000000892580010108000010800005064000011102002720046200463228001020800002016000020046200461116002110910101600001000000100331311072421120920047150160000102004720051200472004720047
16002420046150000000045258001010800001080000506400001102002720046200503228001020800002016000020046200461116002110910101600001000000100331361092021172020043150160000102004720047200472004720047

Test 5: throughput

Count: 16

Code:

  ssra v0.2d, v16.2d, #3
  ssra v1.2d, v16.2d, #3
  ssra v2.2d, v16.2d, #3
  ssra v3.2d, v16.2d, #3
  ssra v4.2d, v16.2d, #3
  ssra v5.2d, v16.2d, #3
  ssra v6.2d, v16.2d, #3
  ssra v7.2d, v16.2d, #3
  ssra v8.2d, v16.2d, #3
  ssra v9.2d, v16.2d, #3
  ssra v10.2d, v16.2d, #3
  ssra v11.2d, v16.2d, #3
  ssra v12.2d, v16.2d, #3
  ssra v13.2d, v16.2d, #3
  ssra v14.2d, v16.2d, #3
  ssra v15.2d, v16.2d, #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)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)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? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204400592990000003025160108100160008100160020500128013204002040039400391997761999016012020016003220032006440039400391116020110099100100160000100011110118016224003601600001004004040040400404004040040
160204400393000000570030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000111101180160040036221600001004004040040400404004040040
160204400393000000003025160108100160008100160020500128013214002040039400391997761999016012020016003220032006440039400391116020110099100100160000100011110118016004003601600001004004040040400404004040040
16020440039300000064203025160108100160008100160020500128013204002040039400391997761999016012020016003220032006440039400391116020110099100100160000100011110118016004003601600001004004040040400404004040040
160204400393000000003025160108100160008100160020500128013214002040039400391997761999016012020016003220032006440039400391116020110099100100160000100011110118016004003601600001004004040040400404004040040
16020440039299000084605325160108100160008100160020500128013204002040039400991997761999016012020016003220032006440039400391116020110099100100160000100011110118216224003601600001004004040040400404004040040
160204400392990000003025160108100160008100160020500128013204002040039400391997761999016012020016003220032006440039400391116020110099100100160000100011110118016004003601600001004004040040400404004040040
160204400393000000004525160108100160008100160020500128013214002040039400391997761999016012020016003220032006440039400391116020110099100100160000100011110118016004003601600001004004040040400404004040040
160204400393000000003025160108100160008100160020500128013214002040039400391997761999016012020016003220032006440039400391116020110099100100160000100011110118016004003601600001004004040040400404004040040
160204400393000000003025160108100160008100160020500128013204002040039400391997761999016012020016003220032006440039400391116020110099100100160000100011110118016004003601600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030b1e1f3f51inst 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)5f60696d6edispatch 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
16002440051300000462516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000100223118162115540036155160000104004040040400404004040040
16002440039300000522516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000100223116162115440036155160000104004040040400404004040040
16002440039300000462516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000100223114162115640036155160000104004040040400404004040040
16002440039299000462516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001010100223114162116640036155160000104004040040400404004040040
16002440039300032701554316030010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000100223115164117740036155160000104004040040400404004040040
1600244003930006420462516001010160000101600005012800000140020400394003919996320019160010201600002032000040039400391116002110910101600001000100223115162115540036155160000104004040040400404004040040
1600244003929906360462516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000100223117162115740036155160000104004040040400404004040040
1600244003929906360462516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000100226125164117540036155160000104004040040400404004040040
160024400393000005225160010101600001016000050128000011400204003940039199963200191600102016000020320000400394003911160021109101016000010001002261251621156400361510160000104004040040400404004040040
16002440039300000522516001010160000101600005012800000140020400394003919996320019160010201600002032000040039400391116002110910101600001000100243215164216640036305160000104004040040400404004040040