Apple Microarchitecture Research by Dougall Johnson

M1/A14 P-core (Firestorm): Overview | Base Instructions | SIMD and FP Instructions
M1/A14 E-core (Icestorm):  Overview | Base Instructions | SIMD and FP Instructions

FCMPE (scalar, S)

Test 1: uops

Code:

  fcmpe s0, s1
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4

(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 uop (01)cycle (02)031e1f3f51schedule uop (52)schedule simd uop (54)dispatch simd uop (57)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map simd uop (7e)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst simd alu (9a)l1d tlb access (a0)l1d cache writeback (a8)cfd5map dispatch bubble (d6)ddfetch restart (de)e0f5f6f7f8fd
100410387004925100010001000800001019103810388643896100010002000103810381110011000007311611103310391039103910391039
100410388004925100010001000800001019103810388643896100010002000103810381110011000007311611103310391039103910391039
100410387004925100010001000800001019103810388643896100010002000103810381110011000007311611103310391039103910391039
100410388004925100010001000800001019103810388643896100010002000103810381110011000007311611103310391039103910391039
100410388004925100010001000800001019103810388643896100010002000103810381110011000007311611103310391039103910391039
100410388004925100010001000800001019103810388643896100010002000103810381110011000007311611103310391039103910391039
100410388004925100010001000800001019103810388643896100010002000103810381110011000007311611103310391039103910391039
10041038712004925100010001000800001019103810388643896100010002000103810381110011000007311611103310391039103910391039
100410388004925100010001000800001019103810388643896100010002000103810381110011000007311611103310391039103910391039
100410388004925100010001000800001019103810388643896100010002000103810381110011000007311611103310391039103910391039

Test 2: Latency 3->1

Chain cycles: 2

Code:

  fcmpe s0, s1
  fcsel d0, d2, d3, eq
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 2 chain cycles): 2.0037

retire uop (01)cycle (02)031e1f3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)flags prf full (73)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
20204400373000016413982225201001002000010020000500285388004001840037400373731603374952010020020000200500004003740037112020110099100100200001010000131011611399090100001004003840038400384003840038
202044003730000613982225201001002000010020000500285388004001840037400373731603374952010020020000200500004003740037112020110099100100200001010000131011611399090100001004003840038400384003840038
202044003730000613982225201001002000010020000500285388004001840037400373731603374952010020020000200500004003740037112020110099100100200001010000131011611399090100001004003840038400384003840038
202044003730000613982225201001002000010020000500285388004001840037400373731603374952010020020000200500004003740037112020110099100100200001010000131011611399090100001004003840038400384003840038
202044003730000613982225201001002000010020000500285388004001840037402283731603374952010020020000200500004003740037112020110099100100200001010000131011611399090100001004003840038400384003840038
202054003729900613982225201001002000010020000500285388004001840037400373731603374952010020020000200500004003740037112020110099100100200001010000131011611399090100001004003840038400384003840038
202044003730000613982225201001002000010020000500285388004001840037400373731603374952010020020000200500004003740037112020110099100100200001010000131011611399090100001004003840038400384003840038
202044003730000613982225201001002000010020000500285388004001840037400373731603374952010020020000200500004003740037112020110099100100200001010000131011611399090100001004003840038400384003840038
202044003730000613982225201001002000010020000500285388004001840037400373731603374952010020020000200500004003740037112020110099100100200001010000131011611399090100001004003840038400384003840038
202044003730000993982225201001002000010020000500285388004001840037402243731603374952010020020000200500004003740037112020110099100100200001010000131011611399090100001004003840038400384003840038

1000 unrolls and 10 iterations

