Apple M1 Microarchitecture Research by Dougall Johnson

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

FRECPE (vector, 4H)

Test 1: uops

Code:

  frecpe 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)a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
100430372206119002510001000100010445103018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
100430372306119002510001000100010445113018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
100430372306119002510001000100010445103018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
100430372306119002510001000100010445103018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
1004303722061190025100010001000104451030183037303727383289510001000100030373037111001100004573116112919100030383038303830383038
100430372306119002510001000100010445103018303730372738328951000100010003037303711100110000973116112919100030383038303830383038
100430372306119002510001000100010445113018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
100430372306119002510001000100010445113018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
100430372306119002510001000100010445103018303730372738328951000100010003037303711100110000073116112919100030383038303830383038
100430372306119002510001000100010445113018303730372738328951042100010003037303711100110000073116112919100030383038303830383038

Test 2: Latency 1->2

Code:

  frecpe 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)0318191e3f4e51inst 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)9fa1a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003723200427261990025101001001000010010000500106745113001803003730037285883287451010020010000200100003003730037111020110099100100100001000000071021611299190100001003003830038300383003830038
10204300372240002511990025101001001000010010000500106745113001803003730037285883287451010020010000200100003003730037111020110099100100100001000000071011611299190100001003003830038300383003830038
1020430037225000611990025101001001000010010000500106745113001803003730037285883287451010020010000200100003003730037111020110099100100100001000000071011611299190100001003003830038300383003830038
1020430037225000611990025101001001000010010000500106745113001803003730037285883287451010020010000200100003003730037111020110099100100100001000000071011611299190100001003003830038300383003830038
1020430037225000611990025101001001000010010000500106745103002103003730037285883287451010020010000200100003003730037111020110099100100100001000000071011611299190100001003003830038300383003830038
10204300372250004411990025101001001000010010000500106745113001803003730037285883287451010020010000200100003003730037111020110099100100100001000000071011621299190100001003003830038300383008630038
102043003722500126311990025101001001000010010000500106745113001803003730037285883287451010020010000200100003003730037111020110099100100100001000000071011611299190100001003003830038300383003830038
1020430037224000611990025101001001000010010000500106745113001803003730037285883287451010020010000200100003003730037111020110099100100100001000000071011611299190100001003003830038300383003830038
1020430037225000611990025101001001000010010000500106745113001803003730037285883287451010020010000200100003003730037111020110099100100100001000000071011611299190100001003003830038300383003830038
1020430037225009611990025101001001000010010000500106745113001803003730037285883287451010020010000200100003003730037111020110099100100100001000000071011611299190100001003003830038300383003830038

1000 unrolls and 10 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)9fa1a6a7a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250111061199002510010101000010100005010674511300183003730037286103287671001020100002010000300373003711100211091010100001000000640316322991910000103003830038300383003830038
100243003722501217661199002510010101000010100005010674510300183003730037286103287671001020100002010000300373003711100211091010100001000000640216222991910000103003830038300383003830038
100243007422500061199002510010101000010100005010674510300183003730037286103287671001020100002010000300373003711100211091010100001000000640216222991910000103003830038300383003830038
1002430037225033061199002510010101000010100005010674510300183003730037286103287671001020100002010000300373003711100211091010100001000003640216222991910000103003830038300383003830038
100243003722500061199002510010101000010100005010674510300183003730037286103287671001020100002010000300373003711100211091010100001000000640216222991910000103003830038300383003830038
100243003722500061199002510010101000010100005010674511300183003730037286103287671001020100002010000300373003711100211091010100001000000640216222991910000103003830038300383003830038
1002430037225090726199002510010101000010100006010674510300183003730037286103287671001020100002010000300373003711100211091010100001000000640216222991910000103003830038300383003830038
1002430037225015061199002510010101000012100005010674510300183003730037286103287671001020100002010000300373003711100211091010100001000000640216222991910000103003830038300383003830038
100243003722503061199002510010101000010100005010674511300183003730037286103287671001020100002010000300373003711100211091010100001000000640216222991910000103003830038300383003830038
1002430037225015061199002510010101000012100005010674510300183003730037286103287671001020100002010000300373003711100211091010100001000000640216222991910000103003830038300383003830038

