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

FCCMP (scalar, S)

Test 1: uops

Code:

  fccmp s0, s1, #0, lt
  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)03091e3f4e51schedule 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)9fl1d tlb access (a0)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0f5f6f7f8fd
100420371500619372510001000100068984120182037203717883189510001000300020372037111001100010000007311611196920382038203820382038
100420371500829372510001000100068984120182037203717883189510001000300020372037111001100010000007311611196920382038203820382038
100420371500619372510001000100068984020182037203717883189510001000300020372037111001100010000007311611196920382038203820382038
100420371500619372510001000100068984120182037203717883189510001000300020372037111001100010000007311611196920382038203820382038
100420371500619372510001000100068984120182037203717883189510001000300020372037111001100010000007311611196920382038203820382038
1004203715001059372510001000100068984020182037203717883189510001000300020372037111001100010000237311611196920382038203820382038
100420371500619372510001000100068984120182037203717883189510001000300020372037111001100010000007311611196920382038203820382038
100420371500619372510001000100068984020182037203717883189510001000300020372037111001100010000007311611196920382038203820382038
1004203715002129372510001000100068984020182037203717883189510001000300020372037111001100010000007311611196920382038203820382038
100420371500619372510001000100068984120182037203717883189510001000300020372037111001100010000007311611196920382038203820382038

Test 2: Latency 3->1

Chain cycles: 2

Code:

  fccmp s0, s1, #0, lt
  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)0318191e3f4e51schedule 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 mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
2020440037300000726398222520100100200001002000050028538801400184003740037373163374952010020020000200600004003740037112020110099100100200002010063013101161139909100001004003840038400384003840038
202044003730000061398222520100100200001002000050028538800400184003740037373163374952010020020000200600004003740037112020110099100100200002010000013101161139909100001004003840038400384003840038
202044003730000061398222520100100200001002000050028538800400184003740037373163374952010020020000200600004003740037112020110099100100200002010000013101161139909100001004003840038400384003840038
202044003730000061398222520100100200001002000050028538800400184003740037373163374952010020020000200600004003740037112020110099100100200002010000013101161139909100001004003840038400384003840038
202044003729900061397502520100100200001002000050028538800400184003740037373163374952010020020000200600004003740037112020110099100100200002010000013101161139909100001004003840038400384003840038
2020440037299000346398222520100100200001002000050028538800400184003740037373163374952010020020000200600004003740037112020110099100100200002010000013101161139909100001004003840038400384003840038
20204400373000006278398222520100100200001002000050028543680400184003740037373163374952010020020000200600004003740037112020110099100100200002010000013101161139909100001004003840038400384003840038
202044003729900061398222520100100200001002000050028538800400184003740037373163374952010020020000200600004003740037112020110099100100200002010000013101161139909100001004003840038400384003840038
202044003730000061398222520100100200001002000050028538800400184003740037373163374952010020020000200600004003740037112020110099100100200002010000013101161139909100001004003840038400384003840038
202044003730000661398042520100100200001002000050028538800400184003740037373163374952010020020000200600004003740037112020110099100100200002010030013101161139909100001004003840038400384003840038

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)09191e3f4e51schedule 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)6061696d6emap 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)l1d cache writeback (a8)accfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
2002440037299020061398222520010102000010200005028538800440018400374003737338337517200102020000206000040037400371120021109101020000200100000127040416223991010000104003840038400384003840038
2002440037300000061398222520010102000010200005028538801440018400374003737338337517200102020000206000040037400371120021109101020000200100030127044316343991010000104003840038400384003840038
2002440037300000061398222520010102000010200005028538800440018400374003737338337517200102020000206000040037400371120021109101020000200100000127004216223991010000104003840038400384003840038
2002440037300000061398222520010102000010200005028538801040018400374003737338337517200102020000206000040037400371120021109101020000200100040127004316323991010000104003840038400384003840038
2002440037300000061398222520010102000010200005028538801440018400374003737338337517200102020000206000040037400371120021109101020000200100000127004416443991010000104003840038400384003840038
2002440037300000061398222520010102000010200005028538801040018400374003737338337517200102020000206000040037400371120021109101020000200100000127004316433991010000104003840038400384003840038
2002440037300000061398222520010102000010200005028538800440018400374003737338337517200102020000206000040037400371120021109101020000200100000127004316243991010000104003840038400384003840038
20024400373000000251398222520010102000010200005028538800440018400374003737338337517200102020000206000040037400371120021109101020000200100000127040316433991010000104003840038400384003840038
2002440037300000061398222520010102000010200005028538801440018400374003737338337517200102020000206000040037400371120021109101020000200100040127004216323991010000104003840038400384003840038
2002440037300000061398222520010102000010200005028538801040018400374003737338337517200102020000206000040037400371120021109101020000200100000127044216233991010000104003840038400384003840038

Test 3: Latency 3->2

Chain cycles: 2

