Apple M1 Microarchitecture Research by Dougall Johnson

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

ZIP1 (vector, 8B)

Test 1: uops

Code:

  zip1 v0.8b, v0.8b, v1.8b
  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)a8accfd5d6d9ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004203715061168725100010001000264680020182037203715723189510001000200020372037111001100000731160111787100020382038203820382038
1004203716061168725100010001000264680120182037203715723189510001000200020372037111001100010731160111787100020382038203820382038
1004203716061168725100010001000264680120182037203715723189510001000200020372037111001100000731160111787100020382038203820382038
1004203716061168725100010001000264680120182037203715723189510001000200020372037111001100000731160111787100020382038203820382038
1004203715061168725100010001000264680120182037203715723189510001000200020372037111001100010731160111787100020382038203820382038
1004203716082168725100010001000264680120182037203715723189510001000200020372037111001100000731160111787100020382038203820382038
1004203715061168725100010001000264680120182037203715723189510001000200020372037111001100000731160111787100020382038203820382038
1004203715061168725100010001000264680120182037203715723189510001000200020372037111001100000731160111787100020382038203820382038
1004203715082168725100010001000264680120182037203715723189510001000200020372037111001100000731400111787100020382038208520382038
10042084151284168725100010001000264680120182037203715723189510001000200020372037111001100000731160111787100020382038203820382038

Test 2: Latency 1->2

Code:

  zip1 v0.8b, v0.8b, v1.8b
  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)03191e1f3f4e51inst 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)9fa0a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102042003715600084196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000240071021622197910100001002003820038200382003820038
102042003715600061196872510100100100001001000050028476800200182003720037184223187491010020010000200200002003720037111020110099100100100001004000080021622198250100001002003820038200382003820084
102042003715506061196872510100100100241001000050028515290200182003720037184223187451010020010000200200002003720037111020110099100100100001000000071021622198230100001002003820038200382003820038
10204200371550132061196872510100100100001001000050028489630200182003720037184223187451010020010000200200002003720037111020110099100100100001000000071021622197910100001002003820038200382003820038
102042003715600061196872510100100100001001000050028476800200182003720037184223187451027520010000200200002003720037111020110099100100100001000000071021622197910100001002003820038200382003820038
102042003715500061196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000000071021622197912100001002003820038200382003820038
1020420037155000611968725101001001000010010000500284768012001820037200371842231874510100200100002002000020037200371110201100991001001000010000012071021622197910100001002003820038200382003820038
102042003715500061196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000000071021622197910100001002003820038200382003820038
102042003715600061196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000000071021622197919100001002003820038200382003820038
102042003715500061196872510100100100001001000050028476800200182003720037184223187451010020010000200203302003720037111020110099100100100001000003071021622197910100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.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)9fa6a8acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024200371610000061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000006402162219785010000102003820038200382003820038
10024200371550000061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000006402162219785010000102003820038200382003820038
10024200371550000061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000006402162219785010000102003820038200382003820038
10024200371550000061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000006402162219785010000102003820038200382003820038
10024200371560000061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000046402162219785210000102008520038200382003820038
1002420037155010132061196872510010101000010100005028476800200542003720037184443187671001022100002020000200372003711100211091010100001000006402242219785210000102008520085200382003820038
10024200371560000061196872510010101000010100005028476800200182003720037184443187671001020100002020000200852003711100211091010100001000906402162219785010000102003820038200382003820038
100242003715500000145196876310026101000010106086028476800200182003720037184443187671001020101682020000200852003721100211091010100001001006402162219785010000102003820038200382003820085
1002420037155100144061196874310024101001210101525028476800200902003720084184443187671001020100002020000200372003711100211091010100001021306402162219785010000102003820038200382003820038
10024200371550000084196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000006402162219785010000102003820038200382003820038

Test 3: Latency 1->3

Code:

  zip1 v0.8b, v1.8b, v0.8b
  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)0308090b18191e1f3a3f4e51inst 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)9fa0a6a8a9acc2c5branch mispredict (cb)cdcfd0d5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204200371550000000061196872510100100100001001000050028476800200180200372003718422318745101002001000020020000200372003711102011009910010010000100000000000710011611197910100001002003820038200382003820038
