Apple M1 Microarchitecture Research by Dougall Johnson

Firestorm: Overview | Base Instructions | SIMD and FP Instructions
Icestorm:  Overview | Base Instructions | SIMD and FP Instructions

FCCMPE (scalar, H)

Test 1: uops

Code:

  fccmpe 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 (01)cycle (02)03081e3f4e51inst issue (52)~issue fp/simd (54)~dispatch fp/simd (57)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op fp/simd (7e)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst neon or fp (9a)9fa0accfd5d6ddinst fetch restart (de)e0f5f6f7f8fd
10042037160061937251000100010006898412018203720371788318951000100030002037203711100110001000007321622196920382038203820382038
10042037160061918251000100010006898412018203720371788318951000100030002037203711100110001000007321622196920382038203820382038
10042037150061937251000100010006898412018203720371788318951000100030002037203711100110001000007321622196920382038203820382038
10042037150061937251000100010006898402018203720371788318951000100030002037203711100110001000007321622196920382038203820382038
10042037150061937251000100010006898412018203720371788318951000100030002037203711100110001000007331633196920382038203820382038
10042037150061937251000100010006898402018203720371788318951000100030002037203711100110001000007321622196920382038203820382038
10042037151061937251000100010006898402018203720371788318951000100030002037203711100110001000007321622196920382038203820382038
10042037160061937251000100010006898402018203720371788318951000100030002037203711100110001000007321622196920382038203820382038
10042037150061937251000100010006898402018203720371788318951000100030002037203711100110001000007321622196920382038203820382038
100420371509361937251000100010006898402018203720371788318951000100030002037203711100110001000007321622196920382038203820382038

Test 2: Latency 3->1

Chain cycles: 2

Code:

  fccmpe 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 (01)cycle (02)031e3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa8cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
2020440037299059939822252013910020000100200005002853880040018400374003737316337495201002002000020060000400374003711202011009910010020000201000131011611399090100001004008640038400384003840038
2020440037300014739822252010010020000100200005002853880040018400374003737316337495201002002000020060000400374003711202011009910010020000201000131011611399090100001004003840038400384003840038
202044003730006139822252010010020000100200005002853880040018400374003737316337495201002002000020260000400374003711202011009910010020000201000131011611399090100001004003840038400384003840038
202044003729906139822252010010020000100200005002853880040018400374003737316337495201002002000020060000400374003711202011009910010020000201000131011611399090100001004003840038400384003840038
202044003729906139822252010010020000100200005002853880140018400374003737316337495201002002000020060000400374003711202011009910010020000201000131011611399090100001004003840038400384003840038
202044003729906139822252010010020000100200005002853880040018400374003737316337495201002002000020060000400374003711202011009910010020000201000131011611399090100001004003840038400384003840038
2020440037300014539822252010010020000100200005002853880040018400374003737316337495201002002000020060000400374003711202011009910010020000201000131011611399090100001004003840038400384003840038
202044003730006139822252010010020000100200005002853880040018400374003737316337495201002002000020060000400374003711202011009910010020000201000131011611399090100001004003840038400384003840038
202044003730006139822252010010020000100200005002853880040018400374003737316337495201002002000020060000400374003711202011009910010020000201000131011611399090100001004003840038400384003840038
202044003730006139822252010010020000100200005002853880140018400374003737316337495201002002000020060000400374003711202011009910010020000201000131011611399090100001004003840038400384003840038

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03181e3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
2002440037300007243982225200101020000102000050285388014001840037400373733833751720010202000020600004003740037112002110910102000020010001270116113991010000104003840038400384003840038
2002440037300002333982225200101020000102000050285388004001840037400373733833751720010202000020600004007040037112002110910102000020010001270116113991010000104003840038400384003840038
2002440037300032373982244200231020000102000050285388004001840037400373733833751720010202000020600004003740037112002110910102000020010001270116113991010000104003840038400384003840038
2002440037300002523982225200101020000102000050285388014001840037400373733833751720010202000020600004003740037112002110910102000020010001270116113991010000104003840038400384003840038
200244003730000613982225200101020000102000050285388004001840037400373733833751720010202000020600004003740037112002110910102000020010001270128213991010000104003840038400384003840038
2002440037299001453982225200101020000102000050285388004001840037400373733833751720010202000020600004003740037112002110910102000020010001270116113991010000104003840038400384003840038
2002440037300004423982225200101020000102000050285388004001840037400373733833751720010202000020600004003740037112002110910102000020010001270116113991010000104003840038400384003840038
2002440037300001113982225200101020000102000050285388004001840037400373733833751720010202000020600004003740037112002110910102000020010001270116113991010000104003840038400384003840038
2002440037300001683982225200101020000102000050285388004001840037400373733833751720010202000020600004003740037112002110910102000020010001270116113991010000104003840038400384003840038
2002440037300001663982225200101020000102000050285388014001840037400373733833751720010202000020600004003740037112002110910102000020010001270116113991010000104003840038400384003840038

