Apple M1 Microarchitecture Research by Dougall Johnson

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

FNMUL (scalar, H)

Test 1: uops

Code:

  fnmul h0, h0, h1
  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)031e3a3f4e51inst 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
10044037300214834072510001000100053190814018403740373258338951000100020004037403711100110000077416443473100040384038403840384038
1004403730026234072510001000100053190814018403740373258338951000100020004037403711100110000077416443473100040384038403840384038
1004403730026234072510001000100053190814018403740373258338951000100020004037403711100110000077416443473100040384038403840384038
100440373018926234072510001000100053190814018403740373262338951000100020004037403711100110000077416443473100040384038403840384038
100440373002100134072510001000100053190814018403740373258338951000100020004037403711100110001077416443473100040384038403840384038
1004403730026234072510001000100053190814018403740373258338951000100020004037403711100110000077416443473100040384038403840384038
1004403730026234072510001000100053190814018403740373258338951000100020004037403711100110000077416443473100040384038403840384038
1004403730026234072510001000100053190814018403740373258338951000100020004037403711100110000077416443473100040384038403840384038
1004403730026234072510001000100053190814018403740373258338951000100020004037403711100110000077416443473100040384038403840384038
1004403730026234072510001000100053190804018403740373258338951000100020004037403711100110000077416443473100040384038403840384038

Test 2: Latency 1->2

Code:

  fnmul h0, h0, h1
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 4.0037

retire (01)cycle (02)030b18191e3f4e51inst 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)9fa8acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204400372990000613940725101001001000010010000500570690814001840037400373810833874510100200100002002000040037400371110201100991001001000010000071021611394790100001004003840038400384003840038
10204400373000000613940725101001001000010010000500570690814001840037400373810833874510100200100002002000040037400371110201100991001001000010010271031611395150100001004003840038400384003840038
10204400373000000613938925101241041000010010000500570690804001840037400373811233874510254204100002002000040085400851110201100991001001000010000071011611394790100001004003840038400384003840038
10204400373000000613940725101001001000010010000500570690804001840037400373810833874510100200100002002000040037400371110201100991001001000010000071011611394790100001004003840038400384003840038
10204400373000000613940725101001001000010010000500570690814001840037400373810833874510100200100002002000040037400371110201100991001001000010000071011611394790100001004003840038400384003840038
102044003730000001033940725101001001000010010000500570690814001840037400373810833874510100200100002002000040037400371110201100991001001000010000071011611394790100001004003840038400384003840038
102044003730000001033940725101001001000010010000500570690804001840037400373810833874510100200100002002000040037400371110201100991001001000010000071011611394790100001004003840038400384003840038
1020440037300121037939407251010010010006100100006425706908040018400374008538111153874510100200100002002000040037400371110201100991001001000010000071011611394790100001004003840038400384003840038
10204400372990000613940725101001001000010010000500570690804001840037400373810833874510100200100002002000040037400371110201100991001001000010000071011611394790100001004003840038400384003840038
102044003730000012613940725101001001000010010000500570690814001840037400373810833874510100200100002002000040037400371110201100991001001000010003071011611394790100001004003840038400384003840038

1000 unrolls and 10 iterations

Result (median cycles for code): 4.0037

retire (01)cycle (02)03080b18191e1f3f4e51inst 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)9fa0a6a8accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002440037300000027061394072510010101000010100005057069081400184003740037381303387671001020100002020000400374003711100211091010100001000006402161239473010000104003840038400384003840038
1002440037300000045061394072510010101000010100005057069080400184003740037381303387671001020100002020000400374003711100211091010100001000006402162239473010000104003840038400384003840038
1002440037299000072061394072510010101000010100005057069081400184003740037381303387671001020100002020000400374003711100211091010100001000006402162239473010000104003840038400384003840038
1002440037300000030061394072510010101000010100005057069080400184008440085381303387671001020100002020000400374003711100211091010100001000006402162239473010000104003840038400384003840038
1002440037299000042061394072510010101000010100005057069080400184003740037381303387841001020100002020000400374003711100211091010100001000006402162239473010000104003840038400384003840038
1002440037300000042061394072510010101000010100005057069081400184003740037381303387671001020100002020000400374003711100211091010100001000006402162239473010000104003840038400384003840038
1002440037300000015061394072510010101000010100005057069080400184003740037381303387671001020100002020000400374003711100211091010100001000006402162239473010000104003840038400384003840038
1002440037300000027061394072510010101000010100005057069081400184003740037381303387671001020100002020000400374003711100211091010100001000006402162239473010000104003840038400384003840038
1002440037300000012061394072510010101000010100005057069081400184003740037381303387671001020100002020000400374003711100211091010100001000006402162239473010000104003840038400384003840038
1002440037300000036061394072510010101000010100005057069080400184003740037381303387671001020100002020000400374003711100211091010100001000006402162239473010000104003840038400384003840038

Test 3: Latency 1->3

Code:

  fnmul h0, h1, h0
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 4.0037

retire (01)cycle (02)0318191e1f3f4e51inst 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)9fa0a1a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102044017930000180613940725101001001000010010000500570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
10204400372990000613940725101001001000010010000500570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
10204400373000000613940725101001001000010010000615570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
10204400373000000823940725101001001000010010000500570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
102044003730000300613940725101001291000010010000500570690840018400854003738108338745101002001000020020000400374003711102011009910010010000100010007101161139479100001004003840038400384003840038
10204400373000000613940725101001001000010010000500570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
10204400372990000613940725101001001000010010000500570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
10204400373000000613940725101001001000010010000500570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
10204400373000000613940725101001001000010010000500570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
102044003730000006139407251010010010000100100005005706908400184003740037381081538745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038

