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, D)

Test 1: uops

Code:

  fccmp d0, d1, #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)03l2 tlb miss data (0b)1f3f4e51schedule uop (52)schedule simd uop (54)dispatch simd uop (57)ldst uops in schedulers (5b)696d6emap 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)9fst unit uop (a7)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0f5f6f7f8fd
100420371600619372510001000100068984201820372037178831895100010003000203720371110011000100000007311611196920382038203820382038
100420371600619372510001000100068984201820372037178831895100010003000203720371110011000100000007311611196920382038203820382038
100420371500619372510001000100068984201820372037178831895100010003000203720371110011000100000007311611196920382038203820382038
100420371500619372510001000100068984201820372037178831895100010003000203720371110011000100000007311611196920382038203820382038
100420371600619372510001000100068984201820372037178831895100010003000203720371110011000100000007311611196920382038203820382038
100420371500619372510001000100068984201820372037178831895100010003000203720371110011000100000007311611196920382038203820382038
100420371510619372510001000100068984201820372037178831895100010003000203720371110011000100000007311611196920382038203820382038
100420371500619372510001000100068984201820372037178831895100010003000203720371110011000100000007311611196920382038203820382038
100420371500619372510001000100068984201820372037178831895100010003000203720371110011000100000007311611196920382038203820382038
10042037150108619372510001000100068984201820372037178831895100010003000203720371110011000100000007311611196920382038203820382038

Test 2: Latency 3->1

Chain cycles: 2

Code:

  fccmp d0, d1, #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)0318191e1f3f4e51schedule 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)696d6emap 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)a9acc2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
2020440037299007170613982225201001002000010020000500285388040018400374003737316337495201002002000020060000400374003711202011009910010020000201000030000131011611400540100001004003840086400864003840038
20204400372990000613982225201001002000010020000500285388040018400374003737316337495201002002000020060000400374003711202011009910010020000201000000300131011611400510100001004003840038400384003840038
20204400373000030881033982225201001002000010020000500285388040018400374003737316337495201002002000020060000402284003711202011009910010020000201000000000131011611399090100001004003840038401354003840038
202044003730000390613982225201001002000010020000500285388040018400374003737316337495201002002000020060000400374003711202011009910010020000201000000000131011611399090100001004003840038400384003840038
202044003730000690613982225201001002000010020000500285388040018400374003737316337495201002002000020060000400374003711202011009910010020000201000000000131011611399090100001004003840038400384003840038
202044003730000600613982225201001002000010020000500285388040018400374003737316337495201002002000020060000400374003711202011009910010020000201000000000131011611399090100001004003840038400384003840038
202044003730000540613982225201001002000010020000500285388040018400374003737316337495201002002000020060000400374003711202011009910010020000201000000000131011611399090100001004003840038400384003840038
202044003730000120823982225201001002000010020000500285388040018400374003737316337495201002002000020060000400374003711202011009910010020000201000230000136111611399090100001004003840038400384003840038
20204400373000000613982225201001002000010020000500285388040018400374003737316337495204452002000020060000400374003711202011009910010020000201000000000131011611399090100001004003840038402274003840038
202044003729900006733982225201001002000010020000500285388040018400374003737316337495201002002000020060000400374003711202011009910010020000201000000000131011611399090100001004003840038400384003840038

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l2 tlb miss instruction (0a)181e1f3f4e51schedule 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
2002440037300003061398222520010102000010200005028538801400184003740037373383375172001020200002060000400374003711200211091010200002001000012701161139910010000104003840038400384003840038
2002440037300000061398222520010102000010200005028538800400184018040037373383375172001020200002060000400374003711200211091010200002001000012701161139910010000104003840038400384003840038
2002440037299000061398222520049102000010200005028538801400184003740037373383375172001020200002060000400374003711200211091010200002001000012701161139910010000104003840038400384003840038
20024400373000012061398222520010102000010200005028538800400184003740037373383375172001020200002060000400374008421200211091010200002001000012701161139910010000104003840038400384003840038
2002440037300000061398222520010102000010200005028538801400184003740037373383375172001020200002060000400374003711200211091010200002001000012701161139910010000104003840038400384003840038
20024400373000021061398222520010102000010200005028538801400184003740037373383375172001020200002060000400374003711200211091010200002001000012701161139910010000104003840038400384003840038
2002440037299000061398222520010102000010200005028538801400184003740037373383375172001020200002060000400374003711200211091010200002001000012701161139910010000104003840038400384008540038
20024400373000000613982225200101020000102000050285388014001840037400373733833751720010202000020600004003740037112002110910102000020010001212701161139910010000104003840038400384003840038
200244003729900878861398222520010102000010200005028538800400184003740037373383375172001020200002060000400374003711200211091010200002001000012701162139910010000104003840038400384003840038
2002440037300000061398222520010102000010200005028538801400184003740037373383375172001020200002060000400374003711200211091010200002001000012701161139910010000104003840038400384003840038

Test 3: Latency 3->2

Chain cycles: 2

