Apple M1 Microarchitecture Research by Dougall Johnson

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

FMULX (vector, 4S)

Test 1: uops

Code:

  fmulx 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)033f4e51inst 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
10044037306134072510001000100053190804018403740373258338951000100020004037403711100110000073216113473100040384038403840384038
10044037306134072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
100440373027934072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
100440373010534072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
100440373012434072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
10044037306134072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
10044037306134072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
10044037306134072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
10044037316134072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
10044037306134072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038

Test 2: Latency 1->2

Code:

  fmulx 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): 4.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)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)9fa0a1a8accdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020440037300036034639407251010010010000100100005005706908400184003740037381083387451010020010000200200004003740037111020110099100100100001000000071011611394790100001004003840038400384003840038
102044003730002886139407251010010010000100100005005706908400184003740037381083387451010020010000200200004003740037111020110099100100100001000000071011611394790100001004003840038400384003840038
10204400373000426139407251010010010000100100005005706908400184003740037381083387451010020010000200200004003740037111020110099100100100001000000071011611394790100001004003840038400384003840038
102044003730004536139407251010010010000100100005005706908400184003740037381083387451010020010000200200004003740037111020110099100100100001000000071011611394790100001004003840038400384003840038
102044003729901506139407251010010010000100100005005706908400184003740037381083387451010020010000200200004003740037111020110099100100100001000013073311611394790100001004003840038400384003840038
102044003729902196139407251010010010000100100005005706908400184003740037381083387451010020010000200200004003740037111020110099100100100001000006071021611394790100001004003840038400384003840038
102044003730001536139407251010010010000100100005005706908400184003740037381083387451010020010000200200004003740085111020110099100100100001000000071011611394790100001004003840038400384003840038
102044003729901986139407251010010010000100100005005706908400184003740037381083387451010020010000200200004003740037111020110099100100100001000000071011611394790100001004003840038400384003840038
1020440037300006139407251010010010000100100005005706908400184003740037381083387451010020010000200200004003740037111020110099100100100001000000071011611394790100001004003840038400384003840038
1020440037300106139407251010010410006100101485005706908400184008440037381157387451010020010327204206644003740037111020110099100100100001000000071011611394790100001004003840038400384003840038

1000 unrolls and 10 iterations

Result (median cycles for code): 4.0037

retire (01)cycle (02)03080b18191e1f3a3f4e51inst 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)9fa6a7a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002440037300000010800613940725100101010000101000050570690840018400374003738130338767100102010000202000040037400371110021109101010000100000006402162239473010000104003840038400384003840038
1002440037300000011100613940725100101010000101000050570690840018400374003738130338767100102010000202000040037400371110021109101010000100000006402162239473010000104003840038400384003840086
100244003730000000006139335196100601510048141119981571807640298404164045838199403893611200201145328229144046340416811002110910101000010000228848073841122539780210000104041840495404544041440179
1002440416303119910657041728639326202100681210048161124266571947240333404634051038163223893111349261097126228784046040451101100211091010100001031102954647873963239691410000104055940461404604055840560
10024405613041100000613940725100101010000101000050570690840018400374003738130338767100102010000202000040037400371110021109101010000100000306402162239473010000104003840038400384003840038
1002440037300000014700613940725100101010000101000050570690840018400374003738130338767100102010000202000040037400371110021109101010000100000006402162239473010000104003840038400384003840038
1002440037299000015900613940725100101010000101000050570690840018400374003738130338767100102010000202000040037400371110021109101010000100000006402162239473010000104003840038400384003840038
1002440037300000011400613940725100101010000101000050570690840018400374003738130338767100102010000202000040037400371110021109101010000100000006402162239473010000104003840038400384003840038
1002440037300000014100613940725100101010000101000050570690840018400374008438130338767100102010000202000040037400371110021109101010000100000006402162239473010000104003840038400384003840038
1002440037300000014100613940725100101010000101000050570690840018400374003738130338767100102010000202000040037400371110021109101010000100000006402162239473010000104003840038400384003840038

Test 3: Latency 1->3

Code:

  fmulx 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): 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)9fa1a8acc2branch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102044003730000007263940725101001001000010010000500570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
10204400372990000613940725101001001000010010000500570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000017101161139479100001004003840038400384003840038
10204400372990030613940725101001001000010010000500570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
10204400373000000613940725101001001000010010000500570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
10204400373000000613940725101001001000010010000500570690840018400374007938108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
10204400373000000613940725101001001000010010000500570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
1020440037300000011053940725101001001000010010000500570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
10204400373000000613940725101001001000010010000500570743940018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
10204400373000000613940725101001001000010010000500570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038
10204400373000000613940725101001001000010010000500570690840018400374003738108338745101002001000020020000400374003711102011009910010010000100000007101161139479100001004003840038400384003840038

