Apple M1 Microarchitecture Research by Dougall Johnson

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

FRSQRTE (vector, 8H)

Test 1: uops

Code:

  frsqrte v0.8h, v0.8h
  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)a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10043037220611900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
10043037239611900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
100430372345611900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
100430372236611900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
1004303722606119002510001000100010445130183037303727383289510001000100030373037111001100014073116112919100030383038303830383038
10043037230611900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
10043037230611900251000100010001044513018303730372738328951000100010003037303711100110000073124112919100030383038303830383038
10043037230821900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
100430372360611900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
100430372396119002510001000100010445130183037303727383289510001000100030373037111001100021573116112919100030383038303830383038

Test 2: Latency 1->2

Code:

  frsqrte v0.8h, v0.8h
  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)03081e1f3f4e51inst 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)9fa0a8accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225000611990025101001001000010010000500106745113001830037300372858832874510100200100002001000030037300371110201100991001001000010000071011611299190100001003003830038300383003830038
1020430037225000611990025101001001000010010000500106745103001830037300372858832874510100200100002001000030037300371110201100991001001000010001371011611299190100001003003830038300383003830038
1020430037225000611990025101001001000010010000500106745113001830037300372858832874510100200100002001000030227300371110201100991001001000010001071011611299190100001003003830038300383003830038
10204300372250120611990025101001001000010010000500106745103001830037300372858832874510100200100002001000030037300371110201100991001001000010000071011611299190100001003003830038300383003830038
1020430037225000611990025101001001000010010000500106745113001830037300372858832874510100200100002001000030037300371110201100991001001000010000071011611299190100001003003830038300383003830038
1020430037225000611990025101001001000010010000500106745103001830037300372858832874510100200100002001000030037300371110201100991001001000010000071011611299190100001003003830038300383003830038
1020430037225000611990025101001001000010010000500106745103001830037300372858832874510100200100002001000030037300371110201100991001001000010000071011611299190100001003003830038300383003830038
1020430037225000611990025101001001000010010000500106745103001830037300372858832874510100200100002001022430037300371110201100991001001000010000071011621299190100001003003830038300383003830038
1020430037225000611990025101001001000010010000500106745103001830037300372858832874510100200100002001000030037300371110201100991001001000010000071011611299190100001003003830038300383003830038
1020430037225000611990025101001001000010010000500106745103001830037300372858832874510100200100002001000030037300371110201100991001001000010000071011611299190100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.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)9fa6a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250611990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010000640216222991910000103003830038300383003830038
10024300372259611990025100101010000101000065106745113001830037300372861032876710010201000020100003003730037111002110910101000010000640216222991910000103007730038300383003830038
10024300372240611990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010000640216222991910000103003830038300383003830038
10024300372250611990025100101010000101000050106745113001830037300372861032876710010201000020100003003730227111002110910101000010000640216222991910000103003830038300383003830038
10024300372250611990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010020640216222991910000103003830038300383003830038
10024300372250611990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010000640216222991910000103003830038300383003830038
10024300372250611990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010000640216222991910000103003830038300383003830038
10024300372250611990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010000640216222991910000103003830038300383003830038
10024300372240611990025100101010000101000050106745113001830037300372861032876710010201000020100003013030037111002110910101000010090640216222991910000103003830038300383003830038
1002430037225056511990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010000640216222991910000103003830038300383003830038

Test 3: throughput

Count: 8

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03080b18191e1f3a3f51inst 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)9fa0a1a6a8a9acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802048003960000000003925801001008000010080000500640000180020080039800396997166999380100200800082008000880039800391180201100991001008000010000000001115117016108003600800001008004080040800408004080040
802048003959900000003925801001008000010080000500640000080020080039800396997166999380100200800082008000880039800391180201100991001008000010000000001115117016008003600800001008004080040800408004080040
802048003960000000003925801001008000010080000500640000180020080039800396997166999380100200800082008000880039800391180201100991001008000010000000001115117016008003600800001008004080040800408004080040
802048003960000000003925801001008000010080000500640000180020080039800396997166999380100200800082008000880039800391180201100991001008000010000000001115117016008003600800001008004080040800408004080040
802048003960000000003925801001008000010080000500640000080020080039800396997166999380100200800082008000880039800391180201100991001008000010000034001115117016008003600800001008004080040800408004080040
80204800395990000612003925801001008000010080000500640000180020080039800396997166999380100200800082008000880039800391180201100991001008000010000000001115117016008003600800001008004080040800408004080040
8020480039599000000039258010010080000100800005006400000800200800398003969971669993801002008000820080008800398003911802011009910010080000100000000011151170160080036141800001008004080040800408004080040
802048003960000000003925801001008000010080000500640000180020080039800396997166999380100200800082008000880039800391180201100991001008000010000000001115117016008003600800001008004080040800408004080040
802048003960000000003925801001008000010080000500640000080020080039800396997166999380100200800082008000880039800391180201100991001008000010000000001115117016008003600800001008004080040800408004080040
8020480039600000000039258010010080000100800005006400001800200800398003969965106998180102200800142008001480039800391180201100991001008000010000200002225127123118003500800001008004080040800408004080040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03080a18191e3f51inst 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)5f60696b6d6edispatch 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)9fa0a8a9acc2c5branch mispredict (cb)cfd5d6dbddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002480039600000007152580010108000010800005064000000800200800398003969986370019800102080000208000080039800391180021109101080000100000000502051605480034080000108004080040800408004080040
8002480039600000007152580010108000010800005064000000800200800398003969986370019800102080000208000080039800391180021109101080000100000000502051605880034080000108004080040800408004080040
8002580040599000007152580010108000010800005064000001800200800398003969986370019800102080000208000080039800391180021109101080000100000000502071607780034080000108004080040800408004080040
800248003959900000502580010108000010800005064000000800200800398003969986370019800102080000208000080039800391180021109101080000100000000502051605480034080000108004080040800408004080040
8002480039600000007152580010108000010800005064000000800200800398003969986370019800102080000208000080039800391180021109101080000100000000502041606480034080000108004080040800408004080040
8002480039599000005252580010108000010800005064000000800200800398003969986370019800102080000208000080039800391180021109101080000100000000502051605580034080000108004080040800408004080040
800248003959900000502580010108000010800005064000000800200800398003969986370019800102080000208000080039800391180021109101080000100000000502051605680034080000108004080040800408004080040
800248003959900000502580010108000010800005064000001800200800398003969986370019800102080000208000080039800391180021109101080000100000000502041604580034080000108004080040800408004080040
8002480039599000005025800101080000108000050640000018002008003980039699863700198001020800002080000800398003911800211091010800001001000000502041605480034080000108004080040800408004080040
800248003960000000502580010108000010800005064000000800200800398003969986370019800102080000208000080039800391180021109101080000100000000502061605680034080000108004080040800408004080040