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

FCCMPE (scalar, D)

Test 1: uops

Code:

  fccmpe 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)031e3f4e51schedule 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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0f5f6f7f8fd
1004203715061937251000100010006898402018208420371788318951000100030002037203711100110001000007311611196920382038203820382038
10042037151261937251000100010006898412018203720371788318951000100030002037203711100110001000007311611196920382038203820382038
1004203715061937251000100010006898402018203720371788318951000100030002037203711100110001000007311611196920382038203820382038
1004203715061937251000100010006898402018203720371788318951000100030002037203711100110001000007311611196920382038203820382038
1004203715061937251000100010006898412018203720371788318951000100030002037203711100110001000007311611196920382038203820382038
1004203715061937251000100010006898412054203720371788318951000100030002037203711100110001000007311611196920382038203820382038
1004203715061937251000100010006898412018203720371788318951000100030002037203711100110001000007311611196920382038208520382038
1004203715361937251000100010006898402018203720371788318951000100030002037203711100110001000107311611196920382038203820382038
1004203715061937251000100010006898412018203720371788318951000100030002037203711100110001000007311611196920382038203820382038
1004203715061937251000100010006898412018203720371788318951000100030002037203711100110001000007311611196920382038203820382038

Test 2: Latency 3->1

Chain cycles: 2

Code:

  fccmpe 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)0309l2 tlb miss data (0b)18191e1f3f4e51schedule 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 access (a0)l1d cache writeback (a8)a9acc2branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
20204400373002000006139822252010010020000100200005002853880140018400374003737316337495201002002000020060000400374003711202011009910010020000201000000000131022611399090100001004003840038400384003840038
20204400373000000006139822252010010020000100200005002853880140018400374003737316337495201002002000020060000400374003711202011009910010020000201000000000131011611399090100001004003840038400384003840038
20204400373000000006139822252010010020000100200005002853880140018400374003737316337495201002002000020060000400374003711202011009910010020000201000000000131011611399090100001004003840038400384003840038
20204400373000000006139822252010010020000100200005002853880140018400374003737316337495201002002000020060000400374003711202011009910010020000201000000000131011611399090100001004003840038400384003840038
2020440037300000000156398222520100100200001002000050028538801400184003740037373161137495201002002000020060000400374003711202011009910010020000201000000000131011611399090100001004003840038400384003840038
20204400372990000006139822252010010020000100200005002853880140018400374003737316337495201002002000020060000400374003711202011009910010020000201001000000131011611399090100001004003840038400384003840038
20204400373000000006139822252010010020000100200005002853880140018400374003737316337495201002002000020060000400374003711202011009910010020000201000000000131011611399090100001004003840038400384003840038
20204400373000000006139822252010010020000100200005002853880140018400374003737316337495201002002000020060000400374003711202011009910010020000201000000000131011611399090100001004003840038400384003840038
20204400373000000006139822252010010020000100200005002853880140018400374003737316337495201002002000020060000400374003711202011009910010020000201000000000131011611399090100001004003840038400384003840038
202044003730000000025139822252010010020000100200005002853880140018400374003737316337495201002002000020060000400374003711202011009910010020000201000000000131011611399098100001004003840038400384003840038

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)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)191e1f3a3f4e51schedule 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)5f60696d6emap 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)acc2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
20024400373000000000061398222520010102000010200005028538800040018400374003737338337517200102020000206000040037400371120021109101020000200100130012704164339910010000104003840038400384003840038
200244003729900000330061398222520010102000010200005028538800040018400374003737338337517200102020000206000040037400371120021109101020000200100000012704174539910010000104003840038400384003840038
200244003730000010000103398222520010102000010200005028538800040018400374003737338337517200102020000206000040037400371120021109101020000200100000012703163439910010000104003840038400384003840038
20024400372990000000061398222520010102000010200005028538800040018400374003737338337517200102020000206000040037400371120021109101020000200100000012704164339910010000104003840038400384003840038
20024400373000000000061398222520010102000010200005028538800040018400374003737338337517200102020000206000040037400371120021109101020000200100000012703163439910010000104003840038400384003840085
20024400373000100000061398222520010102000010200005028538800040018400374003737338337517200102020000206000040037400371120021109101020000200100000012704164339910010000104003840038400384003840038
20024400373000000000061398222520010102000010200005028538800140018400374003737338337517200102420000206171341228400851120021109101020000200100000012703163439910010000104003840038400384003840038
20024400373000000000061398222520010102000010200005028538800040018400374003737338337517200102020000206000040037400371120021109101020000200100000012703163439910010000104003840038400384003840038
200244003730000000000459398222520010102000010200005028538800040018400374003737338337517200102020000206000040037400371120021109101020000200100000012704163339910010000104003840038400384003840038
20024400373010000000061398222520010102000010200005028538800040018400374003737338337517200102020000206000040037400371120021109101020000200100000012704163439910010000104003840038400384003840038

