Apple M1 Microarchitecture Research by Dougall Johnson

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

ABS (vector, 8B)

Test 1: uops

Code:

  abs v0.8b, v0.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)033a3f4e51inst 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
100430372208225472510001000100039816003018303730372414328951000100010003037303711100110000073216222629100030383038303830383038
100430372306125472510001000100039816003018303730372414328951000100010003037303711100110000073216222629100030383038303830383038
100430372306125472510001000100039816013018303730372414328951000100010003037303711100110000073216222629100030383038303830383038
1004303723010525472510001000100039816013018303730372414328951000100010003037303711100110000073216222629100030383038303830383038
100430372306125472510001000100039816013018303730372414328951000100010003037303711100110000373216222629100030383038303830383038
100430372306125472510001000100039816013018303730372414328951000100010003037303711100110000073216222629100030383038303830383069
100430372306125472510001000100039816013018303730372414328951000100010003037303711100110000073216222629100030383038303830383038
100430372306125472510001000100039816003018303730372414328951000100010003037303711100110000073216222629100030383038303830383038
100430372306125472510001000100039816013018303730372414328951000100010003037303711100110000073216222629100030383038303830383038
100430372306125472510001000100039816003018303730372414328951000100010003037303711100110000073216222629100030383038303830383038

Test 2: Latency 1->2

Code:

  abs v0.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): 3.0037

retire (01)cycle (02)03090b18191e1f3f4e51inst 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)9fa0a8accfd5d6dbddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250000006129547251010010010000100100005004277160130018300373003728264328745101002001000020010000300373003711102011009910010010000100000710116011296330100001003003830038300383003830038
10204300372250000006129547251010010010000100100005004277160130018300373003728264328745101002001000020010000300373003711102011009910010010000100000710116011296330100001003003830038300383003830038
102043003722500000015629547251010010010000100100005004277160130018300373003728264328745101002001000020010000300373006111102011009910010010000100010710116011296330100001003003830038300383003830038
1020430037225000013206129547251010010010000100100005004277160130018300373003728264328745101002001000020010000300373003711102011009910010010000100000710116011296330100001003003830038300383003830038
102043003722400000053629547251010010010000100100005004277160130018300373003728264328745101002001000020010000300373003711102011009910010010000100000710116011296330100001003003830038300383003830038
102043003722500000072629547251010010010000100100005004277160130018300373003728264328745101002001000020010000300373003711102011009910010010000100000710116011296330100001003003830038300383003830038
10204300372250000006129547251010010010000100100005004277160130018300373003728264328745101002001000020010000300373003711102011009910010010000100000710116012296330100001003003830038300383003830038
102043003722500110072629547251010010010000100100005004277160030018300373003728264328745101002001000020010000300373003711102011009910010010000100000710116011296330100001003003830038300383003830038
10204300372250000006129547251010010010000100100005004277160030018300373003728264328745101002001000020010000300373003711102011009910010010000100000710116011296330100001003003830038300383003830038
102043003722500000053629547251010010010000100100005004277160130018300373003728264328745101002001000020010000300373003711102011009910010010000100000710116011296330100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)0318191e3f4e51inst 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? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722500246129547251001010100001010000504277160130018300373003728286328767100102010000201000030037300371110021109101010000100000640316442962910000103003830038300383003830038
100243003722500061295472510010101000010100005042771600300183003730037282863287671001020100002010000300373003711100211091010100001000240640416222962910000103003830038300383003830038
10024300372250006129547251001010100001010000504277160130018300373003728286328767100102010000201000030037300371110021109101010000100000640416542962910000103003830038300383003830038
10024300372250006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100000640416442962910000103003830038300383003830038
100243003722502186129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100000640416342962910000103003830038300383003830038
10024300372250006129547251001010100001010000504277160130018300373003728286328767100102010000201000030037300371110021109101010000100000640316232962910000103003830038300383003830038
10024300372250006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100000640316442962910000103003830038300383003830038
10024300372250006129547251001010100001010000504277160030018300373003728286328767100102010000201000030179300842110021109101010000100000640316342962910000103013230086300853003830130
100243008522600135612954725100101010000101000050428673513019830227302242830831288801091624109832210654303203037181100211091010100001021168132796380432962910000103003830038300383003830038
10024300372250006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100000640316432962910000103003830038300383003830038

Test 3: throughput

Count: 8

Code:

  abs v0.8b, v8.8b
  abs v1.8b, v8.8b
  abs v2.8b, v8.8b
  abs v3.8b, v8.8b
  abs v4.8b, v8.8b
  abs v5.8b, v8.8b
  abs v6.8b, v8.8b
  abs v7.8b, v8.8b
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03191e3a3f51inst 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)9fa0a8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042003915001203025801081008000810080020500640132120071200392003999776999080120200800322008003220039200391180201100991001008000010000011151181161120036800001002004020040200402004020049
80204200481500003025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010000011151181161120036800001002004020040200402004020040
80204200391500303025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010000011151181161120036800001002004020040200402004020040
80204200391500003025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010000011151181161120036800001002004020040200402004020040
802042003915000090225801081008000810080020500640132020020200392003999776999080120200800322008003220039200391180201100991001008000010000011151181161120036800001002004020040200402004020040
802042003914900030258010810080008100800205006401321200202003920039997726999080120200800322008003220039200391180201100991001008000010000011151181161120036800001002004020040200402004020040
80204200391500003025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010000011151181161120036800001002004020040200402004020040
80204200391500003025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010000011151181161120036800001002004020040200402004020040
80204200391500003025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010000011151181161120036800001002004020040200402004020040
80204200391500003025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010000011151181161120036800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03181e1f3f51inst 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)9fa9accdcfd2d5d6dbddinst fetch restart (de)e0ebec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80024200511500300536258001010800001080000506400004120020200392003999963100198001020800002080000200392003911800211091010800001000050200416055200360080000102004020040200402004020040
800242003915000040258001010800001080000506400006020020200392003999963100198001020800002080000200392003911800211091010800001000050200516044200360080000102004020040200402004020040
800242003915040040258001010800001080000506400007020020200892003999963100198001020800002080000200392003911800211091010800001000050200616055200360080000102004020040200402004020040
8002420039150042040258001010800001080000506400005120020200392003999963100198001020800002080000200392003911800211091010800001000050200516054200360080000102004020040200402004020040
8002420039150012040258001010800001080000506400005020020200392003999963100198001020800002080000200392003911800211091010800001006050200616066200360080000102004020040200402004020040
800242003915000040258001010800001080000506400004020020200392003999963100198001020800002080000200392003911800211091010800001000050200516065200360080000102004020040200402004020040
800242003915000040258001010800001080000506400005120020200392003999963100198001020800002080000200392003911800211091010800001000050200516056200360080000102004020040200402004020040
8002420039150421040258001010800001080000506400004120020200392003999963100198001020800002080000200392003911800211091010800001000050200516045200360080000102004020040200402004020040
800242003915000040258001010800001080000506400005020020200392003999963100478001020800002080000200392003911800211091010800001000050200616056200360080000102004020040200402004020040
800242003915000040258001010800001080000506400005120020200392003999963100198001020800002080000200392003911800211091010800001000050200516067200360080000102004020040200402004020040