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

Test 1: uops

Code:

  fccmp h0, h1, #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)03mmu table walk data (08)1e3f4e51schedule 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
10042037150061937251000100010006898402018203720371788318951000100030002037203711100110001000007311611196920382038203820382038
10042037150082937251000100010006898402018203720371788318951000100030002037203711100110001000007311611196920382038203820382038
100420371500105937251000100010006898402018203720371788318951000100030002037203711100110001000007311611196920382038203820382038
10042037160061937251000100010006898402018203720371788318951000100030002037203711100110001000007311611196920382038203820382038
10042037160061937251000100010006898402018203720371788318951000100030002037203711100110001000007311611196920382038203820382038
10042037150061937251000100010006898402018203720371788318951000100030002037203711100110001000007311611196920382038203820382038
10042037150061937251000100010006898402018203720371788318951000100030002037203711100110001000007311611196920382038203820382038
10042037160061937251000100010006898402018203720371788318951000100030002037203711100110001000007311611196920382038203820382038
10042037150061937251000100010006898402018203720371788318951000100030002037203711100110001000007311611196920382038203820382038
10042037160061937251000100010006898402018203720371788318951000100030002037203711100110001000407311611196920382038203820382038

Test 2: Latency 3->1

Chain cycles: 2

Code:

  fccmp h0, h1, #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)03mmu table walk data (08)l2 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 miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
2020440037300000087090739822252010010020000100200005002853880040018400374003737316337495201002002000020060000400374003711202011009910010020000201000034001310116113994114100001004003840038400384003840038
2020440037300000000613982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100000060131011611399090100001004003840038400384003840038
20204400373000000007263982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100000000131011611399090100001004003840038400384003840038
2020440037300000000613982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100000000131011611399090100001004003840038400384003840038
2020440037299000000613982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100000000131011611399090100001004003840038400384003840038
2020440037300000000613982225201001002000010020000500285388014001840037400373731633749520100200200002006000040037400371120201100991001002000020100001200131011611399090100001004003840038400384003840086
20204400372990000007263982225201001002000010020000500285388014001840037400373731633749520100200200002006000040037400371120201100991001002000020100000000131011611399090100001004003840038400384003840038
2020440037299000000613982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100000000131011611399090100001004003840038400384003840038
2020440037300000000613982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100001001131011611399090100001004003840038400384003840038
2020440037299000000613982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100000000131011611399090100001004003840038400384003840038

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)181e3f4e51schedule 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)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
20024400372990006139822252001010200001020000502853880140018040037400373733833751720010202000020600004003740037112002110910102000020010000012701161139910010000104003840038400384003840038
20024400373000006139822252001010200001020000502853880140018040037400373733833751720010202000020600004003740037112002210910102000020010000912701241139910010000104003840038400384003840038
20024401323011106139822252001010200001320160602853880140018040037400373733833751720090202000020600004008540037112002110910102000020010000013031321139910110000104003840038400384003840038
200244003730000034639822252001010200001020000502853880140018040037400373733833751720010202000020600004003740037112002110910102000020010000012701161139910010000104003840038400384003840038
20024400373000006139822252001010200001020000502853880140018040037400373733833751720010202000020600004003740037112002110910102000020010000012701161139910010000104003840038400384003840038
20024400373000006139822252001010200001020000502853880140018040037400373733833751720010202000020600004003740037112002110910102000020010000012701161139910010000104003840038400384003840038
20024400372990006139822252001010200001020000502853880140018040037400373733833751720010202000020600004003740037112002110910102000020010000312701161139910010000104003840038400384003840038
20024400373000006139822252001010200001020000502853880140018040037400373733833751720010202000020600004003740037112002110910102000020010000012701161139952010000104003840038400384003840038
200244003730000053639822252001010200001020000502853880140018040037400373733833751720010202000020600004003740037112002110910102000020010000012701161139910010000104003840038400384003840038
20024400373000006139822252001010200001020000502853880140018040037400373733833751720010202000020600004003740037112002110910102000020010000012701161139910010000104003840038400384003840038

Test 3: Latency 3->2

Chain cycles: 2

Code:

  fccmp h0, h1, #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)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 branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb miss (a1)l1d cache writeback (a8)branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