Test 3: Latency 3->2

Chain cycles: 2

Code:

  fccmpe 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)03mmu table walk data (08)18191e1f3f4e51schedule 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)l1d cache writeback (a8)a9acc2cfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
20204400373000000061398222520100100200001002000050028538801040018400374003737316337495201002002000020060000400374003711202011009910010020000201000000013100011611399090100001004003840038400384003840038
20204400843000010061398222520100100200001002000050028538801040018400374003737316337495201002002000020060000400374003711202011009910010020000201000000013100011611399090100001004003840038400384003840038
2020440037299000276061398222520100100200001002000050028538800040018400374003737316337495201902002000020060000400374003711202011009910010020000201000000013100011611399090100001004003840038400714003840038
20204400373000102760390398222520100100200001002000050028538800040018400374003737316337495201002002000020060000400374017911202011009910010020000201000000013100022611399090100001004003840038400384003840038
20204400373000000061398222520100100200001002000050028538800040018400374003737316337495201002002000020060000400374003711202011009910010020000201000000013100011611399090100001004003840038400384003840038
2020440037300000102061398222520122100200001002000050028538801040018400374003737316337495201002002009120060000400374003711202011009910010020000201000000013100011611399090100001004003840038400384003840038
20204400373000000061398222520100100200001002000050028538800040018400374003737316337495201002002000020060000400374003711202011009910010020000201000000013100011611399090100001004003840038400384003840038
20204400372990000061398222520118106200001002000050028543710040018400374003737316337495201002002000020060000400374003711202011009910010020000201000000013100011611399090100001004003840038400384003840038
20204400373000000061398222520100100200001002000050028538800040018400374003737316337495201002002000020060291400374003711202011009910010020000201000000013100011611399090100001004003840038400384003840038
20204400373000000061398222520100100200001002000050028538801040018400374003737316337522201002002009720060000400374003721202011009910010020000201000000013100011611399090100001004003840038400384003840038

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)09l2 tlb miss data (0b)18191e1f3f4e51schedule 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 access (a0)l1d tlb miss (a1)st unit uop (a7)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
2002440037299020002910726398222520010102000010200005028538800400184003740037373383375172001020200002060000400374003711200211091010200002001000000012701161139910010000104003840038400384003840038
2002440037299000000061398222520010102000010200005028538800400184003740037373383375172001020200002060000400374003711200211091010200002001000000012701161139910010000104003840038400384003840038
2002440037299000000061398222520010102000010200005028538801400184003740037373383375172001020200002060000400374003711200211091010200002001000000012701161139910010000104003840038400384003840038
2002440037300000000061398222520010102000010200005028538801400184003740037373383375172001020200002060000400374003711200211091010200002001000000012701161139910010000104003840038400384003840038
20024400373000000000726398222520010102000010200005028538800400184003740037373383375172001020203722060000400374003711200211091010200002001000000312861161139910010000104003840038400384003840038
20024400373000000012061398222520010102000010200805028538800400184003740037373383375172001020200002060000400374003711200211091010200002001000000012701161139910010000104003840038400384003840038
20024400373000000000916398222520010102000010200005028538800400184003740037373383375172001020200002060000400374003711200211091010200002001000000012701161139910010000104003840038400384003840038
2002440037300000000061398222520010102000010200005028538800400184003740037373383375172001020200002060000400374003711200211091010200002001000000012701161139910010000104003840038400384003840038
2002440037300000000061398222520010102000010200005028538800400184003740037373383375172001020200002060000400374003711200211091010200002001000000012701161239910010000104003840038400384003840038
2002440037300000000061398222520010102000010200005028538800400184003740037373383375172001020200912060000400374003711200211091010200002001000000012701161139910010000104003840038400384003840038

