Apple M1 Microarchitecture Research by Dougall Johnson

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

FDIV (vector, 2D)

Test 1: uops

Code:

  fdiv v0.2d, v0.2d, v1.2d
  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)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)cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
100410037751861864925100010001000351980100181003710037939639895100010002000100371003711100110007311611957910001003810038100381003810038
100410037750166864925100010001000351980100181003710037939639895100010002000100371003711100110007311611957910001003810038100381003810038
10041003775061864925100010001000351980100181003710037939639895100010002000100371003711100110007311611957910001003810038100381003810038
1004100377554536864925100010001000351980100181003710084939639895100010002000100371003711100110007311611957910001003810038100381003810038
10041003775061864925100010001000351980100181003710037939639895100010002000100371003711100110007311611957910001003810038100381003810038
100410037751561864925100010001000351980100181003710037939639895100010002000100371003711100110007311611957910001003810038100381003810038
10041003775661864925100010001000351980100181003710037939639895100010002000100371003711100110007311611957910001003810038100381003810038
100410037750124864925100010001000351980100181003710037939639895100010002000100371003711100110008011611957910001003810038100381003810038
100410037756661864925100010001000351980100181003710037939639895100010002000100371003711100110007311611957910001003810038100381003810038
1004100377541461864925100010001000351980100181003710037939639895100010002000100371003711100110007311611957910001003810038100381003810038

Test 2: Latency 1->2

Code:

  fdiv v0.2d, v0.2d, v1.2d
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 10.0037

retire (01)cycle (02)030408090b18191e1f3a3f4e51inst 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)9fa0a6a7a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204100037750100000000618964925101001001000010010000500358298001000181000371000379824639874510100200100002002000010003710003711102011009910010010000100000000710116119957910000100100038100038100038100038100038
10204100037750000000000618964925101001001000010010000500358298011000181000371000379824639874510100200100002002000010003710003711102011009910010010000100000000710116119957910000100100038100038100038100038100038
102041000377490000000001038964925101261001000611610000500358330201000181000371000379824639874510100200100002002000010003710003711102011009910010010000100000000710116119957910000100100038100038100038100038100038
1020410003775000000000010389649251010010010003127100005003582980110001810003710003798246129874510199200100502022022410018310003751102011009910010010000100000100710116119957910000100100038100038100038100038100038
102041000377490000000007688964925101001001000010010000500358298001000181000371000379824639874510100200100002002000010003710003711102011009910010010000100000200710116119957910000100100038100038100038100038100038
10204100037749000000000618964925101001001000010010000500358298011000181000371000379824639874510100200100002002000010003710003711102011009910010010000100000009710116119957910000100100038100038100038100038100038
10204100037749000000000618964925101001001000010010000500358298011000181000371000379824639874510100200100002002000010003710003711102011009910010010000100000000710116119957910000100100038100038100038100038100038
102041000377490000000007268964925101001001000010010000500358298011000181000371000379824639874510100200100002002000010003710003711102011009910010010000100000000710116119957910000100100038100038100038100038100038
102041000377490110004501618964925101001001000010010000500358298001000181000371000379824639874510100200100002002000010003710003711102011009910010010000100000000710116119957910000100100038100038100038100038100038
10204100037750000000000618964925101001001000010010000500358298001000181000371000379824639874510100200100002002000010003710003711102011009910010010000100000000710116119957910000100100038100038100038100038100038

1000 unrolls and 10 iterations