10204200371550000000061196872510100100100001001000071528579050200180200372003718422318745101002001000020020000200372003711102011009910010010000100000000000710011611197910100001002003820038200382003820038
10204200371550000000061196872510100100100001001000050028476800200180200372003718425318745101002001000020020000200372003711102011009910010010000100000000000710011611197910100001002003820038200382003820038
10204200371550003113288061196872510100100100001001000050028476800200180200372003718422318745101002001000020020000200372003711102011009910010010000100000000000710011611197910100001002003820038200382003820038
102042003715600000000611968725101001001000010010000500284768002001802003720037184223187451010020010000200200002003720037111020110099100100100001000000150000710011611197910100001002003820038200382003820038
102042003715500000000611968725101001001000010010000500284768002001802003720037184223187451010020010000200200002003720037111020110099100100100001000000120000710011611197910100001002003820038200382003820038
10204200371550000000061196872510100100100001001000050028476800200180200372003718422318745101002001000020020000200372003711102021009910010010000100000090000710011611197910100001002003820038200382003820038
10204200371560000000061196872510100100100001001000050028476800200180200372003718422318745101002001000020020000200372003711102011009910010010000100000000000710011611197910100001002003820038200382003820038
1020420037161000004082640611968725101001001000010010000500284768012001802003720037184296187411010020010008200200162003720037111020110099100100100001000020150111717001600198020100001002003820038200382003820038
10204200371550000000061196872510100100100001001000050028476800200180200372003718429618740101002001000820020016200372003711102011009910010010000100003060111717001600198020100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)03040818191e1f3a3f4e51inst 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)9fa0a1a8a9accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024200371550000210262196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000644101610719785010000102003820038200382003820038
10024200371550001002661968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000006441016101019785010000102003820038200382003820038
10024200371560000002661968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000006441016101019785010000102003820038200382003820038
10024200371560000002661968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000036441016101019785010000102003820038200382003820038
10024200371550000002661968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000006441216121219785010000102003820038200382003820038
10024200371550000002661968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000006441016101019785010000102003820038200382003820038
100242003715500003026619687251001010100001010000502847680120018200372003718444318767100102010000202000020037200371110021109101010000100000064410168819785010000102003820038200382003820038
10024200371550000002661968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000006441016101019785010000102003820038200382003820038
100242003715500000022561968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000006441016121019785010000102003820038200382003820038
10024200371550000002661968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000006445168819785010000102003820038200382003820038

Test 4: throughput

Count: 8

Code:

  zip1 v0.8b, v8.8b, v9.8b
  zip1 v1.8b, v8.8b, v9.8b
  zip1 v2.8b, v8.8b, v9.8b
  zip1 v3.8b, v8.8b, v9.8b
  zip1 v4.8b, v8.8b, v9.8b
  zip1 v5.8b, v8.8b, v9.8b
  zip1 v6.8b, v8.8b, v9.8b
  zip1 v7.8b, v8.8b, v9.8b
  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)0307090a0b18191e1f3a3f51inst 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)9fa0a1a6a7a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042003815510100012027122580100100800001008000050064000002001920038200389973399968010020080000200160000200382003811802011009910010080000100000000005114816119200350800001002003920039200392003920039
802042003815510100000213712580100100800001008000050064000002001920038200389973399968010020080000200160000200382003811802011009910010080000100000000005114111677200350800001002003920039200392003920039
8020420038156101000002567258010010080000100800005006400000200192003820038997339996801002008000020016000020038200381180201100991001008000010000000000511410161010200350800001002003920039200392003920039
80204200381551010000024725801001008000010080000500640000120019200382003899733999680100200800002001600002003820038118020110099100100800001000000000051141016510200350800001002003920039200392003920039
802042003815510100000247258010010080000100800005006400001200192003820038997339996801002008000020016000020038200381180201100991001008000010000001000511410161010200350800001002003920039200392003920039
80204200381551010000024725801001008018710080000500640000120019200382003899733999680100200800002001600002003820038118020110099100100800001000000000051147161010200350800001002003920039200392003920039
80204200381641010000024725801001008000010080000500640000020019200382003899733999680100200800002001600002003820038118020110099100100800001000000000051149161010200350800001002003920039200392003920039
8020420038155101000144021792258010010080186100800005006400001200612003820038997339996802072008029220016077820192200385180201100991001008000010022000230511410169162003523800001002003920039200392003920039
8020420038162101030002450415680777121806601228068160864619402030020193203451003637101848070820280689200161380204432039191802011009910010080000100023000373005253159812162031424800001002045920398203982034620497
8020420449159302178666704213131978087612580466124806836406461440203392045020448100433910205807062008077920216118420455204991018020110099100100800001000030103745052501211216112035219800001002044220347204952045720440

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030408090a0b191e1f3f51inst 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)9fa0a1a6a8acbranch mispredict (cb)cfd2d5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
800242004015510000000392580010108000010800005064000002001920038200389996310018800102080000201600002003820038118002110910108000010000000502002616202620035080000102003920039200392003920039
800242003815500000000392580010108000010800005064000002001920038200389996310018800102080000201600002003820038118002110910108000010000100502002016271520035080000102003920039200392003920039
8002420038155000000005142580010108000010800005064000002001920038200389996310018800102080000201600002003820038118002110910108000010000000502002516152520035080000102003920139200392003920039
800242003815500000000392580010108000010800005064000002001920038200389996310018800102080000201601942003820038118002110910108000010000090502001416281520035080000102003920039200392003920039
800242003815500000000392580010108000010800005064000002001920038200389996310018800102080000201600002003820038118002110910108000010000000502002816222620035080000102003920039200392003920039
800242003815610000000392580010108000010800005064000002001920038200389996310018800102080000201600002003820038118002110910108000010000000502002516272820035080000102003920039200392003920039
800242003815500000000392580010108000010800005064000002001920038200389996310018800102080000201600002003820038118002110910108000010000000502002516152720035080000102003920039200392003920039
80024200381550000003003254280010128018710800005064000002001920038200389996310018800102080000201600002003820038118002110910108000010000000502002716252620035080000102003920039200392003920039
800242003815600000000392580010108000010800005064000002001920038200389996310018800102080000201600002003820038118002110910108000010000000502001616261520035080000102003920039200392003920039
8002420038155000000120392580010108000010800005064000002001920038200389996310018800102080000201600002003820038118002110910108000010000000502001616271420035080000102003920039200392003920039