Code:

  fccmp s0, s1, #0, lt
  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)9faccfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
20204400373000613982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100013101161139909100001004003840038400384003840038
20204400372990613982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100013101161139909100001004003840038400384003840038
20204400372990613982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400372120201100991001002000020100013101161139909100001004003840038400384003840038
202044003729907263982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100013101161139909100001004003840038400384003840038
20204400372990613982225201001002000010020000500285388004001840037400373731633749520100200201052006000040037400371120201100991001002000020100013101161139909100001004003840038400384003840038
20204400373000613982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100013101161139909100001004003840038400384003840038
20204400372990613982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100013101161139909100001004003840038400384003840038
202044003730007263982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100013101161139909100001004003840038400384003840038
20204400373000613982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100013101161139909100001004003840038400384003840038
20204400372990613982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100013101161139909100001004003840038400384003840038

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)9fl1d cache writeback (a8)acbranch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
200244003730006139822252001010200001020000502853880140018400374003737361337517200102020000206000040037400371120021109101020000200100001270216323991010000104003840038400384003840038
200244003729906139822252001010200001020000502853880140018400374003737338337517200102020000206000040037400371120021109101020000200100001270316433991010000104003840038400384003840038
2002440037299072639822252001010200001020000502853880140018400374003737338337517200102020000206000040037400371120021109101020000200100001270316233991010000104003840038400384003840038
2002440037300094339822252001010200001020000502853880140018400374003737338337517200102020000206000040037400371120021109101020000200100001270416443991010000104003840038400384003840038
200244003730006139822252001010200001020000502853880140018400374003737338337517200102020000206000040037400371120021109101020000200100001270216413991010000104003840038400384003840038
200244003730006139822252001010200001020000502853880140018400374003737338337517200102020000206000040037400371120021109101020000200100001270216113991010000104003840038400384003840038
200244003730006139822252001010200001020000502854368140018400374003737338337517200102020000206000040037400371120021109101020000200100001270316333991010000104003840038400384003840038
200244003730006139822252001010200001020000502853880140018400374003737338337517200102020000206000040037400371120021109101020000200100001270416443991010000104003840038400384003840038
2002440037300072639822252001010200001020000502853880040018400374003737338337517200102020000206000040037400371120021109101020000200100001270216223991010000104003840038400384003840038
200244003729906139822252001010200001020000502853880140018400374003737338337517200102020000206000040037400371120021109101020000200100001270116223991010000104003840038400384003840038

Test 4: Latency 3->3

Code:

  fccmp s0, s1, #0, lt
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4

(non-fused SUB/CBNZ loop)

100 unrolls and 100 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3a3f4e51schedule 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 int alu (97)inst simd alu (9a)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2branch cond mispred nonspec (c5)cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102042003714900000006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710121622199691001002003820038200382003820038
102042003715000000006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710131622199691001002003820038200382003820038
102042003715000000006199372510200200100002001000011007079840200182003720037186383187451020020010000200300002003720037111020110099100100001000000020000710121622199691001002003820038200382003820038
102042003715000000006199372510200200100002001000011007079840200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710121622199691001002003820038200382003820038
102042003715000000006199182510200200100002001000011007079840200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710131622199691001002003820038200382003820038
1020420037150000000072699372510200200100002001000011007079840200182003720037186383187451020020010000200300002003720037111020110099100100001000000000001710131622199691001002003820038200382003820038
102042003715000000006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710121622199691001002003820038200382003820038
102042003715000000006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000712121622199691001002003820038200382003820038
102042003715000000006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710131622199691001002003820038200382003820038
102042003715000000006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710121622199691001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)03l2 tlb miss data (0b)1e3f4e51schedule 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 int alu (97)inst simd alu (9a)9fl1d tlb access (a0)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002420037150006199372510020201000020100001107079840200180200372003718660318767100202010000203000020037200371110021109101000010000000640516451996910102003820038200382003820038
1002420037156006199372510020201000020100001107079840200180200372003718660318767100202010000203000020037200371110021109101000010000000640416451996910102003820038200382003820038
1002420037150006199182510020201000020100441107079840200180200372003718660318767100202010000203000020037200371110021109101000010000000640616451996910102003820038200382003820038
1002420037150006199372510020201000020100001107079840200180200372003718660318767100202010000203000020037200371110021109101000010000000640416441996910102003820038200382003820038
1002420037150006199372510020201000020100001107079840200180200372013218660318767100202010000203000020037200371110021109101000010000000640816451996910102003820038200382003820038
1002420037150006199372510020201000020100001107079840200180200372003718660318767100202010000203000020037200371110021109101000010000000640716641996910102003820038200382003820038
1002420037150006199372510020201000020100001107079840200180200372003718660318767100202010000203000020037200371110021109101000010000000640816441996910102003820038200382003820038
1002420037150006199372510020201000020100001107079840200180200372003718660318767100202010000203000020037200371110021109101000010000000640616451996910102003820038200382003820038
1002420037150033201199372510020201000020100001107079840200180200372003718660318767100202010000203000020037200371110021109101000010000003640616541996910102003820038200382003820038
1002420037150006199372510020201000020100001107079840200180200372003718660318767100202010000203000020037200371110021109101000010000000640716441996910102003820038200382003820038