Test 3: Latency 3->2

Chain cycles: 2

Code:

  fccmpe 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 (01)cycle (02)03080b18191e1f3a3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a6a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
20204400372990000000126398222520116100200001002008056528543714001840037400373731633749520100200200002026028840037400841120201100991001002000020100201010680131011611399090100001004003840038400384003840038
20204400373001010000210398222520100100200001002000050028543714005440037400373731633754920182200200002046000040084400373120201100991001002000020100000000132711712399799100001004008540038400844003840038
2020440037300000000082398226120100116200001002000050028538804001840133400373731633755020277200200002046054640037400841120201100991001002000020100203000131011611399090100001004003840086400384013440086
20204401323000000609024481398226120100115200001002008050028538804005440037400843731633749520100200200002006000040037400371120201100991001002000020100002030131014211399090100001004008540038400854008440038
2020440037300000012001693982225201001112000010020000500285388040018401314003737316113749520100200200002006000040130400373120201100991001002000020100202060135213311399090100001004003840038400384003840038
2020440037300010200061398222520100100200001002000050028538804001840037401313734133749520273200200002006000040037400371120201100991001002000020100021032134711611399090100001004003840038400384003840038
20204400373000000000613982261201001042000010020000500285388040018400374003737316113749520100202201912006027340037401331120201100991001002000020100000022830131011611399090100001004003840038400384003840038
202054003730000011440082398224320100100200121182000050028538804001840037400373731633749520100200200002006000040084400373120201100991001002000020100000222880131011611399090100001004003840038400384003840038
202044003730000000920726398222520100100200001002000050028538804001840037400373731633754920100200200002006000040037400371120201100991001002000020100000000131011611399090100001004003840038400384003840085
202044003730000000880483398222520100100200001202000050028538804001840037400373731633749520100200200002006000040037400371120201100991001002000020100000000131011611399090100001004003840038400384003840038

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03090b18191e1f3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a9accdcfd5d6dbddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
2002440037300000000613982225200101020000102000050285388014001840037400373733833751720010202000020600004003740037112002110910102000020010000012701160113991010000104003840038400384003840038
20024400373000000005363982225200101020000102000050285388014001840037400373733833751720010202000020600004003740037112002110910102000020010000012701160113991010000104003840038400384003840038
20024400372990011121086023982225200101020000102000050285388004001840037400373733833751720010202000020600004003740037112002110910102000020010003012701160113991010000104003840038400384003840038
2002440037300000000823982225200101020000102000050285388004001840037400373733833751720010202000020600004003740037112002110910102000020010000012701160113991010000104003840038400384003840038
2002440037299000000613982243200101020000132000050285486214016240037400373735933751720010202000020600004003740037112002110910102000020010202608012701160113991010000104003840038400384003840038
2002440037300000000613982225200101020000102000050285388014001840037400373733833751720010202000020600004003740037112002110910102000020010003012701160113991010000104003840038400384003840038
20024400372990000120613982225200101020000102000050285388014001840037400373733833751720010202000020600004003740037112002110910102000020010000012701160113991010000104003840038400384003840069
2002440037300000000613982225200101020000102000050285388004001840037400373733833751720010202000020600004003740037112002110910102000020010000012701160113991010000104003840038400384003840038
2002440037299000000613982225200101020000102000050285388004001840037400373733833751720010202000020600004003740037112002110910102000020010000012701160113991010000104003840038400384003840038
20024400373000000150613982225200101020000102000050285388004001840037400373733833751720010202000020600004003740037112002110910102000020010010012701160113991010000104003840038400384003840038