Test 4: Latency 3->3

Code:

  fccmpe 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)1e3a3f4e51schedule 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 cache writeback (a8)acbranch cond mispred nonspec (c5)cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020420037150000536993725102002001000020010000110070798412001820037200371863831874510200200100002003000020037200371110201100991001000010000000710031633199691001002003820038200382003820038
102042003715000071993725102002001000020010000110070798412001820037200371863831874510200200100002003000020037200371110201100991001000010000900710031633199691001002003820038200382003820038
102042022815000061993725102002001000020010000110070798412001820037200371863831874510200200100002003000020037200371110201100991001000010000000710031633199691001002003820038200382003820038
1020420037150000985993725102002001000020010000110070798412001820037200371863831874510200200100002003000020037200371110201100991001000010000030710031633199691001002003820038200382003820038
102042003715000061993725102002001000020010000110070798402001820037200371863831874510200200100002003000020037200371110201100991001000010000130712031633199691001002003820038200382003820038
10204200371500006199372510200200100002001000011007079840200182003720037186383187451020020010000200300002003720037111020110099100100001000001200712031643199691001002003820038200382003820038
1020420037150000346993725102002001000020010000110070798402001820037200371863831874510200200100002003000020037200371110201100991001000010000230710131633199691001002003820038200382003820038
102042003715000161993725102002001000020010000110070798402001820037200371863831874510200200100002003000020037200372110201100991001000010000000710131633199691001002003820038200382003820038
102042003715000061993725102002001000020010000110070798412001820037200371863831874510200200100002003000020037200371110201100991001000010000130710131633199691001002003820038200382003820038
102042003715000061993725102002001000020010000110070798412001820037200371863831874510200200100002003000020037200371110201100991001000010000130710131633199691001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

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)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)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100242003715000000000089993725100202010000201000011070798412001820037200371866031876710020201000020300002003720037111002110910100001000000000000640416531996910102003820038200382003820038
1002420037156000100088020799372510020201000020100001107079841200182003720037186603187671002020100002030000200372003711100211091010000100000000009580640316331996910102003820038200382003820038
100242003715500000000038298421171008024100602010220107707919120198202742027618759201892810240201028620310262027120274611002110910100001000042201044750684756462015710102027420275202752027620275
1002420277157011155660440212079937251002020100002010000110707984120018200372003718660211876710020201005920310442003720367711002110910100001000020000455380640416331996910102027420276200382022720275
1002420274157001055936616022059785152101162010084221035211970788002001820037200371866031876710020201000020300002003720037111002110910100001000002001000640416431996910102003820038200382003820038
1002420037155000000000991993725100202010000201000011070798412001820037200371866031876710020201000020300002003720037111002110910100001000000000260683541632007710102003820038200382003820038
100242003715500000000089993725100342010000201000011070798412001820037200371866031876710020201000020300002003720037111002110910100001000000000000688641462007710102013220133201792013320132
100242013016101113340826405759869781005620100362010044108707958120126202262022418678211889610198201011520305072022520227511002110910100001000022210436600640416331996910102003820038200382003820038
1002420037150000000000145993725100202010000201008811070798412001820037200371866031876710020201000020300002003720037111002110910100001000000000000640416331996910102003820038200382003820038
10024200371550000000008298231361008220100722210264130707906120198202742031918767261895810240201033820310262031720274711002110910100001000000001000640316341996910102003820038200382003820038

Test 5: throughput

Count: 8

