Apple M1 Microarchitecture Research by Dougall Johnson

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

FRSQRTE (scalar, H)

Test 1: uops

Code:

  frsqrte h0, h0
  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
100430372201561900251000100010001044513018303730372738328951000100010003037303711100110000073316112919100030383038303830383038
10043037230611900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
10043037220611900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
10043037230611900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
10043037220611900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
10043037230611900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
10043037230611900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
10043037230611900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
10043037230611900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
10043037230821900251000100010001044513018303730372738328951000100010003037303711100110000073116112919100030383038303830383038

Test 2: Latency 1->2

Code:

  frsqrte h0, h0
  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)031e3a3f4e51inst 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)9fa8a9accdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722500611990025101001001000010010000500106745113001830037300372858832874510100200100002001000030037300371110201100991001001000010000007102162229919100001003022930227302293022730085
102043003722500611990025101001001000010010000500106745113001830037300372858832874510100200100002001000030037300371110201100991001001000010001007102162229919100001003003830038300383003830038
102043003722500611990025101001001000010010000500106745113001830037300372858832874510100200100002001000030037300371110201100991001001000010000007102162229919100001003003830038300383003830038
102043003722400611990025101001001000010010000500106745113001830037300372858832874510100200100002001000030037300371110201100991001001000010000007102162229919100001003003830038300383003830038
102043003722500611990025101001001000010010000500106745113001830037300372858832874510100200100002001000030037300371110201100991001001000010000007102162229919100001003003830038300383003830038
102043003722500611990025101001001000010010000500106745113001830037300372858832874510100200100002001000030037300371110201100991001001000010000007102162229919100001003003830038300383003830038
102043003722500611990025101001001000010010000500106745113001830037300372858832874510100200100002001000030037300371110201100991001001000010000007102162229919100001003003830038300383003830038
102043003722500611990025101001001000010010000500106745113001830037300372858832874510100200100002001000030037300371110201100991001001000010000007102162229919100001003003830038300383003830038
102043003722500611990025101001001000010010000500106745113001830037300372858832874510100200100002001000030037300371110201100991001001000010001007102162229919100001003003830038300383003830038
102043003722500611990025101001001000010010000500106745113001830037300372858832874510100200100002001000030037300371110201100991001001000010000007102162229919100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.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)9fa0a1a6a7a8a9acc2branch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250000006119900251001010100001010000501067451030018300373003728610328767100102010000201000030037300371110021109101010000100000000006402162229919010000103003830038300383003830038
10024300372250000006619900251001010100001010000501067451030018300373003728610328767100102010000201000030037300371110021109101010000100000000006402162229919010000103003830038300383003830038
10024300372250000006119900251001010100001010000501067451030018300373003728610328767100102010000201000030037300371110021109101010000100000000006402162229919010000103003830038300383003830038
10024300372250000006119900251001010100001010000501067451030018300373003728610328767100102010000201000030037300371110021109101010000100000000006402162229919010000103003830038300383003830038
100243003722500000015619900251001010100001010000501067451030018300373003728610328767100102010000201000030037300371110021109101010000100000000006402162229919010000103003830038300383003830038
10024300372250000006119900251001010100001010000501067451030018300373003728610328767100102010000201000030037300371110021109101010000100000000006402162229919010000103003830038300383003830038
10024300372250000006119900251001010100001010000501067451030018300373003728610328767100102010000201000030037300371110021109101010000100000000006402162229919010000103003830038300383003830038
10024300372250000006119900251001010100001010000501067451030018300373003728610328767100102010000201000030037300371110021109101010000100000000006402162229919010000103003830038300793003830038
10024300372250000006119900251001010100001010000501067451030018300373003728610328767100102010000201000030037300371110021109101010000100000000006402162229919010000103003830038300383003830038
10024300372250000006119900251001010100001010000501067451030018300373003728610328767100102010000201000030037300371110021109101010000100000000006402162229919010000103003830038300383003830038

Test 3: throughput

Count: 8

Code:

  frsqrte h0, h8
  frsqrte h1, h8
  frsqrte h2, h8
  frsqrte h3, h8
  frsqrte h4, h8
  frsqrte h5, h8
  frsqrte h6, h8
  frsqrte h7, h8
  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)031e3f51inst 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)9fa8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80204800395990392580100100800001008000050064000008002080039800396997166999380100200800082008000880039800391180201100991001008000010000112511701600800360800001008004080040800408004080040
80204800396000392580100100800001008000050064000008002080039800396997166999380100200800082008000880039800391180201100991001008000010000111511701600800360800001008004080040800408004080040
80204800395990392580100100800001008000050064000008002080039800396997166999380100200800082008000880039800391180201100991001008000010000111511701600800360800001008004080040800408004080040
80204800395990392580100100800001008000050064000018002080039800396997167002880178200800082008000880039800391180201100991001008000010000111511701600800360800001008004080040800408004080040
80204800396000269737180561101803601028033851164385708002080039800396997166999380100200800082008000880039800391180201100991001008000010000111511701600800360800001008004080040800408004080040
80204800395990392580100100800001008000050064000008002080039800396997166999380100200800082008000880039800391180201100991001008000010000111511701600800360800001008004080040800408004080040
802048003959903925801001008000010080000500640000080020800398003969971256999380100200800082008000880039800391180201100991001008000010000111511701600800360800001008004080040800898004080040
802048003960007042580100100800001008000050064000008002080039800396997166999380100200800082008000880039800391180201100991001008000010020111511701600800360800001008009080040800408004080040
802048003959907042580100100800001008000050064000008002080039800396997166999380100200800082008000880039800391180201100991001008000010000111511701600800360800001008004080040800408004080040
802048008859902292580100100800001008000050064000008002080039800396997166999380100200800082008000880039800391180201100991001008000010000111511701600800360800001008004080040800408004080040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03080b1e1f3f51inst 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)9fa0a6a8a9acbranch mispredict (cb)cfd5d6ddinst fetch restart (de)e0ebec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
800248004060000005025801061080000108000050640000180020800398003970049370019800102080000208000080039800391180021109101080000100000189050201816178800340080000108023780040800408004080040
80024800396000000502580010108000010800005064000018002080039800396998637001980010208000020800008003980039118002110910108000010030021005020616178800340080000108004080040800408004080040
8002480039599000050258001010800001080000506400001800208003980039699863700198001020800002080000800398003911800211091010800001000003905020816615800340080000108004080040800408004080040
8002480039599100071258001010800001080000506400001800208023580039699863700198001020800002080000800398023811800211091010800001000102130502017481717800340080000108004080040800408004080040
8002480039599000050258001010800001080000506400000800208003980039699863700198001020800002080000800398003911800211091010800001000001980502017161717800340080000108004080040800408004080040
80024800396000000502580010108000010800005064000008002080039800396998637001980010208000020800008003980039118002110910108000010000015050201716817800340080000108004080040800408004080040
800248003960000005025800101080000108000050640000180020800398003969986370019800102080000208000080039800391180021109101080000100000204050201716714800340080000108004080040800408004080040
800248003960000002622580010108000010800005064000008002080039800396998637001980010208000020800008003980039118002110910108000010000020705020716817800340080000108004080040800408004080040
800248003959900165050258001010800001080000506400001800208003980039699863700198001020800002080150800398003911800211091010800001000002310502017161717800340080000108004080040800408004080040
800248003959900005025800101080000108000050640000080020800398003969986370019800102080000208000080039800391180021109101080000100000204050201716186800340080000108004080040800408004080040