Result (median cycles for code): 10.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)60696b6d6edispatch 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)9fa8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024100037749661896492510010101000010100005035829801100018010003710003798268039876710010201000020200001000371000371110021109101010000100000640216229957901000010100038100038100038100038100038
100241000377507561896312510010101000010100005035829801100018010003710003798268039876710010201000020200001000371000371110021109101010000100000640216229957901000010100038100038100038100038100038
1002410003774901120896492510010101000010100005035829801100018010003710003798268039876710010201000020200001000371000371110021109101010000100000640216229957901000010100038100038100038100038100038
10024100083749061896492510010101000010100005035829801100018010003710003798268039876710010201000020200001000371000371110021109101010000100000640216229957901000010100038100038100038100038100038
10024100037749061896492510010101000010100005035829801100018010003710003798268039876710010201000020200001000371000371110021109101010000100030640216229957921000010100038100038100038100038100038
100241000377500726896492510010101000010100005035829801100018010003710003798268039876710010201000020200001000371000371110021109101010000103058860640216229957901000010100038100038100038100038100038
10024100037750061896492510010101000010100005035829801100018010003710003798268039876710010201000020200001000371000371110021109101010000100287814640241329957901000010100038100038100038100038100038
100241000377491261896492510010101000010100005035829801100018010003710003798268039876710010201000020200001000371000371110021109101010000106000640217429961601000010100038100038100038100086100038
1002410003774901200896492510010101000010100005035829801100018010003710003798268039876710010201000020200001000371000371110021109101010000100000640216229957901000010100038100038100038100038100038
10025100037749061896492510010101000010100005035829801100018010003710003798268039876710010201000020200001000371000371110021109101010000100000640216229957901000010100038100038100038100038100038

Test 3: Latency 1->3

Code:

  fdiv v0.2d, v1.2d, v0.2d
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 10.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)60696b6d6edispatch 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)9fa6a8a9accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020410003775001048896492510100100100001001000050035829801100018010003710003798246039874510100200100672002000010008410003711102011009910010010000100082097102162299579010000100100038100038100038100038100038
10204100037750061896492510100100100001001000050035829801100018010003710003798246039874510100200100002002000010003710003711102011009910010010000100080007102162299579010000100100038100038100038100038100038
102041000377509061896492510100100100001001000050035829801100018010003710003798246039874510100200100002002000010003710003711102011009910010010000100079007102162299579010000100100038100038100038100038100038
102041000377490726896492510100100100001001000050035829801100018010003710003798246039874510100200100002002000010003710003711102011009910010010000100086037102162299579010000100100038100038100038100038100038
10204100037750061896492510100100100001001000050035829800100018010003710003798246039874510100200100002002000010003710003711102011009910010010000100076007102162299579010000100100038100038100038100038100038
10204100037749061896492510100100100001001000050035829800100018010003710003798246039874510100200100002002000010003710003711102011009910010010000100078097102162299579010000100100038100038100038100038100038
102041000377490726896492510100100100001001000050035829801100018010003710003798246039874510100200100002002000010003710003711102011009910010010000100081007102162299579010000100100038100086100038100038100038
10204100037749061896492510100100100001001000050035829800100018010003710003798246039874510233206101102022000010060210079318110201100991001001000010002467102162299579010000100100038100038100038100038100038
10204100037750061896492510100100100001001000050035829801100018010003710003798246039874510100200100002002000010003710003711102011009910010010000100043007102162299579010000100100038100038100038100038100038
102041000377490726896492510100100100001001000050035829801100018010003710003798246039874510100200100002002000010003710003711102011009910010010000100081007102162299579010000100100038100038100038100038100038

1000 unrolls and 10 iterations

Result (median cycles for code): 10.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)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)9fa8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024100037749061896492510010101000010100005035829801100018100037100037982680398767100102010000202000010003710003711100211091010100001000001640416229957901000010100038100038100038100038100038
10024100037750061896492510010101000010100005035829801100018100037100037982683398767100102010000202000010003710003711100211091010100001000100640216229957901000010100038100038100072100038100038
1002410003775013261896492510010101000010100005035829801100018100037100037982680398767100102010000202000010003710003711100211091010100001000000640216229957901000010100038100038100038100038100038
10024100037749061896492510010101000010100005035829801100018100037100037982680398767100102010000202000010003710003721100211091010100001000000640216229957901000010100038100038100038100038100038
10024100037749061896492510010101000010100005035829801100018100037100037982680398767100102010000202000010003710003711100211091010100001000000640216229957901000010100038100038100038100038100038
10024100037749061896492510010101000010100005035829801100018100037100037982680398767100102010000202000010003710003711100211091010100001029000640216229957901000010100038100038100038100038100038
100241000377490251896492510010101000010100005035829801100018100037100037982680398767100102010000202000010003710003711100211091010100001000000640216229957901000010100038100038100038100038100038
10024100037749061896492510010101000010100005035829801100018100037100037982680398767100102010000202000010003710003711100211091010100001000010640216229957901000010100038100038100038100038100038
10024100037750061896492510010101000010100005035829801100018100037100037982680398767100102010000202000010003710003711100211091010100001000000640216229957901000010100038100071100038100038100038
10024100037750061896492510010101000010100005035829801100018100037100037982680398767100102010000202000010003710003711100211091010100001000000640216229957901000010100038100038100038100038100038