Test 3: throughput

Count: 8

Code:

  frecpe v0.4h, v8.4h
  frecpe v1.4h, v8.4h
  frecpe v2.4h, v8.4h
  frecpe v3.4h, v8.4h
  frecpe v4.4h, v8.4h
  frecpe v5.4h, v8.4h
  frecpe v6.4h, v8.4h
  frecpe 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)03091e3a3f51inst 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)696b6d6edispatch 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)9fa8a9acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80204800406000024025801001008000010080000500640000800200800398003969971670035801002008000820080008800398003911802011009910010080000100000011151209168380036800001008008880040800408004080040
80204800395990024025801001008000010080000500640000800200800398003969971669993801002008000820080008800398003911802011009910010080000100003011151208168880036800001008004080040800408004080040
80204800395990024025801001008000010080000500640000800200800398003969971669993801002008000820080008800398003911802011009910010080000100000011151209169880036800001008004080040800408004080040
80204800395990024025801001008000010080000500640000800200800398003969971669993801002008000820080008800398003911802011009910010080000100000011151208168380036800001008004080040800408004080040
80204800395990024025801001008000010080000500640000800200800398003969971669993801002008000820080008800398003911802011009910010080000100000011151208169880036800001008004080040800408004080040
80204800395990024025801001008000010080000500640000800200800398003969971669993801002008000820080008800398003911802011009910010080000100000011151206168880036800001008004080040800408004080040
80204800395990024025801001008000010080000500640000800200800398003969971669993801002008000820080008800398003911802011009910010080000100000011151209168880036800001008004080040800408004080040
80204800396000024025801001008000010080000500640000800200800398003969971669993801002008000820080008800398003911802011009910010080000100000011151208169880036800001008004080040800408004080040
80204800395990024025801001008000010080000500640000800200800398003969971669993801002008000820080008800398003911802011009910010080000100000011151208169880036800001008004080040800408004080040
80204800396000024025801001008000010080000500640000800200800398003969971669993801002008000820080008800398003911802011009910010080000100000011151208168880036800001008004080040800408004080040

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)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)9fa8acc2cfd5d6dbddinst fetch restart (de)e0ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80024800405990000502580010108000010800005064000008002008003980039699860370019800102080000208000080039800391180021109101080000100005020716047800343980000108004080040800408004080040
8002480039600000050258001010800001080000506402031800200800398003969986037001980010208000020800008003980039118002110910108000010018605020316034800343980000108004080040800408004080040
8002480039599000067258001010800001080000506400000800200800398003969986037001980010208000020800008003980039118002110910108000010000502071603480034080000108004080040800408004080040
80024800396000000502580010108000010800005064000018002008003980039699860370019800102080000208000080039800391180021109101080000100005020616066800341580000108004080040800408004080040
8002480039599000050258001010800001080000506400000800200800398003969986037001980010208000020800008003980039118002110910108000010000502071604480034080000108004080040800408004080040
80024800395990000502580010108000010800005064000018002008003980039699860370019800102080000208000080039800391180021109101080000100005020416034800341580000108004080040800408004080040
8002480039599000050258001010800001080000506400001800203800398003969986037001980010208000020800008003980039118002110910108000010000502041604380034080000108004080040800408004080040
8002480039599000050258001010800001080000506400001800200800398003969986037001980010208000020800008003980039118002110910108000010000502041603480034080000108004080040800408004080040
8002480039600000050258001010800001080000506400001800200800398003969986037001980010208000020800008003980039118002110910108000010000502071606480034080000108004080040800408008980237
800248008959901600368623258001010800001080000506400001800200800398008769986037001980010208000020800408003980039118002110910108000010036150503465707480110080000108083280040800408004080040