Result (median cycles for code, minus 2 chain cycles): 2.0037

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)6061696b6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9accfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
200244003730000000613982225200101020000102000050285388011040018040037400373733833751720010202000020500004003740037112002110910102000010010000000127010102161139910010000104003840038400384003840038
20024400373000000061398222520010102000010200005028538801104001804003740037373383375172001020200002050000400374003711200211091010200001001000000012701051161139910010000104003840038400384003840038
20024400373000000094398222520010102000010200005028538801104001804003740037373383375172001020200002050000400374003711200211091010200001001000000012701051161139910010000104003840038400384003840038
20024400373000000061398224220010102000010200005028538801104001804003740037373383375172001020200002050000400374003711200211091010200001001000000012701051161139910010000104003840038400384003840038
200244003730000000613982225200101020000102000050285388010400180400374003737338337517200102020000205000040037400371120021109101020000100100000001270001161139910010000104003840038400384003840038
2002440037300000006139822252001010200001020000502853880110400180400374003737338337517200102020000205000040037400371120021109101020000100100000001270001161139910010000104003840038400384003840038
2002440037299000006139822252001010200001020000502853880110400180400374003737338337517200102020107205000040037400371120021109101020000100100000001270001161139910010000104003840038400384003840038
200244003730000000613982225200101020000102000050285388010400180400374003737338337517200102020000205000040037400371120021109101020000100100000001270001161139910010000104003840038400384003840038
2002440037300000006139822252001010200001020000502853880110400180400374003737338337517200102020000205000040037400371120021109101020000100100000001270001161139910010000104003840038400384003840038
2002440037300000006139822252001010200001020000502853880110400180400374003737338337517200102020000205000040037400371120021109101020000100100000001270001161139910010000104003840038400384003840038

Test 3: Latency 3->2

Chain cycles: 2

Code:

  fcmpe s0, s1
  fcsel d1, d2, d3, eq
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 2 chain cycles): 2.0037

retire uop (01)cycle (02)031e3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d cache writeback (a8)acbranch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
2020440037300061398222520100100200001002000050028538800400184003740037373163374952010020020000200500004003740037112020110099100100200001010000013101161139909100001004003840038400384003840038
2020440037300061398222520100100200001002000050028538801400184003740037373163374952010020020000200500004003740037112020110099100100200001010000013101161139909100001004003840038400384003840038
2020440037300061398222520100100200001002000050028538801400184003740037373163374952010020020000200500004003740037112020110099100100200001010000013101161139909100001004003840038400384003840038
2020440037300061398222520100100200001002000050028538801400184003740037373163374952010020020000200500004003740037112020110099100100200001010000013101161139909100001004003840038400384003840038
2020440037300061398222520100100200001002000050028538800400184003740037373163374952010020020000200500004003740037112020110099100100200001010000013101161139909100001004003840038400384003840038
2020440037300061398222520100100200001002000050028538800400184003740037373163374952010020020000200500004003740037112020110099100100200001010000013101161139909100001004003840038400384003840038
2020440037300061398222520100100200001002000050028538801400184003740037373163374952010020020000200500004003740037112020110099100100200001010000013101161139909100001004003840038400384003840038
2020440037300061398222520100100200001002000050028538800400184003740037373163374952010020020000200500004007440037112020110099100100200001010000013101161139909100001004003840038400384003840038
2020440037300061398222520116100200001002000050028538801400184003740037373163374952010020020000200500004003740037112020110099100100200001010010013101161139909100001004003840038400384003840073
2020440037300061398222520100100200001002000050028538801400184003740037373163374952010020020000200500004003740037112020110099100100200001010000013101161139909100001004003840038400384003840038

1000 unrolls and 10 iterations

Result (median cycles for code, minus 2 chain cycles): 2.0037

retire uop (01)cycle (02)031e3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fld unit uop (a6)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
200244003730003725398222520010102000010200005028538801400184003740037373383375172001020200002050000400374003711200211091010200001001000001270116113991010000104003840038400384003840038
2002440037300061398222520010102000010200005028538801400184003740037373383375172001020200002050000400374003711200211091010200001001000001270116113991010000104003840038400384003840038
2002440037300061398222520010102000010200005028538800400184003740037373383375172001022200002050000400374003711200211091010200001001000001270116113991010000104003840038400384003840038
2002440037300084398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000001270116113991010000104003840038400384003840038
2002440037300061398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000001270116113991010000104003840038400384003840038
2002440037299061398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000001270116113991010000104003840038400384003840038
2002440037300061398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000001270116113991010000104003840038400384003840038
2002440037300061398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000031270116113991010000104003840038400384003840038
2002440037300061398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000001270116113991010000104003840038400384003840038
2002440037300061398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000001270216113991010000104003840038400384003840038