Test 4: throughput

Count: 8

Code:

  fdiv v0.2d, v8.2d, v9.2d
  fdiv v1.2d, v8.2d, v9.2d
  fdiv v2.2d, v8.2d, v9.2d
  fdiv v3.2d, v8.2d, v9.2d
  fdiv v4.2d, v8.2d, v9.2d
  fdiv v5.2d, v8.2d, v9.2d
  fdiv v6.2d, v8.2d, v9.2d
  fdiv v7.2d, v8.2d, v9.2d
  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): 1.0006

retire (01)cycle (02)03091e3f51inst 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)9fa6a8acbranch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8020480046599005725801001008000010080000500640000080027800468004669964370004801002008000020016000080046800461180201100991001008000010000000511021611800370800001008004780047800478004780047
80204800465991031625801001138000010080000500640000080072800468004669964370004801002008000020016000080046800461180201100991001008000010000000511011611800370800001008004780047800478004780047
8020480046599005725801001008000010080000500640000080027800468004669964370004801002008000020016000080046800461180201100991001008000010000000511011611800370800001008004780047800478004780047
802048004660000106825801001008000010080000500640000080027800468004669964370004801002008000020016000080102800461180201100991001008000010020000511011611800370800001008004780047800478010380047
8020480046600005725801001008000010080000500640000080027800468004669964370004801002008000020016000080046800461180201100991001008000010000000511011611800370800001008004780047800478004780047
8020480046599005725801001008000010080000500640000080027800468004669964370004801002008000020016000080046800461180201100991001008000010000000511011621800370800001008004780047800478004780047
802048004659900572580100100800001008000050064000008002780046800466996437000480100200800002001600008004680046118020110099100100800001000021000511011611800370800001008004780047800478004780047
8020480046600005725801001008000010080000500640000080027800468004669964370004801002008000020016000080046800461180201100991001008000010000001511011611800370800001008004780047800478004780047
802048004660002457258010010080000100800005006400000800278004680046699643700048010020080000200160000800468004611802011009910010080000100000005110116118003712800001008004780047800478004780047
80204800466000034125801001008000010080000500640000080027800468004669964370004801002008000020016000080046800461180201100991001008000010000000511011611800370800001008004780047800478004780047

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03080b1e3f51inst 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)9fa1a6a7a8acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
800248004659900693782580010108000010800005064000008002780046800467009237002680109208000020160000800468026911800211091010800001000001505020416248003680000108004780047800478004780047
800248004660000057258001010800001080000506400000800278004680046699863700268001020800002016000080046800461180021109101080000100000005020416248003680000108004780047800478004780047
800248004659900057258001010800001080000506405180800278004680046699863700268001020800002016000080046800461180021109101080000100000005020316258003680000108004780047800478004780047
800248004660000057258001010800001080000506400000800278004680046699863700268001020800002016000080046800461180021109101080000100000005020216428003680000108004780047800478004780047
800248004660000057258001010800001080000506400000800278004680046699863700268001020800002016000080046800461180021109101080000100000005020416428003680000108004780047800478004780047
800248004660010357258001010800001080000506400000800278004680272699863700268014320800002016000080046800461180021109101080000100000005020216248003680000108004780047800478004780047
8002480046600000572580010108000010800005064000008002780046800466998637002680010208000020160000800468004611800211091010800001000001805020416258003680000108027480047800478004780047
800248004660000057258001010800001080000506400000800278004680046699863700268001020800002016000080046800461180021109101080000100000005020216258003680000108004780047800478004780047
800248004659900585722258001010800001080000506400000800278004680046699863700268001020800002016000080046800461180021109101080000100013005020216428003680000108004780047800478004780047
800248004660000057258001010800001080000506400000800278004680046699863700268001020800002016000080046800461180021109101080000100000005020216248003680000108004780272800478004780047