Code:

  ands xzr, xzr, xzr
  fccmpe d0, d1, #0, lt
  ands xzr, xzr, xzr
  fccmpe d0, d1, #0, lt
  ands xzr, xzr, xzr
  fccmpe d0, d1, #0, lt
  ands xzr, xzr, xzr
  fccmpe d0, d1, #0, lt
  ands xzr, xzr, xzr
  fccmpe d0, d1, #0, lt
  ands xzr, xzr, xzr
  fccmpe d0, d1, #0, lt
  ands xzr, xzr, xzr
  fccmpe d0, d1, #0, lt
  ands xzr, xzr, xzr
  fccmpe 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)0318191e3f51schedule 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)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
160204800425990005225160100801008000080100800004005008800001800228004180041599643599991601008020080000200240000800418004111160201100991008010080000801000000101101161180035800001008004280042800428004280042
160204800415990005225160100801008000080100800004005008800001800228004180041599643599991601008020080000200240000800418004111160201100991008010080000801000000101101161180035800001008004280042800428004280042
160204800415990005297160100801008000080100800004005008800000800228004180041599643599991601008020080000200240000800418004111160201100991008010080000801000000101101161180035800001008004280042800428004280042
160204800416000005225160100801008000080100800004005008800001800228004180041599643599991601008020080000200240000800418004111160201100991008010080000801000000101101161180035800001008004280042800428004280042
160204800415990005225160100801008000080100800004005008800001800228004180041599643599991601008020080000200240000800418004111160201100991008010080000801000000101101161180035800001008004280042800428004280042
160204800416000005225160100801008000080100800004005008800001800228004180041599643599991601008020080000200240000800418004111160201100991008010080000801000000101101161180035800001008004280042800428004280042
160204800415990005225160100801008000080100800004005008800001800228004180041599643599991601008020080000200240000800418004111160201100991008010080000801000000101101161180035800001008004280042800428004280042
160204800416000005225160100801008000080100800004005008800001800228004180041599643599991601008020080000200240000800418004111160201100991008010080000801000000101101161180035800001008004280042800428004280042
160204800415990005225160100801008000080100800004005008800001800228004180041599643599991601008020080000200240000800418004111160201100991008010080000801000000101101161180035800001008004280042800428004280042
160204800416000005225160100801008000080100800004005008800001800228004180041599643599991601008020080000200240000800418004111160201100991008010080000801000000101101161180035800001008004280042800428007980042

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)0918191e1f3a3f51schedule 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)5f60696d6emap 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)l1d cache writeback (a8)accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaeb? int retires (ef)f5f6f7f8fd
16002480042599000000029725160010800108000080010800004000508800001180022800418004159986360020160010800208000020240000800418004111160021109108001080000800100001002231136172119880036800001511108004280042800428004280042
1600248004159900000005725160010800108000080050800004000508800001180022800418004159986360020160010800208000020240000800418004111160021109108001080000800100001002231161721110980036800001511108004280042800428004280042
16002480041600010000078361600108001080000800108000040005088000011800228004180041599863600201600108002080000202400008007780041111600211091080010800008001000010022611871722271280036800001511108004280042800428004280042
16002480041599000000184251600108001080000800108000040005088000001800228004180041599863600201600108002080000202400008004180041111600211091080010800008001000910022311917211113680036800001522108004280042800428004280042
1600248004159900000006325160010800108000080010800004000508800000180022800418004159986360020160010800208000020240000800928009311160021109108001080000800100131007062171721912680036800001522108004280042800428004280042
160024800415990000144352057251600108001080000800108000040005088000011800228004180041599863600201600108002080000202400008004180041111600211091080010800008001000010022311817219151480036800001511108004280042800428004280042
1600248004159901126280032425160010800108000080010800004000508800001180022800418004159986360020160010800208000020240000800418004111160021109108001080000800100001002261181721913980036800001511108004280042800428004280042
160024800415990001959811135251600108001080000800108002840005088028811800228004180041599863600201600108002080000202400008004180041111600211091080010800008001000010022311101721912680036800001511108004280042800428004280042
16002480041600000000018152516001080010800008001080000400050880000118002280041800415998636002016001080020800002024000080041800411116002110910800108000080010000100223119172196780036800003022108004280042800428004280042
16002480041600000000057251600108001080000800108000040005088000011800228004180041599863600201600108002080000202400008004180041111600211091080010800008001000010022611717411312980036800001511108004280042800428004280042