Test 4: Latency 3->3

Code:

  fccmpe 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 (01)cycle (02)030818191e1f3a3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst integer (97)inst neon or fp (9a)9fa0a1a6a8a9acc2cdcfd0d5d6ddinst fetch restart (de)e0? int output thing (e9)gpr retires (ef)f5f6f7f8fd
10204200371500000006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710041633199691001002003820038200382003820038
10204200371500000006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710031633199691001002003820038200382003820038
10204200371500000006199372510200200100002001000011007079840200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710031633199691001002003820038200382003820038
102042003715000027006199372510200200100002001000011007079840200182003720037186383187451020020010000200300002003720037111020110099100100001000002000000710031633199691001002003820038200382003820038
10204200371500000006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000001710041633199691001002003820038200382003820038
102042003714900000061993725102002001000020010000110070798402001820037200371863831874510200200100002003000020037200371110201100991001000010000000550600710131634199691001002003820038200382003820038
1020420037150000330006199372510200200100002001000011007079840200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710131634199691001002003820038200382003820038
1020420037150000285006199372510200200100002001000011007079840200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710131633199691001002003820038200382003820038
102042003715000015006199372510200200100002001000011007079841200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710131633199691001002003820038200382003820038
10204200371500000006199372510200200100002001000011007079840200182003720037186383187451020020010000200300002003720037111020110099100100001000000000000710131633199691001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)031e3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst integer (97)inst neon or fp (9a)9fa8accdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)gpr retires (ef)f5f6f7f8fd
10024200371500619937251002020100002010000110707984120018200372003718660318767100202010000203000020037200371110021109101000010000000640316221996910102003820038200382003820038
10024200371500619937251002020100002010000110707984120018200372003718660318767100202010000203000020037200371110021109101000010000100640216221996910102003820038200382003820038
100242003715024619937251002020100002010000110707984120018200372003718660318767100202010000203000020037200371110021109101000010000000640216221996910102003820038200382003820038
10024200371500829937251002020100002010000110707984120018200372003718660318767100202010000203000020037200371110021109101000010000000640216221996910102003820038200382003820038
10024200371500619937251002020100002010000110707984120018200372003718660318767100202010000203000020037200371110021109101000010000000640216221996910102003820038200382003820038
10024200371500619937251002020100002010000110707984120018200372003718660318767100202010000203000020037200371110021109101000010000000640216221996910102003820038200382003820038
10024200371500619937251002020100002010000110707984120018200372003718660318767100202010000203000020037200371110021109101000010000000640216221996910102003820038200382003820038
10024200371500619937251002020100002010000110707984120018200372003718660318767100202010000203000020037200371110021109101000010000000640216321996910102003820038200382003820038
10025200371500619937251002020100002010000110707984120018200372003718660318767100202010000203000020037200371110021109101000010000000640216221996910102003820038200382003820038
10024200371500619937251002020100002010000110707984120018200372003718660318767100202010000203000020037200371110021109101000010000000640216221996910102003820038200382003820038

Test 5: throughput

Count: 8

Code:

  ands xzr, xzr, xzr
  fccmpe h0, h1, #0, lt
  ands xzr, xzr, xzr
  fccmpe h0, h1, #0, lt
  ands xzr, xzr, xzr
  fccmpe h0, h1, #0, lt
  ands xzr, xzr, xzr
  fccmpe h0, h1, #0, lt
  ands xzr, xzr, xzr
  fccmpe h0, h1, #0, lt
  ands xzr, xzr, xzr
  fccmpe h0, h1, #0, lt
  ands xzr, xzr, xzr
  fccmpe h0, h1, #0, lt
  ands xzr, xzr, xzr
  fccmpe 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 (01)cycle (02)030809181e1f3f51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa1a8acc2cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)gpr retires (ef)f5f6f7f8fd
