Apple M1 Microarchitecture Research by Dougall Johnson

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

ZIP2 (vector, 4S)

Test 1: uops

Code:

  zip2 v0.4s, v0.4s, v1.4s
  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)03191e3f4e51inst 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
100420371600611687251000100010002646802018203720371572318951000108920002037203711100110000073316221787100020382038203820382038
100420371600611687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
100420371500611687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
1004203715108251687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
100420371600611687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
100420371600611687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
100420371600611687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
1004203715001031687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
100420371600611687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020742038203820382038
1004203716001451687251000100010002646802018203720371572318951000100020002037203711100110000073324221787100020382038203820382038

Test 2: Latency 1->2

Code:

  zip2 v0.4s, v0.4s, v1.4s
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)03191e3f4e51inst 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)9fa1a6a9acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102042003715503061196872510100100100001001000050028476800200182003720037184296187401010020010008200200162003720037111020110099100100100001000000011171801600198010100001002008520038200382003820038
1020420037155050461196872510100100100001001000050028476801200182003720037184296187411010020010008200200162003720037111020110099100100100001000000011171701600198010100001002003820038200382003820038
10204200371550375346196872510100100100001001000050028476801200182003720037184297187401010020010008200200162003720037111020110099100100100001000000011171801600198010100001002003820038200382003820038
102042003715500536196872510100100100001001000050028476800200182003720037184296187401010020010008200200162003720037111020110099100100100001000006011171701600198010100001002003820038200382003820038
1020420037155034561196872510100100100001001000050028476800200182003720037184223187961010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
1020420037156021361196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
1020420037155032461196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
10204200371550061196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
1020420037155018962196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
102042003715507261196872510100100100001001000050028476801200182003720037184223187451058520010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)0307080b18191e1f3a3f4e51inst 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)9fa0a1a6a7a8acc2cfd0d5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100242003715500000000611968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037111002110910101000010000000064053162219785010000102003820038200382003820038
1002420037161000000005361968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037111002110910101000010000130064052162219785010000102003820038200382003820038
100242003715500000000611968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037111002110910101000010000000064052162219785010000102003820038200382003820038
100242003715600000000611968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037111002110910101000010000000064052162219785010000102003820038200382003820038
100242003715500000000611968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037111002110910101000010000000064002162219785010000102003820038200382003820038
10024200371560000011400611968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037111002110910101000010000000064052162219785010000102003820038200382003820038
100242003715500000000611968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037111002110910101000010000000064052162219785010000102003820071200382003820038
1002420037155000001800611968725100101010000101000050284768002001820037200371844431876710010201000020200002018120037111002110910101000010000000064052162219785010000102003820038200382003820038
10024200371550000000021441968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037511002110910101000010000000064052162219785010000102003820038200382003820038
100242003715500000000611968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037111002110910101000010000000064052162219785010000102003820038200382003820038

Test 3: Latency 1->3

Code:

  zip2 v0.4s, v1.4s, v0.4s
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)031e1f3f4e51inst 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)9fa8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020420037185001031968725101001001000010010000500284768012001802003720037184223187451010020010000200200002003720037111020110099100100100001000810007101161119791100001002003820038200852003820038
102042003718500611968725101001001000010010000500284768012001802003720037184223187451010020010000200200002003720037111020110099100100100001000750007101161119791100001002003820038200382003820038
10204200371850061196872510100100100001001000050028476801200180200372003718422318745101002001000020020000200372003711102011009910010010000100000007101161119791100001002003820038200382003820038
102042003718590611968725101001001000010010000500284768002001802003720037184223187451010020010000200200002003720037111020110099100100100001000840007101161119791100001002003820038200382003820038
102042003717300611968725101001001000010010000500284768012001802003720037184223187451010020010000200200002003720037111020110099100100100001000570007101161119791100001002003820038200382003820038
102042003717400611968725101001001000010010000500284768012001802003720037184223187451010020010000200200002003720037111020110099100100100001000840007101161119791100001002003820038200382003820038
102042003717300611968725101001001000010010000500284768012001802003720037184223187451010020010000200200002003720037111020110099100100100001000630007101161119791100001002003820038200382003820038
10204200371730061196872510100100100001001000050028476801200180200372003718422318745101002001000020020000200372003711102011009910010010000100330007101161119791100001002003820038200382003820038
10204200371610061196872510100100100001001000050028476801200180200372003718422318745101002001000020020000200372003711102011009910010010000100000007101161119791100001002003820038200382003820038
102042003716112061196872510100100100001001000050028476801200180200372003718422318745101002001000020020000200372003711102011009910010010000100100007101161119791100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)0308090b18191e1f3f4e51inst 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)9fa0a1a6a8a9acc2cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100242003715500000108061196872510010101000010100007128528120201662027320274184652618840106192610730202166220273202736110021109101010000102021411855007492564419971410000102027620274202282027420229
10024202741570115567252831821963211810073111006013107087128540950201982027420226184582918879109262210990222201220319203247110021109101010000102000012765407892814320040310000102013220275203232032320322
100242032015600101663352611968744100101010000101015250284768002001820085200371844431876710010201016820200002008520084111002110910101000010000100007063492419929410000102032120276200852031220134
100242032315710000426021719621811004915100241310000672852812020198200372032418444251880410620201100520216242008620275711002110910101000010000003006403163520039210000102017920180203712008520217
1002420272163001752706119687251001010100001010000502847680120018200372003718444371886011076201049924200002003720037111002110910101000010003000006542963219895410000102031920134202272027420322
10024200851630110000456119687961006013100481010000722851529120306203242031918462251889711060201000020203562003720085211002110910101000010923008158007453575320094410000102003820038200382003820038
1002420037161000023991761451968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000000006402162219785010000102003820038200382003820038
100242003715500000120611968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000003006402162219785010000102003820038200382003820038
100242003715600000007381966743100251010000101000050284768012002120037200371845031876710010201000020203382008520037111002110910101000010000000006402162219823010000102008420038200382003820038
10024200841560000030611968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000003006402162219785010000102003820038200382003820038