Test 5: throughput

Count: 8

Code:

  ands xzr, xzr, xzr
  fccmp s0, s1, #0, lt
  ands xzr, xzr, xzr
  fccmp s0, s1, #0, lt
  ands xzr, xzr, xzr
  fccmp s0, s1, #0, lt
  ands xzr, xzr, xzr
  fccmp s0, s1, #0, lt
  ands xzr, xzr, xzr
  fccmp s0, s1, #0, lt
  ands xzr, xzr, xzr
  fccmp s0, s1, #0, lt
  ands xzr, xzr, xzr
  fccmp s0, s1, #0, lt
  ands xzr, xzr, xzr
  fccmp s0, s1, #0, lt
  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)031e3f51schedule 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)9fl1d cache writeback (a8)accdcfd5map dispatch bubble (d6)daddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
16020480044599052251601008010080000801008000040050088000008002208004180041599643599991601008020080000200240000800418004111160201100991008010080000801000001011011601180035800001008004280042800428004280042
160204800415990717251601008010080000801008000040050088000018002208004180041599643599991601008020080000200240000800418004111160201100991008010080000801000001011011601180035800001008004280042800428004280042
160204800415990717251601008010080000801008000040050088000018002208004180041599643599991601008020080000200240000800418004111160201100991008010080000801000001011011601180035800001008004280042800428004280042
16020480041599052251601008010080000801008000040050088000018002208004180041599643599991601008020080000200240000800418004111160201100991008010080000801000001011011601180035800001008004280042800428004280042
16020480041600052251601008010080000801008000040050088000018002208004180041599643599991601008020080000200240000800418004111160201100991008010080000801000001011011601180035800001008004280042800428004280042
16020480041599052251601008010080000801008000040050088000018017908004180041599643599991601008020080000200240000800418004111160201100991008010080000801000001011011601180035800001008004280042800428004280042
16020480041600052251601008010080000801008000040050088000018002208004180041599643599991601008020080000200240000800418004111160201100991008010080000801000001011011601180035800001008004280042800428004280042
16020480041599052251601008010080000801008000040050088000018002208004180041599643599991601008020080000200240000800418004111160201100991008010080000801000001011011601180035800001008004280042800428004280042
1602048004160061852251601008010080000801008000040050088000018002208004180041599643599991601008020080000200240000800418004111160201100991008010080000801000001011011601180035800001008004280042800428004280042
16020480041600052251601008010080000801008000040050088000018002208004180041599643599991601008020080000200240000800418004111160201100991008010080000801000011011011601180035800001008004280042800428004280042

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)18191e3f51schedule 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)5f6061696d6emap 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 mispred nonspec (cb)cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaeb? int retires (ef)f5f6f7f8fd
16002480042600000078251600108001080000800108000040005086445311580022800418004159986360020160010800208000020240000800418004111160021109108001080000800106830100228211017211111180074800001511108004280042800428004280042
1600248004160000005725160010800108000080159800004000508800001158002280041800415998636002016001080020800002024011480093800911116002110910800108000080010910010022811101722113880036800003011108004280042800428004280042
1600248004159900005725160010800108000080010800004000508800001158002280041800415998636002016001080020800002024000080041800411116002110910800108000080010090100228218172119980036800001511108004280042800428004280042
1600248004160000005725160010800108000080010800004000508800001158002280041800415998636002016001080020800002024000080041800411116002110910800108000080010013501002211219172119980036800001511108004280042800428004280042
1600248004160000004940251600108001080000800108000040005088000011580022800418004159986360020160010800208000020240000800418004111160021109108001080000800100120100221121121741110980036800001511108004280042800428004280042
160024800416000000532251600108001080000800108000040005088000011580022800418004159986360020160010800208000020240000800418004111160021109108001080000800101766010022822121721212980036800001523108004280042800428004280042
1600248004159900005725160010800108000080159800004000508800001058002280041800415998636002016001080020800002024000080041800411116002110910800108000080010890010022821917211101180036800001511108004280042800428004280042
160024800416000000553251600108001080000800108000040005088000011580022800418004159986360020160010800208000020240000800418004111160021109108001080000800100001002482191721116880036800001511108004280042800428004280042
160024800415990000572516001080010800008001080000400050880000115800228004180041599861260020160010800208000020240000800418004111160021109108001080000800100601002281191721110980036800001511108004280042800428004280042
16002480041600000057251600108001080000800108000040005088000011580022800418004159986360020160010800208000020240000800418004111160021109108001080000800100001002232110172119880036800001511108004280042800428004280042