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, 4H)

Test 1: uops

Code:

  frsqrte v0.4h, v0.4h
  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)a1a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004303723061190025100010001000104451130183037303727383289510001000100030373037111001100000073116112919100030383038303830383038
100430372311161190025100010001000104451130183037303727383289510001000100030373037111001100000073116112919100030383038303830383038
1004303722061190025100010001000104451130183037303727383289510001000100030373037111001100000073116112919100030383038303830383038
1004303723061190025100010001000104451130183037303727383289510001000100030373037111001100000073116112919100030383038303830383038
1004303722061190025100010001000104451130183037303727383289510001000100030373037111001100000073116112919100030383038303830383038
1004303723061190025100010001000104451130183037303727383289510001000100030373037111001100000073116112954100030383038303830383038
1004303722061190025100010001000104451130183037303727383289510001000100030373037111001100000073116112919100030383038303830383038
1004303723061190025100010001000104451130183037303727383289510001000100030373037111001100000073116112919100030383038303830383038
100430372322561190025100010001000104451130183037303727383289510001000100030373037111001100000073116112919100030383038303830383038
1004303723061190025100010001000104451130183037303727383289510001000100030373037111001100000073116112919100030383038303830383038

Test 2: Latency 1->2

Code:

  frsqrte v0.4h, v0.4h
  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)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)9fa0a8cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225061199002510100100100001001000050010674510300183003730037285880328745101002001000020010000300373003711102011009910010010000100027102161129919100001003003830038300383003830038
1020430037225061199002510100100100001001000050010674510300183003730037285880328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
1020430037225061199002510100100100001001000050010674510300183003730037285880328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
1020430037225061199002510100100100001001000050010676120300183003730037285880328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
1020430037225061199002510100100100001001000050010674510300183003730037285880328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
1020430037225061199002510100100100001001000050010674510300183003730037285880328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
1020430037225061199002510100100100001001000050010674510300183003730037285880328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
10204300372240943199002510100100100001001000050010674510300183003730037285880328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
1020430037225061199002510100100100001001000050010674510300183003730037285880328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
1020430037225061199002510100100100001001000050010674510300183003730037285880328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)031e1f3f4e51inst 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)9fa8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037224005801990025100101010000101000050106745103001830037300372861003287671001020100002010000300373003711100211091010100001000640216222991910000103003830038300383003830038
1002430037224008731990025100101010000101000050106745103001830037300372861003287671001020100002010000300373003711100211091010100001000640216222991910000103003830038300383003830038
10024300372250010251990025100101010000101000050106745103001830037300372861003287671001020100002010000300373003711100211091010100001000640216222991910000103003830038300383003830038
10024300372250011081990025100101010000101000050106745103001830037300372861003287671001020100002010000300373003711100211091010100001000640216222991910000103003830038300383003830038
1002430037225004281990025100101010008101008450106745103001830037300372861003287671001020100002010000300373003711100211091010100001000640216222991910000103003830038300383003830038
10024300372250015341990025100101010000101000050106745103001830037300372861003287671001020100002010000300373003711100211091010100001000640216222991910000103003830038300383003830038
1002430037225003761990025100101010000101000050106745113001830037300372861003287671001020100002010000300373003711100211091010100001000640216222991910000103003830038300383003830038
1002430037224009971990025100101010000101000050106745113001830037300372861003287671001020100002010000300373003711100211091010100001000640216222991910000103003830038300383003830038
1002430037225009711990025100101010000101000050106745103001830037300372861003287671001020100002010000300373003711100211091010100001000640216222991910000103003830038300383003830038
100243003722500611988425100101010000101000050106745103001830037300372861003287671001020100002010000300373003711100211091010100001000640216222991910000103003830038300383003830038

Test 3: throughput

Count: 8

Code:

  frsqrte v0.4h, v8.4h
  frsqrte v1.4h, v8.4h
  frsqrte v2.4h, v8.4h
  frsqrte v3.4h, v8.4h
  frsqrte v4.4h, v8.4h
  frsqrte v5.4h, v8.4h
  frsqrte v6.4h, v8.4h
  frsqrte v7.4h, v8.4h
  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)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)9fa0a1a6a7a8acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8020480040600000000070425801001008000010080000500640000080020080039800396997106699938010020080008200800088003980039118020110099100100800001000000000111511701600800360800001008004080040800408004080078
80204800396000000000199325801001008000010080000500640000080020080039800396997106699938010020080008200800088003980039118020110099100100800001000000000111511701600800360800001008004080040800408004080040
80204800396000000000141625801001008000010080000500640000080020080039800396997106699938010020080008200800088003980039118020110099100100800001000000000111511701600800360800001008004080040800408004080040
80204800396000000000209825801001008000010080000500640000180020080039800396997106699938010020080008200800088003980039118020110099100100800001004000020600111514311600800360800001008068080878806328097980978
802048043459900001200101925801001008000010080000500640000180020080039800396997106699938010020080008200800088003980039118020110099100100800001000000000111511701600800360800001008004080040800408004080040
8020480039600001500038225801001008000010080000500640000080020080039800396997106699938010020080008200800088003980039118020110099100100800001000000100111511701600800360800001008004080040800408004080040
80204800395990000000156625801001008000010080000500640000080020080039800396997106699938010020080008200800088003980039118020110099100100800001000000000111511701600800360800001008004080040800408004080040
80204800395990000000117125801001008000010080000500640000180020080039800396997106699938010020080008200800558003980039118020110099100100800001000000200111511701600800360800001008004080040800408004080040
80204800395990000000279525801001008000010080000500640000080020080039800396997106699938010020080008200800088003980039118020110099100100800001000000000111511701600800360800001008004080040800408004080040
80204800395990000000194625801001008002410080000500640000180020080039800396997106699938010020080008200800088003980039118020110099100100800001002000000111511701600800740800001008004080040801388004080040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0308191e1f3f51inst 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)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)9fa1a8acbranch mispredict (cb)cfd2icache miss (d3)d5d6d9daddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002480040599009050258001010800001080000506400000080020800398003969986037001980010208000020800008003980039118002110910108000010000050200031600338003480000108004080040800408004080040
8002480039599000050258001010800001080000506400000080020800398003969986037001980010208000020800008003980039518002110910108000010000050200021600238003480000108004080040800408004080040
800248003960000001988258001010800001080000506400000080020800398003969986037001980010208000020800008003980039118002110910108000010000050200021600338003480000108004080040800408004080040
80024800396000000502580010108000010800005064000000801728003980039699860167012980114208000020800008003980039218002110910108000010401725050720021600338007280000108004080090800408004080040
80024802166000258231650258001010800001080000506400000080020800398003969986037001980010208000020800008003980039118002110910108000010000050200031600338003480000108004080040800408004080040
80024800396000015050258001010800001080000506400000080020800398003969986337001980010208000020800008003980039118002110910108000010000050200021600338003480000108004080040800408004080040
8002480039600000050258001010800001080000506400000080020800398003969986037001980010208000020800008003980039518002110910108000010000050200041600338008580000108004080040800408004080040
80024800395990000502580010108000010800005064000000800208003980039699860370019800102080000208000080039800391180021109101080000100510150200041600338003480000108004080040800408004080040
8002480039599000050258001010800001080000506400000080020800398003969986037001980010208000020800008003980039118002110910108000010000050200031600248003480000108004080040800408004080040
8002480039599000050258001010800001080000506400000080020800398003969986037001980010208000020800008003980039118002110910108000010000050200031600328003480000108004080040800408004080040