Code:

  fccmp d0, d1, #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)696b6d6emap 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)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
202044003730006139786252010010020000100200005002853880400180400374003737323637491201002002000820060024400374003711202011009910010020000201000011113170160039919100001004003840038400384003840038
2020440037300015639822252010010020000100200005002853880400180400374003737323637491201002002000820060024400374003711202011009910010020000201000011113170160039919100001004003840038400384003840038
202044003730006139822252010010020000100200005002853880400180400374003737323637491201002002000820060024400374003711202011009910010020000201000011113170160039919100001004003840038400384003840038
202044003730006139822252010010020000100200005002853880400180400374003737323637491201002002000820060024400374003711202011009910010020000201000011113170160039919100001004003840038400384003840038
202044003729906139822252010010020000100200005002853880400180400374003737323637491201002002000820060024400374003711202011009910010020000201000011113170160039919100001004003840038400384003840038
202044003729906139822252010010020000100200005002853880400180400374003737323637491201002002000820060024400374003711202011009910010020000201000011113170160039919100001004003840038400384003840038
2020440037299072639822252010010020000100200005002853880400180400374003737323637491201002002000820060024400374003711202011009910010020000201001011113170160039919100001004003840038400384003840038
202044003730006139822252010010020000100200005002853880400180400374003737323637491201002002000820060024400374003711202011009910010020000201000011113170160039919100001004003840038400384003840038
202044003730006139822252010010020000100200005002853880400180400374003737323637491201002002000820060024400374003711202011009910010020000201000011113170160039919100001004003840038400384003840038
202044003729906139822252010010020000100200005002853880400180400374003737323637491201002002000820060024400374003711202011009910010020000201000011113170160039919100001004003840038400384003840038

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)191e3f4e51schedule 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
2002440037300000613982225200101020000102000050285388004001840037400373733833751720010222000020600004003740037112002110910102000020010001270216223991010000104003840038400384003840038
2002440037300000613982225200101020000102000050285388004001840037400373733833751720090202000020600004003740037112002110910102000020010001270216223991010000104003840038400384003840038
2002440037300000613982225200101020000102000050285388014001840037400373733833751720010202000020600004003740037112002110910102000020010061270216223991010000104003840038400384003840038
2002440037300000613982225200101020000102000050285388004001840037400373733833751720010202000020600004003740037112002110910102000020010001270216223991010000104003840038400384003840038
2002440037300000613982225200101020000102000050285388014001840037400373733833751720010202000020600004003740037112002110910102000020010001270216323991010000104003840038400384003840038
2002440037300100613982225200101020000102000050285388004001840037400373733833751720010202000020600004003740037112002110910102000020010001270216223991010000104003840038400384003840038
2002440037299000613982225200101020000102000050285388004001840037400373733833751720010202000020600004003740037112002110910102000020010001270216233991010000104003840038400384003840038
2002440037299000613982225200101020000102000050285388014001840037400373733833751720010202000020600004003740037112002110910102000020010001270216223991010000104003840038400384003840038
2002440037300000613982225200101020000102000050285388014001840037400373733833751720010202000020600004003740037112002110910102000020010001270216223991010000104003840038400384003840038
2002440037300000613982225200101020000102000050285388014001840037400373733833751720010202000020600004003740037112002110910102000020010001270216223991010000104003840038400384003840038

Test 4: Latency 3->3

Code:

  fccmp d0, d1, #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)st unit uop (a7)l1d cache writeback (a8)a9acc2cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102042003715000000006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710041633199691001002003820038200382003820038
1020420037150000015006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710031633199691001002003820038200382003820038
102042003715000000006199372510200200100002001000011007079840200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710031633199691001002003820038200382003820038
102042003714900000006199372510200200100002001000011007079840200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710031633199691001002003820038200382003820038
102042003715000000006199372510200200100002001000011007079840200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710031633199691001002003820038200382003820038
102042003715000009006199372510200200100002001000011007079840200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710131633199691001002003820038200382003820038
102042003715000000006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710131633199691001002003820038200382003820038
10204200371500000204006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000712131633199691001002003820038200382003820038
102042003715000000006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710131633199691001002003820038200382003820038
102042003715000000006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710131633199691001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 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)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)9faccfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002420037150006199372510020201000020100001107079841200182003720037186603187671002020100002030000200372003711100211091010000100000640224221996910102003820038200382003820038
1002420037150606199372510020201000020100001107079841200182003720037186603187671002020100002030000200372003711100211091010000100000640216221996910102003820038200382003820038
1002420037150006199372510020201000020100001107079841200182003720037186603187671002020100002030000200372003711100211091010000100000640216221996910102003820038200382003820038
10024200371500044199372510020201000020100001107079841200182003720037186603187671002020100002030000200372003711100211091010000100000640216221996910102003820038200382003820038
1002420037150006199372510020201000020100001107079841200182003720037186603187671002020100002030000200372003711100211091010000100000640216221996910102003820038200382003820038
1002420037150006199372510020201000020100001107079841200182003720037186603187671002020100002030000200372003711100211091010000100000640216221996910102003820038200382003820038
1002420037150006199372510020201000020100001107079841200182003720037186603187671002020100002030000200372003711100211091010000100000640216221996910102003820038200382003820038
10024200371492106199372510020201000020100001107079841200182003720037186603187671002020100002030000200372003711100211091010000100000640316221996910102003820038200382003820038
1002420037150006199372510020201000020100001107079841200182003720037186603187671002020100002030000200372003711100211091010000100000640216221996910102003820038200382003820038
1002420037150006199372510020201000020100001107079841200182003720037186603187671002020100002030000200372003711100211091010000100000640216221996910102003820038200382003820038