1000 unrolls and 10 iterations

Result (median cycles for code): 4.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)9fa8cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002440037300061394072510010101000010100005057069081400184003740037381473387671001020100002020000400374003711100211091010100001000640216223947310000104003840038400384003840038
1002440037300061394072510010101000010100005057069081400184003740037381303387671001020100002020000400374003711100211091010100001000640216223947310000104003840038400384003840038
1002440037299061394072510010101000010100005057069081400184003740037381303387671001020100002020000400374003711100211091010100001000640216223947310000104003840038400384003840038
1002440037300061394072510010101000010100005057069081400184003740037381303387671001020100002020000400374003711100211091010100001000640216223947310000104003840038400384003840038
1002440037300082394072510010101000010100005057069081400184003740037381303387671001020100002020000400374003711100211091010100001000640216223947310000104003840038400384003840038
1002440037300061394072510010101000010100005057069081400184003740037381303387671001020100002020000400374003711100211091010100001000640216223947310000104003840038400384003840038
1002440037300061394072510010101000010100005057069081400184003740037381303387671001020100002020000400374003711100211091010100001000640216223947310000104003840038400384003840038
1002440037300061394072510010101000010100005057069081400184003740037381303387671001020100002020000400374003711100211091010100001000640216223947310000104003840038400384003840038
1002440037300061394072510010101000010100005057069081400184003740037381303387671001020100002020000400374003711100211091010100001000640216223947310000104003840038400384003840038
10024400373002461394072510010101000010100005057069081400184003740037381303387671001020100002020000400374003711100211091010100001000640216223947310000104003840038400384003840038

Test 4: throughput

Count: 8

Code:

  fnmul h0, h8, h9
  fnmul h1, h8, h9
  fnmul h2, h8, h9
  fnmul h3, h8, h9
  fnmul h4, h8, h9
  fnmul h5, h8, h9
  fnmul h6, h8, h9
  fnmul h7, h8, h9
  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)03181e3f51inst 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)9fa8acc5cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8020420040150021226258010010080000100800005006400001200212004020040997339998801002008000020016000020040200401180201100991001008000010000051102161120037800001002004120041200412004120041
80204200401500042258010010080000100800005006400000200212004020040997339998801002008000020016000020040200401180201100991001008000010000051101161120037800001002004120041200412004120041
80204200401500042258010010080000100800005006400001200212004020040997339998801002008000020016000020092200401180201100991001008000010000051101161120037800001002004120041200412004120041
80204200401500042258010010080000100800005006400000200212004020040997339998801002008000020216000020040200401180201100991001008000010000051101161120037800001002004120041200412004120041
80204200401500042258010010080000100800005006400000200212004020040997339998801002008000020016000020040200401180201100991001008000010000051101161120037800001002004120041200412004120041
80204200401500042258010010080000100800005006400001200212004020040997339998801002008000020016000020040200401180201100991001008000010000051101161120037800001002004120041200412004120041
802042004015000517258010010080000100800005006400000200212004020040997339998801002008000020016000020040200401180201100991001008000010000051102161120037800001002004120041200412004120041
80204200401500042258010010080000100800005006400001200212004020040997339998801002008000020016000020040200401180201100991001008000010000051101161120037800001002004120041200412004120041
80204200401500042258010010080000100800005006400001200212004020040997339998801002008000020016000020040200401180201100991001008000010000051101161120037800001002004120041200412004120041
80204200401500042258010010080000100800005006400000200212004020040997339998801002008000020016000020040200401180201100991001008000010000051101161120037800001002004120041200412004120041

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)9fa8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80024200491500004125800101080000108000050640000412002120040200409996310020800102080000201600002004020040118002110910108000010005020816642003780000102004120041200412004120041
80024200401550004125800101080000108000050640000512002120040200409996310020800102080000201600002004020040118002110910108000010005020416642003780000102004120041200412004120041
800242004015005735204125800101080000108000050640000412002120040200409996310020800102080000201600002004020040118002110910108000010005020616432003780000102004120041200412004120041
80024200401500004125800101080000108000050640000412002120040200409996310020800102080000201600002004020040118002110910108000010005020416442003780000102004120041200412004120041
80024200401500004125800101080000108000050640000412002120040200409996310020800102080000201600002004020040118002110910108000010005020316342003780000102004120041200412004120041
80024200401500004125800101080000108000050640000512002120040200409996310020800102080000201600002004020040118002110910108000010005020716472003780000102004120041200412004120041
80024200401500004125800101080000108000050640000512002120040200409996310020800102080000201600002004020040118002110910108000010005020416442003780000102004120041200412004120041
800242004015004804125800101080000108000050640000412002120040200409996310020800102080000201600002004020040118002110910108000010005020616432003780000102004120041200412004120041
80024200401500004125800101080000108000050640000412002120040200409996310020800102080000201600002004020040118002110910108000010005020616672003780000102004120041200412004120041
800242004015041204125800101080000108000050640000312002120040200409996310020800102080000201600002004020040118002110910108000010005020516642003780000102004120041200412004120041