160204800416000000052251601008010080000801008000040050088000018002280041800415996435999916010080200800002002400008004180041111602011009910080100800008010000001101106161180038800001008004280042800428004280042
160204800415990000073251601008010080000801008000040050088000018002280041800415996435999916010080200800002002400008004180041111602011009910080100800008010000000101101161180035800001008004280042800428004280042
160204800415990000052251601008010080000801008000040050088000018002280041800415996435999916010080200800002002400008004180041111602011009910080100800008010000000101101161180035800001008004280042800428004280042
160204800415990000052251601008010080000801008000040080588000018002280041800415996435999916010080200800002002400008004180041111602011009910080100800008010000000101101161180035800001008004280042800428004280042
160204800416000000052251601008010080000801008000040050088000018002280041800415996435999916010080200800002002400008004180041111602011009910080100800008010000000101101161180035800001008004280042800428004280042
160204800416000000052251601008010080000801008000040050088000018002280041800415996435999916010080200800002002400008004180041111602011009910080100800008010000000101101161180035800001008004280042800428004280042
1602048004159900024052251601008010080000801008000040050088000018002280041800415996435999916010080200800002002400008004180041111602011009910080100800008010000000101101161180035800001008004280042800428004280042
160204800416000000052251601008010080000801008000040050088000018002280041800415996435999916010080200800002002400008004180041111602011009910080100800008010000000101101161180074800001008004280079800428004280042
160204800416000000052251601008010080000801008000040050088000018002280041800415996435999916010080200800002002400008004180041111602011009910080100800008010000000101101162180035800001008004280042800428004280245
160204800416000000052251601008010080000801008000040050088000018002280041800415996435999916010080200800002002400008004180041111602011009910080100800008010000000101101161180035800001008004280042800428004280042

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0308191e1f3f51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)5f60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa1a6a8acbranch mispredict (cb)cdcfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0? int output thing (e9)eaebgpr retires (ef)f5f6f7f8fd
160024800416000000582516001080164800008001080000400050880000118002280041800415997936001416001080020800002024000080041800411116002110910800108000080010000000100223114162113480036800002014108004280042800428004280042
1600248004160000007232516001080010800008001080000400050880000118002280041800415997936001416013780020800002024000080041800411116002110910800108000080010000000100223115162115580036800002014108004280042800428004280042
160024800416000000582516001080010800008001080000400050880000118002280041800415997936001416001080020800002024000080041800411116002110910800108000080010000000100223114162115380036800722014108004280042800428004280042
1600248004159900180582516001080010800008001080000400050880000118002280041800415997936001416001080020800002024000080041800411116002110910800108000080010000000100223113162115380036800002014108004280042800428004280042
160024800415990000582516001080010800008001080000400050880000118002280041800415997936001416001080020800002024000080041800411116002110910800108000080010000000100523115162115580036800002029108004280042800428004280042
1600248004159900005825160010800108000080010800004000508800001180022800418004159979186001416001080020800002024000080041800411116002110910800108000080010000000100223114162113480036800002014108004280042800428004280042
160024800416000000642516001080010800008001080000400050880000118002280041800415997936001416001080020800002024000080041800411116002110910800108000080010000000100223114162114380036800002014108004280042800428004280042
160024800416000400582516001080010800008001080000400050880000118002280041800415997936001416001080020800002024000080041800411116002110910800108000080010000000100243114162114480036800002014108004280042800808004280042
1600248004159900004382516001080010800008001080000400050880000118002280041800415997936001416001080020800002024000080041800411116002110910800108000080010000000100223113162113380036800002014108004280042800428004280042
1600248004160000001422516001080010800008001080000400050880000118002280041800415997936001416001080020800002024000080041800411116002110910800108000080010000000100223113162114380036800002014108004280042800428004280042