Apple M1 Microarchitecture Research by Dougall Johnson

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

FRSQRTS (scalar, S)

Test 1: uops

Code:

  frsqrts s0, s0, s1
  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)a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
100440373106134072510001000100053190814018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
100440373006134072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
1004403730015634072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
100440373006134072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
100440373096134072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
100440373106134072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
100440373006134072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
100440373006134072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038
1004403730061340725100010001000531908040184037403732583389510001000200040374037111001100006373116113473100040384038403840384038
100440373006134072510001000100053190804018403740373258338951000100020004037403711100110000073116113473100040384038403840384038

Test 2: Latency 1->2

Code:

  frsqrts s0, s0, s1
  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)030b1e3a3f4e51inst 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)9fa8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020440037300000613940725101001001000010010000500570690804001804003740037381156387401010020010008200200164003740037111020110099100100100001000011171801600394900100001004003840038400384003840038
102044003729900012983940725101001001000010010000541570690804001804003740037381156387411010020010008200200164003740037111020110099100100100001000011171701600394890100001004003840038400384003840038
102044003730000013293940725101001001000010010000500570690804001804003740037381157387411010020010008200200164003740037111020110099100100100001000011171701600394900100001004003840038400384003840038
102044003730000012373940725101001001000010010000500570690814001804003740037381156387401010020010008200200164003740037111020110099100100100001000011171701600394900100001004003840038400384003840038
1020440037300000125739407251010010010000100100005005706908040018040037400373810833874510100200100002002000040037400371110201100991001001000010000000710116113947922100001004003840038400384003840038
102044003730000012273940725101001001000010010000500570690804001834003740037381083387451010020010000200200004003740037111020110099100100100001000000071011611394790100001004003840038400384003840038
1020440037299000613940725101001001000010010000500570690814001804003740037381083387451010020010000200200004003740037111020110099100100100001000000071011611394790100001004003840038400384003840038
102044003730000012553940725101001001000010010000500570690804001804003740037381083387451010020010000200200004003740037111020110099100100100001000000071011611394790100001004003840038400384003840038
102044003730000013393940725101001001000010010000500570690804001804003740037381083387451010020010000200200004003740037111020110099100100100001000000071011611394790100001004003840038400384003840038
10204400372990011453940725101001001000010010000500570690814001804003740037381083387451010020010000200200004003740037111020110099100100100001000000071011611394790100001004003840038400384003840038

1000 unrolls and 10 iterations

Result (median cycles for code): 4.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)9fa1a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100244003730000000823940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000006402163239473010000104003840038400384003840038
100244003730000015061394072510010101000010100005057069080400184007840037381303387671001020100002020000400374003711100211091010100001001022306402162239473010000104003840038400384003840038
100244003730000000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000026402163239473010000104003840038400384003840038
100244003730000000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000006402163239473010000104003840038400384003840038
100244003729900030613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000006402163239473010000104003840038400384003840038
100244003730000000613940725100101010000101000050570690804001840037400373813033876710010221000020200004003740037111002110910101000010000006402162239473010000104013140084400384003840038
100244003730000000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000006402163239473010000104003840038400384003840038
1002440037300000004413940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000006402163239473010000104003840038400384003840038
1002440037299000300613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000006402162239473010000104003840038400384003840038
1002440037300000390613940725100101010000101014850570690814001840037400373813033876710010201000020200004003740037111002110910101000010010306402162239547010000104003840038400384003840038

Test 3: Latency 1->3

Code:

  frsqrts s0, s1, s0
  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)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)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)9fa0a1a6a7a8a9acc2cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204400373000000000613940725101001001000010010000500570690814001840037400373810833874510100200100002002000040037400371110201100991001001000010000000000071011611394790100001004003840038400384003840038
