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

Test 1: uops

Code:

  ssra d0, d1, #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)031e1f3f4e51inst 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)acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004303722006125482510001000100039831313018303730372415328951000100020003037303711100110000073216112630100030383038303830383038
1004303723006125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723008225482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230010325482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303722006125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230010325482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723006125482510001000100039831313018303730372415328951000100020003037303711100110000073116112701100030383038303830383038
1004303723006125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303722006125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723006125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  ssra d0, d1, #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)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)9fa1a6a8a9accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000371021611296340100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
10204300372240000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000012071011611296340100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
10204300372240000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
102043003722500000103295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773131300183003730037282656287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)0308181e3f4e51inst 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)9fa8cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250106129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100640316222963010000103003830228300383003830038
1002430037241102716029548251001010100001510000504277797130018300373003728287328767100102010000202000030037300371110021109101010000100640216222963010000103003830038300383003830038
10024300372250006129548251001010100001010000504277313130018300373003728287328767101582010000202000030037300371110021109101010000100640216222963010000103003830038300383003830038
100243003722400061329548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100640216222963010000103003830038300383003830038
100243003722500068429548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000101640216222963010000103003830038300383003830038
100243003722400086729548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100640216222963010000103003830038300383003830038
10024300372250006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100640216222963010000103003830038300383003830038
100243003722500021229548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100640216222963010000103003830038300383003830038
100243003722500012829548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100640216222963010000103003830038300383003830038
100243003722500019129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100640217222963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  ssra d0, d0, #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)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)9fa8acc2c5branch mispredict (cb)cdcfd6dde0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225168612954725101001001000010010000500427716013001830037300372827162874010100200100082002001630037300371110201100991001001000010000011171716029645100001003003830038300383003830038
102043003722512612954725101001001000010010000500427716013001830037300372827162874010100200100082002001630037300371110201100991001001000010000011171816029646100001003003830038300383003830038
10204300372250612954725101001001000010010000500427716003001830037300372827172874110100200100082002001630037300371110201100991001001000010000011171816029645100001003003830038300383003830038
10204300372240612954725101001001000010010000500427716003001830037300372827162874010100200100082002001630037300371110201100991001001000010000011171716029646100001003003830038300383003830038
10204300372256612954744101001001000010010000500427716013001830037300372828562874110100200100082002001630037300371110201100991001001000010070011171716029646100001003003830038300383003830038
10204300372250612954725101001001000010010000500427716003001830037300372827162874110100200100082002001630037300371110201100991001001000010000011171816129645100001003003830038300383003830038
10204300372250612954725101001001000010010000500427716013001830037300372827162874110100200100082002001630037300371110201100991001001000010000011171716029645100001003003830038300383003830038
10204300372250612954725101001001000010010000500427716003001830037300372827162874110100200100082002001630037300371110201100991001001000010000011171716029645100001003003830038300383003830038
102043003722515612954725101001001000010010000500427716003001830037300372827162874110100200100082002001630037300371110201100991001001000010000011171716029645100001003003830038300383003830038
102043003722542612954725101001001000010010000500427716003001830037300372827172874110100200100082002001630037300371110201100991001001000010000011171716029645100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

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

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  ssra d0, d8, #3
  movi v1.16b, 0
  ssra d1, d8, #3
  movi v2.16b, 0
  ssra d2, d8, #3
  movi v3.16b, 0
  ssra d3, d8, #3
  movi v4.16b, 0
  ssra d4, d8, #3
  movi v5.16b, 0
  ssra d5, d8, #3
  movi v6.16b, 0
  ssra d6, d8, #3
  movi v7.16b, 0
  ssra d7, d8, #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)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)6061696b6d6escheduler 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)9fa0a7a8acc5branch mispredict (cb)cdcfd0d2d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16020420078150018191258011610080016100800285006401960020045020065200656128012820080028200160056200652006511160201100991001001600001000026111101235121633200621600001002006620066200662006620066
16020420065150012675258011610080016100800285006401961020045020065200656128012820080028200160056200652006511160201100991001001600001000006111101225141643200621600001002006620066200662006620066
160204200651510073258011610080016100800285006401960520045020065200656128012820080028200160056200652006511160201100991001001600001000003111101230141635200621600001002006620066200662006620066
1602042013315004275258011610080016100800285006401960520045020065200656128012820080028200160056200652006511160201100991001001600001000006111101220131634200621600001002006620066200662006620066
16020420065151036314258011610080016100800285006401961020045020065200656128012820080028200160056200652006511160201100991001001600001000006111101220141643200621600001002006620066200662006620066
1602042006515002752258011610080016100800285006401961520045020065200656128012820080028200160056200652006511160201100991001001600001000026111101225141643200621600001002006620066200662006620066
16020420065150040575258011610080016100800285006401961020045020065200656128012820080028200160056200652006511160201100991001001600001000003111101230141634200621600001002006620066200662006620066
160204200651510447292580116100800161008002850064019600200450200652006561280128200800282001600562006520065111602011009910010016000010000069111101220121622200621600001002006620066200662006620066
1602042006515104573258011610080016100800285006401961020045020065200656128012820080028200160056200652006511160201100991001001600001000026111101230131644200621600001002006620066200662006620066
1602042006515103375258011610080016100800285006401960020045020065200656128012820080028200160056200652006511160201100991001001600001000020111101220131633200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0307080a1e3f51inst 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)9fa8acc2cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1600242006315020005725800101080000108000050640000112002720053200463228001020800002016000020046200461116002110910101600001000010040311202021117172004315160000102004720047200472004720047
1600242005015010005125800101080000108000050640000112002720065200463228001020800002016000020046200461116002110910101600001000010042311192021117192004315160000102004720047200472004720047
16002420046150000244525800101080000108000050640000112002720053200463228001020800002016000020046200461116002110910101600001000010037311202021120182004315160000102004720047200472004720047
1600242004615010194525800101080000108000050640000112002720065200463228001020800002016000020046200461116002110910101600001000010041311192021117182004315160000102004720047200472004720047
1600242004615010235725800101080000108000050640000102002720057200503228001020800002016000020046200461116002110910101600001000010045611202021121192004315160000102004720047200472004720047
1600242004615020205725800101080000108000050640000112002720068200463228001020800002016021020046200461116002110910101600001003010039311172021117122004315160000102004720047200472004720047
16002420046150100124525800101080000108000050640000102002720053200463228001020800002016000020046200461116002110910101600001000010041311192021118182004315160000102004720047200472004720047
1600242004615010139325800101080000108000050640000102002720053200463228001020800002016000020046200461116002110910101600001000010040311182021120192017415160000102004720047200472004720047
1600242004615010105725800101080000108000050640000112002720053200463228001020800002016000020046200461116002110910101600001000010046322172021113182004315160000102004720047200472004720047
16002420050150000125725800101080000108000050640000112028620065200463228001020800002016000020046200461116002110910101600001000010042311212021118202004315160000102004720047200472004720047