20204400373001201033982225201001002001210020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100000131011611399090100001004003840038400384003840038
2020440037300007263982225201001002000010020000500285388014001840037400373731633749520100200200002026000040037400371120201100991001002000020100000131011611399090100001004003840038400384003840038
202044003730000613982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100000131011611399090100001004003840038400384003840038
202044003729900613982225201001002000010020000500285388004001840037400373731633749520100200200002006000040037400371120201100991001002000020100000131011611399090100001004003840038400384003840038
202044003729900613982225201001002000010020000500285388014001840037400373731633749520100200200002006000040037400371120201100991001002000020100000131011611399090100001004003840038400384003840038
202044003729900613982225201001002000010020000500285388014001840037400373731633749520100200200002006000040037400371120201100991001002000020100000131011611399090100001004003840038400384003840038
202044003730000613982225201001002000010020000500285388014001840037400373731633749520100200200002006000040037400371120201100991001002000020100001131011611399090100001004003840038400384003840038
2020440037300005363982225201001002000010020000500285388014001840037400373731633749520100200200002006000040037400371120201100991001002000020100000131011611399096100001004003840038400384003840038
2020440037300006139822252010010020000100200005002853880140018400374003737316337495201002002000020060000400374003711202011009910010020000201000001310116113990920100001004003840038400384003840038
202044003730000613982225201001002000010020000500285388014001840037400373731633749520100200200002006000040037400371120201100991001002000020100000131011611399090100001004003840038400384003840038

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)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 tlb access (a0)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
2002440037300018939822252001010200001020000502853880040018040037400373733833751720010202000020600004003740037112002110910102000020010000012702161139910010000104003840038400384003840038
2002440037300012439822252001010200001020000502853880040018040037400373733833751720010202000020600004003740037112002110910102000020010000012701162139910010000104003840038400384003840038
200244003729906139822252001010200001020000502853880140018040037400373733833751720010202000020600004003740037112002110910102000020010000012701161139910010000104003840038400384003840038
2002440037300019139822252001010200001020000502853880140018040037400373733833751720010202000020600004003740037112002110910102000020010000012701161139910010000104003840038400384003840038
2002440037300035339822252001010200001020000502853880040018040037400373733833751720010202000020600004003740037112002110910102000020010000012701161139910010000104003840038400384003840038
2002440037299041639822252001010200001020000502853880140018040037400373733833751720010202000020600004003740037112002110910102000020010010012701161239910010000104003840038400384003840038
2002440037300024139822252001010200001020000502853880140018040037400373733833751720010202000020600004003740037112002110910102000020010100012701161139910010000104003840038400384003840038
2002440037300046939822252001010200001020000502853880140018040037400373733833751720010202000020600004003740037112002110910102000020010000012701161139910010000104003840038400384003840038
2002440037300023739822252001010200001020000502853880040018040037400373733833751720010202000020600004003740037112002110910102000020010000012701161139910010000104003840038400384003840038
2002440037300027439822252001010200001020000502853880040018040037400373733833751720010202000020600004003740037112002110910102000020010000012701161139910010000104003840038400384003840038

Test 4: Latency 3->3

Code:

  fccmp h0, h1, #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)031e3a3f4e51schedule 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)9faccdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204200371500061993725102002001000020010000110070798402001802003720037186383187451020020010000200300002003720037111020110099100100001000000710141633199691001002003820038200382003820038
10204200371500061993725102002001000020010000110070798412001802003720037186383187451020020010000200300002003720037111020110099100100001000000710131633199691001002003820038200382003820038
10204200371500061993725102002001000020010000110070798412001802003720037186383187451020020010000200300002003720037111020110099100100001000000710131633199691001002003820038200382003820038
10204200371500061993725102002001000020010000110070798402001802003720037186383187451020020010000200300002003720037111020110099100100001000000710131633199691001002003820038200382003820038
10204200371500061993725102002001000020010000110070798402001802003720037186383187451020020010000200300002003720037111020110099100100001000030710131633199691001002003820038200382003820038
102052003715051061993725102002001000020010000110070798402001802003720037186383187451020020010000200300002003720037111020110099100100001000000710131634199691001002003820038200382003820038
10204200371506061993725102002001000020010000110070798402001802003720037186383187451020020010000200300002003720037111020110099100100001000000710131633199691001002003820038200382003820038
10204200371500061993725102002001000020010000110070798402001802003720037186383187451020020010000200300002003720037111020110099100100001000000710131633199691001002003820038200382003820038
102042003715000128993725102002001000020010000110070798402001802003720037186383187451020020010000200300002003720037111020110099100100001000000712131633199691001002003820038200382003820038
10204200371500061993725102002001000020010000110070798402001802003720037186383187451020020010000200300002003720037111020110099100100001000000710131633199691001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)03191e3f4e51schedule 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 mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100242003715000619937251002020100002010000110707984020018200372003718660318767100202010000203000020037200371110021109101000010000400640316331996910102003820038200382003820038
100242003714900849937251002020100002010000110707984120018200372003718660318767100202010000203000020037200371110021109101000010000100640316331996910102003820038200382003820038
1002420037150002329937251002020100002010000110707984020018200372003718660318767100202010000203000020037200371110021109101000010000000640316331996910102003820038200382003820038
100242003715000619937251002020100002010000110707984020018200372003718660318767100202010000203000020037200371110021109101000010000000640316331996910102003820038200382003820038
100242003715000619937251002020100002010000110707984020018200372003718660318767100202010000203000020037200371110021109101000010000000640316331996910102003820038200382003820038
1002420037150001479937251002020100002010000110707984020018200372003718660318767100202010000203000020037200371110021109101000010000000640316331996910102003820038200382003820038
100242003715000619937251002020100002010000110707984020018200372003718660318767100202010000203000020037200371110021109101000010000000640316331996910102003820038200382003820038
100242003715010619937251002020100002010000110707984020018200372003718660318767100202010000203000020037200371110021109101000010000000640316431996910102003820038200382003820038
100242003715000619937251002020100002010000110707984020018200372003718660318767100202010000203000020037200371110021109101000010000000640316431996910102003820038200382003820038
1002420037150081619937251002020100002010000110707984020018200372003718660318767100202010000203000020037200371110021109101000010000060640316331996910102003820038200382003820038