102044003730000000007263940725101001001000010010000500570690814001840037400373810833874510100200100002002000040037400371110201100991001001000010000000000071011611394790100001004003840038400384003840038
10204400373000000000613940725101001001000010010000500570690814001840037400373810833874510100200100002002000040037400371110201100991001001000010000000000071011611394790100001004003840038400384003840038
102044003730000001500613940725101001001000010010000500570690814001840037400373810833874510100200100002002000040037400371110201100991001001000010000000000071011611394790100001004003840038400384003840038
10204400373000000000613940725101001001000010010000500570690814001840037400373810833874510100200100002002000040037400371110201100991001001000010000000000071011611394790100001004003840038400384003840038
10204400373000000000613940725101001001000010010000500570690814001840037400373810833874510100200100002002000040037400371110201100991001001000010000000000071011611394790100001004003840038400384003840038
10204400373000000000613940725101001001000010010000500570690814001840037400373810833874510100200100002002000040037400371110201100991001001000010000000000171011611394790100001004003840038400384003840038
10204400373000000000613940725101001001000010010000500570690814001840037400373810833874510100200100002002000040037400371110201100991001001000010000000000071011611394790100001004003840038400384003840038
10204400373000000000613940725101001001000010010000500570690814001840037400373810833874510100200100002002000040037400371110201100991001001000010000000000071011611394790100001004003840038400384003840038
10204400373000000000613940725101001001000010010000500570690814001840037400373811233874510100200100002002000040037400371110201100991001001000010000000000071011611394790100001004003840038400384003840038

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)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)9fa1a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100244003730006139407251001010100001010000505706908040018400374003738130033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
100244003729906139407251001010100001010000505706908040018400374003738130033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
1002440037300072639407251001010100001010000505706908140018400374003738130033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
100244003729906139407251001010100001010000505706908040018400374003738130033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
100244003730006139407251001010100001010000505706908040018400374003738130033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
100244003730008439407251001010100001010000505706908140018400374003738130033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
100244003730006139407251001010100001010000505706908140018400374003738130033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
100244003730006139407251001010100001010000505706908040018400374003738130033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
100244003730006139407251001010100001010000505706908040018400374003738130033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
100244003731106139407251001010100001010000505706908040018400374003738130033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038

Test 4: throughput

Count: 8

Code:

  frsqrts s0, s8, s9
  frsqrts s1, s8, s9
  frsqrts s2, s8, s9
  frsqrts s3, s8, s9
  frsqrts s4, s8, s9
  frsqrts s5, s8, s9
  frsqrts s6, s8, s9
  frsqrts s7, s8, s9
  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)030b1e3f51inst 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)9fa8a9accdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80204200401500020025801001008000010080000500640000120021200402004099730399988010020080000200160000200402004011802011009910010080000100106051102161120037800001002004120041200412004120041
80204200401500124225801001008000010080000500640000020021200402004099730399988010020080000200160000200402004011802011009910010080000100100051102164120037800001002004120041200922009420041
80204200951500124249801001008000010080000626640844020021200402010199730399988010020080000200160000200402004011802011009910010080000100000051101161120037800001002004120041200412004120041
8020420040150004225801001008000010080000500640000120021200402004099730399988010020080000200160000200402004011802011009910010080000100000051101161120037800001002004120041200412004120041
8020420040150008425801001008000010080000500640000020021200402004099730399988010020080000200160000200402004011802011009910010080000100000051101161120037800001002004120041200412004120041
8020420040149004225801001008000010080000500640000020021200402004099730399988010020080000200160000200402004011802011009910010080000100000051101393120037800001002004120041200412004120041
80204200401500124225801001008000010080000500640000020021200402004099730399988010020080000200160000200402004011802011009910010080000100000051101161120037800001002004120041200412004120041
8020420040150004225801001008000010080000500640000020021200402004099737399988010020080000200160000200402004011802011009910010080000100000051101161120037800001002004120041200412004120041
8020420040150004225801001008000010080000500640000020021200402004099730399988010020080000200160000200402004011802011009910010080000100000051101161120037800001002004120041200412004120041
80204200401500072625801001008000010080000500640000020021200402004099730399988010020080000200160000200402004011802011009910010080000100000051101161120037800001002004120041200412004120041

1000 unrolls and 10 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)9fa9cfd2icache miss (d3)d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420049150004125800101080000108000050640000020021200402004099963100208001020800002016000020040200401180021109101080000100502050416422003780000102004120041200412004120041
80024200401501014625800101080000108000050640000120021200402004099963100208001020800002016000020040200401180021109101080000100502030216442003780000102004120041200412004120041
8002420040151004125800101080000108000050640000120021200402004099963100208001020800002016000020040200401180021109101080000100502000416422003780000102004120041200412004120041
8002420040150034125800101080000108000050640000120021200402004099963100208001020800002016000020040200401180021109101080000100502000216422003780000102004120041200412004120041
8002420040150068325800101080000108000050640000020021200402004099963100208001020800002016000020040200401180021109101080000100502000216422003780000102004120041200412004120041
8002420040150006225800101080000108000050640000020021200402004099963100208001020800002016000020040200401180021109101080000100502000316422003780000102004120041200412004120041
8002420040150006225800101080000108000050640000020021200402004099963100208001020800002016000020040200401180021109101080000100502000416242003780000102004120041200412004120041
8002420040150004125800101080000108000050640000020021200402004099963100208001020800002016000020040200401180021109101080000100502000416422003780000102004120041200412004120041
8002420040150006225800101080000108000050640000120021200402004099963100208001020800002016000020040200401180021109101080000100502000416632003780000102004120041200412004120041
8002420040150004125800101080000108000050640000020021200402004099963100208001020800002016000020040200401180021109101080000100502000216242003780000102004120041200412004120041