Test 5: throughput

Count: 16

Code:

  ssra d0, d16, #3
  ssra d1, d16, #3
  ssra d2, d16, #3
  ssra d3, d16, #3
  ssra d4, d16, #3
  ssra d5, d16, #3
  ssra d6, d16, #3
  ssra d7, d16, #3
  ssra d8, d16, #3
  ssra d9, d16, #3
  ssra d10, d16, #3
  ssra d11, d16, #3
  ssra d12, d16, #3
  ssra d13, d16, #3
  ssra d14, d16, #3
  ssra d15, d16, #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)030b18193f51inst 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)6061696d6edispatch 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)9fa7a8a9acc5branch mispredict (cb)cdcfd0d2d6e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204400613000003025160108100160008100160020500128013205400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000033111101185116400361600001004004040040400404004040040
160204400393000003025160108100160008100160020500128013210400204003940089199776199901601202001600322003200644003940039111602011009910010016000010000030111101185116400361600001004004040040400404004040040
160204400393000003025160108100160008100160020500128013210400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000033111101185116400361600001004004040040400404004040040
16020440039300000302516010810016000810016002050012801321040020400394003919977619990160230200160032200320064400394003911160201100991001001600001000000111101185116400361600001004004040040400404004040040
160204400393000003025160108100160008100160020500128013205400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000039111101185116400361600001004004040040400404004040040
16020440039300000302516010810016000810016002050012801321540020400394003919977619990160120200160032200320064400394003911160201100991001001600001000009111101185116400361600001004004040040400404004040040
1602044003930000030251601081001600081001600205001280132154002040039400391997761999016012020016003220032006440039400391116020110099100100160000100000108111101180016400361600001004004040040400404004040040
16020440039299000302516010810016000810016002050012801321540020400394003919977619990160120200160032200320064400394003911160201100991001001600001000103111101185116400361600001004004040040400404004040040
16020440039300000302516010810016000810016002050012809921540020400394003919977619990160120200160032200320064400394003911160201100991001001600001000003111101185016400361600001004004040040400404004040040
160204400393000003025160108100160008100160020500128013215400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000027111101185116400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030818191e1f3a3f51inst 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)9fa0a1a8a9acc2cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1600244003930000000046251600101016000010160000501280000115400204003940039199963200191600102016000020320000400394003911160021109101016000010000000100228412016111161640036206160000104004040040400404004040088
1600244003930000000046251600101016000010160000501280000115400204003940039199963200191600102016000020320000400394003911160021109101016000010000000100228111716211171640036206160000104004040040400404004040040
1600244003929900000067251600101016000010160000501280000115400204024640039199963200191600102016000020320000400394003911160021109101016000010000000100228411816111171740036206160000104004040040400404004040040
16002440039300000000902516001010160000101600005012800001154002040039400391999632001916001020160000203200004003940039111600211091010160000100000001002411521816412181940036206160000104004040040400404004040040
1600244003930000000046251600101016000010160000501280000115400204003940039199963200471600102016000020320000400394003911160021109101016000010000000100228411816111141940036416160000104004040040400404004040040
1600244003930000000046251600101016000010160000501280000110400204003940039199963200191600102016000020320000400394003911160021109101016000010000000100228611716211192040036206160000104004040040400404004040040
1600244003930000000046251600101016000010160000501280000115400204003940039199963200191600102016000020320000400394003911160021109101016000010000000100228411616211181740036206160000104004040040400404004040040
1600244003929900000046251600101016000010160000501280000115400204003940039199963200191600102016000020320000400394003911160021109101016000010000000100228411716111191840036217160000104004040040400404004040040
16002440039300000000711251600101016000010160000501280000115400204003940039199963200191600102016000020320000400394003911160021109101016000010000000100228411816411181640036217160000104004040040400404004040040
1600244003930000030046251600101016000010160000501280000115400204003940039199963200191600102016000020320000400394003911160021109101016000010000000100228611516211151540036206160000104004040040400404004040040