Test 5: throughput

Count: 8

Code:

  ands xzr, xzr, xzr
  fccmp d0, d1, #0, lt
  ands xzr, xzr, xzr
  fccmp d0, d1, #0, lt
  ands xzr, xzr, xzr
  fccmp d0, d1, #0, lt
  ands xzr, xzr, xzr
  fccmp d0, d1, #0, lt
  ands xzr, xzr, xzr
  fccmp d0, d1, #0, lt
  ands xzr, xzr, xzr
  fccmp d0, d1, #0, lt
  ands xzr, xzr, xzr
  fccmp d0, d1, #0, lt
  ands xzr, xzr, xzr
  fccmp d0, d1, #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)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)696d6emap 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)acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1602048004159900007052516010480104800008010780000400529880000800228004180041599706599931601078020880008200240024800418004111160201100991008010080000801007100111101181160080038800041008004280042800428004280042
1602048004159900007262516010480104800008010780000400529880000800228004180041599706599931601078020880008200240024800418004111160201100991008010080000801000150111101180160080038800041008004280042800428004280042
1602048004159900002320251601008010080000802668000040050088000080022800418004159964359999160100802008000020024000080245801441116020110099100801008000080100030000101101161180035800001008004280042800428004280042
160204800416000000717251601008010080000801008000040050088000080059800418004159964359999160100802008000020024000080041800411116020110099100801008000080100000000101101161180035800001008004280042800428004280042
16020480041599000052251601008010080000801008000040050088000080022800418004159964359999160100802008000020024000080041800411116020110099100801008000080100000000101101161180035800001008004280042800428004280042
16020480041600000052251601008010080000801008000040050088000080022800418004159964359999160100802008000020024000080041800411116020110099100801008000080100000000101101161180035800001008004280042800428004280042
16020480041599000052251601008010080000801008000040050088000080022800418004159964359999160100802008000020024000080041800411116020110099100801008000080100000000101101161180035800001008004280042800428004280042
160204800415990000522516010080100800008010080111400700880000800228004180041599643599991601008020080000200240000800928004111160201100991008010080000801009100000101101161180035800001008004280042800428004280042
160204800415990000522516010080100800008010080000400500880000800228004180041599643599991601808020080000200240000800418004111160201100991008010080000801000150000101101161180035800001008004280042800428004280042
16020480041600000052251601008010080000801008000040050088000080022800418004159964359999160100802008000020024000080041800411116020110099100801008000080100060000101101161180035800001008004280042800428004280042

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)l2 tlb miss data (0b)191e3f51schedule 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)a9acbranch 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
1600248004160000005725160010800108000080010800004000508800000108002280041800415998636002016001080020800002024000080041800411116002110910800108000080010000010024622151721110680036800002015108004280042800428004280042
160024800415990000632516001080010800008001080000400050880000010800228004180041599863600201600108002080000202400008004180041111600211091080010800008001000001002231191721210680036800002015108004280042800428004280042
16002480041599000057251600108001080000800108000040005088000011080022800418004159986360020160010800208000020240000800418004111160021109108001080000800100000100223119172119580036800002015108004280042800428004280042
16002480041600000076225160010800108000080010800004000508800001108002280041800415998636002016001080020800002024000080041800411116002110910800108000080010000010022311101722171180036800004030108004280042800428004280042
1600248004159900007222516001080010800008001080000400050880000110800228004180041599863600201600108002080000202400008004180041111600211091080010800008001000001002231171721171080036800002015108004280042800428004280042
160024800415990000572516001080010800008001080000400050880000110800228004180041599863600201600108002080000202401358004180041111600211091080010800008001000301002231161721161180036800002015108004280042800428004280042
160024800415990000572516001080010800008001080000400050880000110800228004180041599863600201600108002080000202400008004180041111600211091080010800008001000021002231171742261080036800002015108004280042800428004280042
160024800415990000572516001080010800008001080000400050880000110800228004180041599863600201600108002080000202400008004180041111600211091080010800008001000001002231161721171180036800002015108004280042800428004280042
1600248004160000005725160010800108000080010800004000508639901108002280041800415998636002016001080020800002024000080041800411116002110910800108000080010000010022311717211101080036800002015108004280042800428004280042
1600248004159900005725160010800108000080010800004000508800001108002280041800415998636002016001080020800002024000080041800411116002110910800108000080010000010022311111721161180036800002015108004280042800428004280042