Test 4: throughput

Count: 8

Code:

  fcmpe s0, s1
  fcmpe s0, s1
  fcmpe s0, s1
  fcmpe s0, s1
  fcmpe s0, s1
  fcmpe s0, s1
  fcmpe s0, s1
  fcmpe s0, s1
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696b6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fld unit uop (a6)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020480038599000000007142580100100800001008000050064000008001908003880038699643699968010020080000200160000800388003811802011009910010080000100020005110216118003501008003980039800398003980039
8020480038600000000005292580100100800001008000050064000008001908003880038699643699968010020080000200160000800388003811802011009910010080000100000005110116118003501008144781150814448144281573
80204814396082000272735732464530337080793128806211288072563764429008109208148581007705911297110480797201807312021615728153681535231802011009910010080000100012166154552461853381255311008115381630816848143881200
802048172161100203532470729049322580100100800001008000053564000008001908003880038699643699968010020080000200160000800388003811802011009910010080000100000005110116118003501008003980039800398003980039
802048003860000000000492580100100800001008000050064000008001908003880038699643699968010020080000200160000800388003811802011009910010080000100000005110116118003501008003980039800398003980039
802048003859900000000492580100100800001008000050064000008001908003880038699643699968010020080000200160000800388003811802011009910010080000100000005110116118003501008003980039800398003980039
8020480038599000000004913480159124800691118017550064039018005608003880038699643699968010020080000200160000800388003811802011009910010080000100000005110116118003501008003980039800398003980039
802048003859900000000492580100100800001008000050064000008001908003880038699643699968010020080000200160000800388003811802011009910010080000100000005110116118003501008003980039800398003980039
802048003859901000000492580100100800001008000050064000018001908003880038699643699968010020080000200160000800388003811802011009910010080000100000005110116118003501008003980039800398003980039
802048003862100000000492580100100800001008000050064000008001908003880038699643699968010020080000200160000800388003811802011009910010080000100000005110116118003501008003980039800398003980039

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03191e1f3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb miss (a1)l1d cache writeback (a8)acc2cdcfd5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eb? int retires (ef)f5f6f7f8fd
80024800386000001142580010108000010800005064000008005680038800387002837001880010208000020160000800868008611800211091010800001000020507644100035800330108003980039800398003980039
8002480038599000492580010108000010800505064000008001980038800386998637001880010208000020160000800388003811800211091010800001002000502051600035800330108003980039800398003980039
80024800386200907142580010108000010800005064000018001980038800386998637001880010208000020160000800388003811800211091010800001000000505951600035800330108003980039800398003980039
80024800386000120492580010108000010800005064000018001980038800386998637001880010208000020160000800388003811800211091010800001001300502051600055800330108003980039800398003980039
80024800386000001792580010108000010800005064000018001980038800386998637001880010208000020160000800388003811800211091010800001000000502031600053800330108003980039800398003980039
80024800386000007142580010108000010800005064000008001980038800386998637001880010208000020160000800388003811800211091010800001000000502051600045800330108003980039800398003980039
8002480038599000492580010108000010800005064000018001980038800386998637001880010208000020160000800388003821800211091010800001000000502071600573800330108003980039800398003980039
8002480038599029188492580010108000010800005064000018001980038800386998637001880010208000020160000800388003811800211091010800001001000502051600055800330108003980039800398003980039
8002480038600000492580010108000010800005064000018001980038800386998637001880010208000020160000800388003811800211091010800001000000502051600035800330108003980039800398003980039
80024800386440001812580010108000010800005064000018001980038800386998637001880010208000020160000800388003811800211091010800001000000502051600055800330108003980039800398003980039