1000 unrolls and 10 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)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)9fa8accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024400373000000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010006402162239473010000104003840038400384003840038
100244003730000007263940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010006402162239473010000104003840038400384003840038
10024400373000000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010006402162239473010000104003840038400384003840038
10024400373000000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010006402162239473010000104003840038400384003840038
10024400373000000613940725100101010000101000050570690814001840037400843813033876710010201000020200004003740037111002110910101000010006402162239473010000104003840038400384003840038
10024400373000000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010006402162239473010000104003840038400384003840038
10024400373000000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010006402162239473010000104003840038400384003840038
10024400373000000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010006402162239473010000104003840038400384003840038
10024400372990000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037211002110910101000010006402162239473010000104003840038400384003840038
10024400372990000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010006402162239473010000104003840038400384003840038

Test 4: throughput

Count: 8

Code:

  fmulx v0.4s, v8.4s, v9.4s
  fmulx v1.4s, v8.4s, v9.4s
  fmulx v2.4s, v8.4s, v9.4s
  fmulx v3.4s, v8.4s, v9.4s
  fmulx v4.4s, v8.4s, v9.4s
  fmulx v5.4s, v8.4s, v9.4s
  fmulx v6.4s, v8.4s, v9.4s
  fmulx 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)030918191e3f51inst 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)9fa1a8accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80204200581500000422580100100800001008000050064000002002120040200409973399988010020080000200160000200402004011802011009910010080000100000511021611200370800001002004120041200412004120041
80204200401500002464225801001008000010080000500640000020021200402004099733999880100200800002001600002004020040118020110099100100800001000005110216112003714800001002004120041200412004120041
802042004015000004222580100100800001008000050064000012002120040200409973799988010020080000200160000201002010211802011009910010080000100020512711611200370800001002004120041200412004120041
80204200401500000422580100100800001008000050064000002002120040200409973399988010020080000200160000200402004011802011009910010080000100000511011611200370800001002004120041200412004120041
80204200401500000422580100100800001008000050064000002002120040200409973399988010020080000200160000200402004011802011009910010080000100000511011611200370800001002004120041200412004120041
80204200401550000422580100100800001008000050064000002002120040200409973399988010020080000200160000200402004011802011009910010080000100000511011611200370800001002004120041200412004120041
80204200401500000422580100100800001008000050064000012002120040200409973399988010020080000200160000200402004011802011009910010080000100000511011611200370800001002004120041200412004120041
802042004015000036422580100100800001008000050064000012002120040200409973399988010020080000200160000200402004011802011009910010080000100000511011611200370800001002004120041200412004120041
802042004015000012422580100100800001008000050064000002002120040200409973399988010020080000200160000200402004011802011009910010080000100000511011611200370800001002004120041200412004120041
80204200401500000422580100100800001008000050064000012002120040200409973399988010020080000200160000200402004011802011009910010080000100000511011611200370800001002009320041201482009420041

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03080b18191e1f3f51inst 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)5f696d6edispatch 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)9fa0a1a6a7a8a9acc2cfd2icache miss (d3)d5d6dadbddinst fetch restart (de)e0? int output thing (e9)eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80024200491500000008325800101080000108000050640000020021200402004099963100208001020800002016000020040200401180021109101080000100000000050200041600332003700080000102004120041200412004120041
80024200401500000004125800101080000108000050640000020021200402004099963100208001020800002016000020040200401180021109101080000100000000050200044900362003700080000102004120041200412004120041
80024200401500000004125800101080000108000050640000020021200402004099963100208001020800002016000020040200401180021109101080000100000000050200031600332003700080000102004120041200412004120041
8002420040150000033308125800101080000108000050640000020021200402004099963100208001020800002016000020040200401180021109101080000100000000050200031600322003700080000102004120041200412004120041
80024200401500000006225800101080000108000050640000020021200402004099963100208001020800002016000020040200401180021109101080000100000100050200031600632003700080000102004120041200412004120041
800242004015000001204125800101080000108000050640000020021200402004099963100208001020800002016000020040200401180021109101080000100000000050200031600362003700080000102004120041200412004120041
80024200401500000004725800101080000108000050640000020021200402004099963100208001020800002016000020040200401180021109101080000100000000050200051600552003700080000102004120041200412004120041
80024200401500000004125800101080000108000060640000020021200402004099963100208001020800002016000020040200401180021109101080000100000000050200021600232003700080000102004120041200412004120041
80024200401500000004125800101080000108000050640000020021200402004099963100208001020800002016000020040200401180021109101080000100020200050200051600532003700080000102004120041200412004120041
80024200401500000004125800101080000108000050640000020021200402004099963100208001020800002016000020040201421180021109101080000100000000050200021600362003700080000102004120041200412004120041