Test 4: throughput

Count: 8

Code:

  zip2 v0.4s, v8.4s, v9.4s
  zip2 v1.4s, v8.4s, v9.4s
  zip2 v2.4s, v8.4s, v9.4s
  zip2 v3.4s, v8.4s, v9.4s
  zip2 v4.4s, v8.4s, v9.4s
  zip2 v5.4s, v8.4s, v9.4s
  zip2 v6.4s, v8.4s, v9.4s
  zip2 v7.4s, v8.4s, v9.4s
  movi v8.16b, 9
  movi v9.16b, 10

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)030b18191e1f3f51inst 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)9fa6a8a9acc2c5branch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042005915500000402580100100800001008000050064000002001920038200389973399968010020080000200160000200382003811802011009910010080000100000300051103161120035800001002003920039200392003920039
80204200381560000010222580100100800001008000050064000012001920038200389973399968010020080000200160000200382003811802011009910010080000100000000051101161120035800001002003920039200392003920039
802042003815500090402580100100800001008000050064000002001920038200389973399968010020080000200160000200382003811802011009910010080000100000000051101162120035800001002003920039200392003920039
802042003815500000402580100100800001008000050064000002001920038200389973399968010020080000200160000200382003811802011009910010080000100000000051101161120035800001002003920039200392003920039
802042003815500000632580100100800001008000050064000002001920038200389973399968010020080000200160000200382003811802011009910010080000100000000051101161120035800001002003920039200392003920039
802042003815500000402580100100800001008000050064000012001920038200389973399968010020080000200160000200382003811802011009910010080000100000000051101161120035800001002003920039200392003920039
802042003815600000402580100100800001008000050064000012001920038200389973399968010020080000200160000200382003811802011009910010080000100000000051101161120035800001002003920039200392003920039
802042003815500000402580100100800001008000050064000012001920038200389973399968010020080000200160000200382003811802011009910010080000100000000051101161120035800001002003920039200392003920039
802042003815500000402580100100800001008000050064000012001920038200389973399968010020080000200160000200382003811802011009910010080000100000000051101161120035800001002003920039200392003920039
802042003815500000402580100100800001008000050064000012001920038200389973399968010020080000200160000200382003811802011009910010080000100000000051101161120035800001002003920039200392003920039

1000 unrolls and 10 iterations

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

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)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)9fa8a9accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420039155051425800101080000108000050640000200192003820038999631001880010208000020160000200382003811800211091010800001000050201161120035080000102003920039200392003920039
800242003815603925800101080000108000050640000200192003820038999631001880010208000020160000200382003811800211091010800001000050201161120035080000102003920039200392003920039
8002420038155123925800101080000108000050640000200192003820038999631001880010208000020160000200382003811800211091010800001000050201161120035080000102003920039200392003920039
800242003815503925800101080000108000050640000200192008920038999631001880010208000020160000200382003811800211091010800001000050201161120035080000102003920039200392003920039
800242003815503925800101080000108000050640000200192003820038999631001880010208000020160000200382003811800211091010800001000050201161120035080000102003920039200392003920039
800242003815503925800101080000108000050640000200192003820038999631001880010208000020160000200382003811800211091010800001000050201161120035080000102003920039200392003920039
800242003815503925800101080000108000050640000200192003820038999631001880010208000020160000200382003811800211091010800001000050201161120035080000102003920039200392003920039
800242003815533925800101080000108010850640000200192003820038999631001880010208000020160000200382003811800211091010800001000050201161120035080000102003920039200392003920039
800242003815503925800101080000108000050640000200192003820038999631001880010208000020160000200382003811800211091010800001000050201161120035080000102003920039200392003920039
800242003815503925800101080000108000050640000200192003820038999631001880010208000020160000200382003811800211091010800001000050201161120035080000102003920039200392003920039