Test 5: throughput

Count: 8

Code:

  ands xzr, xzr, xzr
  fccmp h0, h1, #0, lt
  ands xzr, xzr, xzr
  fccmp h0, h1, #0, lt
  ands xzr, xzr, xzr
  fccmp h0, h1, #0, lt
  ands xzr, xzr, xzr
  fccmp h0, h1, #0, lt
  ands xzr, xzr, xzr
  fccmp h0, h1, #0, lt
  ands xzr, xzr, xzr
  fccmp h0, h1, #0, lt
  ands xzr, xzr, xzr
  fccmp h0, h1, #0, lt
  ands xzr, xzr, xzr
  fccmp h0, h1, #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)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)696d6emap 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 tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2branch mispred nonspec (cb)cfd2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1602048004159900000011262516010080100800008010080000400500880000800228004180041599640359999160100802008000020024000080041800411116020210099100801008000080100000000001011003164380035800001008004280042800428004280042
1602048004159900000021962516010080100800008010080000400804880000800228004180041599640359999160100802008000020024000080041800411116020110099100801008000080100000000001011003163380035800001008004280042800428004280042
16020480041599000000522516010080100800008010080000400500880000800228004180041599640359999160100802008000020024000080041800411116020110099100801008000080100000000001011003164480035800001008004280042800428004280042
1602048004160000000024512516010080100800008010080000400500880000800228004180041599640359999160100802008000020024000080041800411116020110099100801008000080100000000001011004173380035800001008004280042800428004280042
16020480041599000000522516010080100800008010080000400500880000800228004180041599640359999160100802008000020024000080041800411116020110099100801008000080100000000001011003163380035800001008004280042800428004280042
16020480041599000000522516010080100800008010080000400500880000800228004180041599640359999160100802008000020024000080041800411116020110099100801008000080100000000001011003163380035800001008004280042800428004280042
160204800415990000007172516010080100800008010080000400500880000800228004180041599640359999160100802008000020024000080041800411116020110099100801008000080100000000001011003163380035800001008004280042800428004280042
160204800416000000007172516010080100800008010080000400500880000800228004180041599640359999160100802008000020024000080041800411116020110099100801008000080100000000001011003163380035800001008004280078800428004280042
160204800415990000007172516010080100800008010080000400500880000800228004180041599640359999160100802008000020024000080041800411116020110099100801008000080100000000001011003163380035800001008004280042800428004280042
16020480041600000000522516010080100800008010080000400500880000800228004180041599640359999160100802008000020024000080041800411116020110099100801008000080100000000201011003163380035800001008004280042800428004280042

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)mmu table walk data (08)l2 tlb miss instruction (0a)18191e1f3a3f51schedule 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)5f6061696b6d6emap 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)ld unit uop (a6)l1d cache writeback (a8)a9acc2branch cond mispred nonspec (c5)cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaeb? int retires (ef)f5f6f7f8fd
16002480041599000000005437816001080010800008001080000400050880000110800220800418004159986360020160010800208000020240000801428004111160021109108001080000800100000000010024811917411131180036800002030108004280042800428004280042
160024800416000000090026025160010800108000080010800004000508800001158002208004180041599863600201600108002080000202400008004180041111600211091080010800008001000000212600100228411017211121080036800002030108004280042800428004280042
1600248004160000000000189251600108001080000800108000040005088000011580022080041800416005136002016001080020800002024000080192800411116002110910800108000080010000101200100228411017211121080036800002015108004280042800428009380042
160024800416000000000023925160010800108000080010800004000508800001158002208004180041599863600201600108002080000202400008004180041111600211091080010800008001000000000100228411117211101380036800002015108004280042800428004280042
16002480041600000000003142516001080010800008001080000400050880000115800220800418004159986360020160010800208000020240000800418004111160021109108001080000800102221210055201022984113169211201280827807022015108075381109810098100481060
16002480955607312161925891584039963721611748074980480807908055040245085643111580806081060811036027962607011612978079680693202421968105480856211160021109108001080000800104032410235001041684115209211172080792809594329108131080954813078126281363
160024810016091001826330022001489925160010800108000080010800004000508800001158002208004180041599863600201600108002080000202400008004180041111600211091080010800008001000000000100228411417211121380036800002015108004280042800428004280042
16002480041600000000005725160010800108000080010800004000508800001158002208004180041599863600201600108002080000202400008004180041111600211091080010800008001000000000100228411217211141380036800002015108004280042800428004280042
160024800415990000090082925160010800108000080010800004000508800001158002208004180041599863600201600108002080000202400008004180041111600211091080010800008001000000000100228411517211151380036800002015108004280042800428004280042
160024800416000000000021225160010800108000080010800004000508800001158002208004180041599863600201600108002080000202400008004180041111600211091080010800008001000000000100228411117211121580036800002015108004280042800428004280042