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

Test 1: uops

Code:

  frsqrte v0.4s, v0.4s
  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)a6a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004303723061190025100010001000104451030183037303727383289510001000100030373037111001100000073316332919100030383038303830383038
1004303723061190025100010001000104451030183037303727383289510001000100030373037111001100000073216332919100030383038303830383038
1004303722061190025100010001000104451030183037303727383289510001000100030373037111001100000073316332919100030383038303830383038
1004303723061190025100010001000104451030183037303727383289510001000100030373037111001100000073316332948100030383038303830383038
1004303723061190025100010001000104451030183037303727383289510001000100030373037111001100000073316332919100030383038303830383038
1004303723061190025100010001000104451030183037303727383289510001000100030373037111001100000073316332919100030383038303830383038
1004303722961190025100010001000104451030183037303727383289510001000100030373037111001100000073316332919100030383038303830383038
1004303723061190025100010001000104451030183037303727383289510001000100030373037111001100000073316332919100030383038303830383038
1004303722061190025100010001000104451030183037303727383289510001000100030373037111001100000073316332919100030383038303830383038
1004303723061190025100010001000104451030183037303727383289510001000100030373037111001100000073316332919100030383038303830383038

Test 2: Latency 1->2

Code:

  frsqrte v0.4s, v0.4s
  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)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)9fa9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722406119900251010010010000100100005001067451130018300373003728588328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
102043003722406119900251010010010000100100005001067451130018300373003728588328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
102043003722506119900251010010010000100100005001067451030018300373003728588328745101002001000020010000300373003721102011009910010010000100007101161129919100001003003830038300383003830038
102043003722506119900251010010010000100100005001067451130018300373003728588328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
102043003722506119900251010010010000100100005001067451030018300373003728588328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
10204300372256396119900251010010010000100100005001067451130018300373003728588328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
102043003722506119900251010010010000100100005001067451030018300373003728588328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
102043003722506119900251010010010000100100005001067451130018300373003728588328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
102043003722506119900251010010010000100100005001067451030018300373003728588328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038
102043003722506119900251010010010000100100005001067451130018300373003728588328745101002001000020010000300373003711102011009910010010000100007101161129919100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)030f1e3f4e51inst 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
100243003722520611990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010000640416432991910000103003830038300383003830038
100243003722500611990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010000640416342991910000103003830038300383003830038
100243003722400821990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010000640416432991910000103003830038300383003830038
100243003722500611990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010001260640416342991910000103003830038300383003830038
100243003722500611990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010000640416442991910000103003830038300383003830038
100243008322500611990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010010640416342991910000103003830038300383003830038
100243003722500611990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010000640416442991910000103003830038300383003830038
100243003722500611990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010000640416442991910000103003830038300383003830038
100243003722500611990025100101010000121000050106745113001830083300852861032876710010201000020100003003730037111002110910101000010000640416342991910000103003830038300383003830038
100243003722500611990025100101010000101000050106745113001830037300372861032876710010201000020100003003730037111002110910101000010000640416442991910000103003830038300383003830038

Test 3: throughput

Count: 8

Code:

  frsqrte v0.4s, v8.4s
  frsqrte v1.4s, v8.4s
  frsqrte v2.4s, v8.4s
  frsqrte v3.4s, v8.4s
  frsqrte v4.4s, v8.4s
  frsqrte v5.4s, v8.4s
  frsqrte v6.4s, v8.4s
  frsqrte v7.4s, v8.4s
  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)03080a0b181e1f3f51inst 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)9fa0a1a6a7a8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802048004060000000020925801001008000010080000500640000080020800398003969971669993801002008000820080008800398003911802011009910010080000100000000111513111612800360800001008004080040800408004080040
802048003960000000027425801001008000010080000500640000080020800398003969971669993801002008000820080008800398003911802011009910010080000100000000111511721612800360800001008004080040800408004080040
8020480039599000000108225801001008000010080000500640000180020800398003969971669993801002008000820080008800398003911802011009910010080000100000000111511721622800360800001008004080040800408004080040
8020480039599000000255125801001008000010080000500640000080020800398003969971669993801002008000820080008800398003911802011009910010080000100000000111511711612800360800001008004080040800898004080040
8020480039599000000216125801001008000010080000500640000080020800398003969971669993801002008000820080008800398003911802011009910010080000100000000111511711612800360800001008004080040800408004080040
8020480039600000033012725801001008000010080106500640000080020800898003969971669993801002008000820080008800398003911802011009910010080000100000000111511721620800360800001008004080040800408004080040
802048003959900000018872580100100800001008000050064000008002080039800396997166999380100200800082008000880039800391180201100991001008000010000000207111511721612800360800001008004080040800408004080040
80204800885990000300237725801001008000010080000500640000080020800398003969971669993801002008000820080008800398003911802011009910010080000100000000111511711612800360800001008004080040800408004080040
8020480039599000039010225801001008000010080000500640000080020800398003969971669993801002008000820080008800398003911802011009910010080000100000000111511721622800360800001008004080040800408004080040
802048003960000000014625801001008000010080052500640000080020800398003969971669993801002008000820280008800398003911802011009910010080000100000000111511721612800360800001008004080040800408004080040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03080f1e3a3f51inst 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)5f61696d6edispatch 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)9fa8acc2branch mispredict (cb)cfd0d2d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80024800405990001234258001010800001080000506400000580020800398003969986370019800102080000208000080039800391180021109101080000100000502000151611118003480000108004080040800408004080040
800248003960000005025800101080000108000050640000008002080039800396998637001980010208000020800008003980039118002110910108000010000050200012169138003480000108004080040800408004080040
80024800396000000715618001010800001080000506400000080020800398003969986370019800102080000208000080039800391180021109101080000100000502000121611168003480000108004080040800408004080040
80024800395990000715258001010800001080000506400000080020800398003969986370019800102080000208000080039800391180021109101080000100000502000111613118003480000108004080040800408004080040
8002480039600000050258001010800001080000506400000080020800398003969986370019800102080000208000080039800391180021109101080000100000502000131610118003480000108004080089800408004080040
8002480039600000050258001010800001080000506400000080020800398003969986370019800102080000208000080039800391180021109101080000100000502000131613138003480000108004080040800408004080040
8002480039600000050258001010800001080000506400000080020800398003969986370019800102080000208000080039800391180021109101080000100000502000111611108003480000108004080040800408004080040
8002480039599000050258001010800001080000506400000080020800398003969986370019800102080000208000080039800391180021109101080000101020503000131621148041480000108083280928809808102680040
80024800395990057050258001010800001080000506400000580020800398003969986370019800102080000208000080039800391180021109101080000100000502000111610138003480000108004080040800408004080040
8002480039600000050258001010800001080000506400000080020800398003969986370019800102080000208000080039800391180021109101080000100000502050111612118003480000108004080040800408004080040