Apple M1 Microarchitecture Research by Dougall Johnson

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

FCVTN2 (vector, 4S)

Test 1: uops

Code:

  fcvtn2 v0.8h, v1.4s
  movi v0.16b, 1
  movi v1.16b, 2

(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)031e3f4e51inst 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)a8acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004303723061254825100010001000398313030183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303722061254825100010001000398313030183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
10043037230103254825100010001000398313030183037303724153289510001000200030373037111001100000273116112630100030383038303830383038
1004303723061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303722061254825100010001000398313030183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303722082254825100010001000398313030183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303722061254825100010001000398313030183037303724153289510001000200030373037111001100003073116112630100030383038303830383038
1004303723061254825100010001000398313030183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303722061254825100010001000398313030183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303723061254825100010001000398313030183037303724153289510001000200030373037111001100000073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  fcvtn2 v0.8h, v1.4s
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.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)60696b6d6edispatch 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)9fa1a6a8accfd0d5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003723300004500612954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001000000710011611296340100001003003830038300383003830038
10204300372330000000612954825101001001000010010000500427731303001803003730037282653287451010020010000200200003003730037111020110099100100100001000000710011611296340100001003003830038300383003830038
10204300372320000000612954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001000000710011611296340100001003003830038300383003830038
102043003723300000001032954825101001001000010010000500427731303001803003730084282653287451010020010000200200003003730037111020110099100100100001000000710011611296340100001003003830038300383003830038
10204300372320000000612954825101001001000010010000500427731303001833003730037282653287451010020010000200200003003730037111020110099100100100001000000710011611296340100001003003830038300383003830038
10204300702330000900612954825101001001000010010000500427731303001803003730037282653287451010020010000200200003003730037111020110099100100100001000000710011611296340100001003003830038300383003830038
10204300372330000000612954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001000000710011611296340100001003003830038300383003830038
102043003723200000006129548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000018732011611296340100001003003830038300383003830038
10204300372330000000612954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001000000710011611296340100001003003830038300383003830085
10204300372330000000612954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001000000710011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)030818191e3f4e51inst 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)9fa1a6a7a8acc2cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037232000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006403163329630010000103003830038300383003830038
1002430037233000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006403163329630010000103003830038300383003830038
1002430037233000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006404163329630010000103003830038300383003830038
1002430037233000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006404163329630010000103003830038300383003830038
1002430037233000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006404163329630010000103003830038300383003830038
1002430037233000061295482510010101000010100005042773130300183003730037282873287671001022100002020000300373003711100211091010100001000000006404163329630010000103003830038300383003830038
1002430037232000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006404163329630010000103003830038300383003830038
1002430037233000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006404163329630010000103003830038300383003830038
1002430037233000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006404163329630010000103003830038300383003830038
1002430037246000089295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006403163329630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  fcvtn2 v0.8h, v0.4s
  movi v0.16b, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03080a0b18191e1f3a3f4e51inst 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)9fa8acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003723300000000612954725101001001000010010000500427716003001830037300372825262873310100200100002002000030037300371110201100991001001000010000011171701600296460100001003003830038300383003830038
102043003723300000000612954725101001001000010010000500427716013001830037300372827162874010100200100082002001630037300371110201100991001001000010000011171701600296450100001003003830038300383003830038
102043003723300000000612954725101001001000010010000500427716003001830037300372827172874110100200100082002001630037300371110201100991001001000010000011171701600296450100001003003830038300383003830038
102043003723300000000612954725101001001000010010000500427716013001830037300372827172874010100200100082002001630037300371110201100991001001000010000011171701600296450100001003003830038300383003830038
102043003723300000000612954725101001001000010010000500427716003001830037300372827162874110100200100082002001630037300371110201100991001001000010000011171801600296460100001003003830038300383003830038
102043003723200000000612954725101001001000010010000500427716003001830037300372827162874010100200100082002001630037300371110201100991001001000010000011171701600296460100001003003830038300383003830038
102043003723200000000612954725101001001000010010000500427716003001830037300372827172874010100200100082002001630037300371110201100991001001000010000011171801600296450100001003003830038300383003830038
102043003723200000000612954725101001001000010010000500427716013001830037300372827162874110100200100082002001630037300371110201100991001001000010000011171701600296460100001003003830038300383003830038
102043003723300000000612954725101001001000010010000500427716003001830037300372827162874010100200100082002001630037300371110201100991001001000010000011171801600296450100001003003830038300383003830038
102043003723200000000612954725101001001000010010000500427716013001830037300372827172874110100200100082002001630037300371110201100991001001000010000011171701600296450100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03191e3a3f4e51inst 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)72scheduler 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)9fa1a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372330002491295472510010101000010100005042771600300183003730037282860328767100102010000202000030037300371110021109101010000100000640416222962910000103003830038300383003830038
100243003723300061295472510010101000010100005042771600300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003723300061295472510010101000010100005042771601300183003730037282860328767100102010000202000030037300371110021109101010000100003640216222962910000103003830038300383003830038
100243003723300082295472510010101000010100005042771601300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003723300061295472510010101000010100005042771601300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003723300061295472510010101000010100005042771600300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003723300061295472510010101000010100005042771600300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003723300061295472510010101000010100005042771600300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
1002430037233000536295472510010101000010100005042771601300183008430037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003723200061295472510010101000010100005042771601300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  fcvtn2 v0.8h, v8.4s
  movi v1.16b, 0
  fcvtn2 v1.8h, v8.4s
  movi v2.16b, 0
  fcvtn2 v2.8h, v8.4s
  movi v3.16b, 0
  fcvtn2 v3.8h, v8.4s
  movi v4.16b, 0
  fcvtn2 v4.8h, v8.4s
  movi v5.16b, 0
  fcvtn2 v5.8h, v8.4s
  movi v6.16b, 0
  fcvtn2 v6.8h, v8.4s
  movi v7.16b, 0
  fcvtn2 v7.8h, v8.4s
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)0307080a0b18191e1f3f51inst 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)60696d6e74scheduler 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)9fa0a1a6a7a8a9acc5c8branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)eb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204200911550000000029258011610080016100800285006401960200452006520065061280128200800282001600562006520065111602011009910010016000010000008061011101191161120062001600001002006620066200662006620066
1602042006515510100000292580116100800161008002850064019602004520065200650612801282008002820016005620065200651116020110099100100160000100000000721011101192492120128001600001002014820161201602014720158
160204201571561010229074325801161008001610080028500640196020045200652006506128012820080028200160056200652006511160201100991001001600001000230008351011101191481120062001600001002014920216201732016120066
160204200651561011100029258011610080016100800285006401960201512016720151061280236200800282001600562006520065111602011009910010016000010000000031011101191161120062001600001002006620066200662006620066
1602042006515510100012029258011610080016100800285006401960200452006520065061280128200800282001600562006520065111602011009910010016000010000005031011101191161120062001600001002006620066200662006620066
1602042006515510100000292580116100800161008002850064019602004520065200650612801282008002820016005620065200651116020110099100100160000100000000721011101191161120062001600001002006620066200662006620066
160204200651561010000029258011610080016100800285006401960200452006520065061280128200800282001600562006520065111602011009910010016000010000006001011101191161120062001600001002006620066200662006620066
1602042006515610100000124258011610080016100800285006401960200452006520065061280128200800282001600562006520065111602011009910010016000010000006014751011101191161120062001600001002006620066200662006620066
16020420065156101000001412580116100800161008002850064019602004520400200650612801282008002820016005620065200651116020110099100100160000100000012061011101191161120062001600001002006620066200662006620066
160204200651561010000029258011610080016100800285006401960200452006520065061280128200800282001600562006520065111602011009910010016000010000003031011101191161120062001600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0308090a1e3f51inst 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)5f60696d6escheduler 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)9fa0a1a8a9acc2cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0? int output thing (e9)ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160024200591550001245258001010800001080000506400000120031200502004632280010208000020160000200512005011160021109101016000010000000100366122220412222220043015160000102005120051200512004720051
16002420051155000071625800101080000108000050640000012002720050200463228001020800002016000020051200521116002110910101600001044260180100336111024411222220047030160000102004720051200512005120047
160024200461550000452580010108000010800005064000001200312004620046322800102080000201600002004620050111600211091010160000100000420100333212020411241120043015160000102004720047200472004720047
16002420046155000010222580010108000010800005064000011200312004620050322800102080000201600002004620046111600211091010160000100000001004531122116412102220242015160000102004720051200472004720047
160024200461550021245258001010800001080000506400001120027200462004632280010208000020160000200462005511160021109101016000010008030100453112220211221020043018160000102004720047200472004720047
16002420046155000128725800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001000501320100453112220211222220043015160000102004720047200472011720047
160024200461550000452580010108000010800005064000011200272004620046322800102080000201600002004720046111600211091010160000100000300100453112220211222220043015160000102004720047200472005120047
1600242004615600006625800101080000108000050640000112002720046200463228001020800002016000020047200461116002110910101600001000000010045311920211221020043015160000102004720047200472004720047
160024200461550000452580010108000010800005064000011200272004620046322800102080000201600002004620046111600211091010160000100000120100453112220211222220043015160000102004720047200472004720047
160024200461550000452580010108000010800005064000011200272004620046322800102080000201600002004620046111600211091010160000100050120100453112220211102220043015160000102004720047200472004720047

Test 5: throughput

Count: 16

Code:

  fcvtn2 v0.8h, v16.4s
  fcvtn2 v1.8h, v16.4s
  fcvtn2 v2.8h, v16.4s
  fcvtn2 v3.8h, v16.4s
  fcvtn2 v4.8h, v16.4s
  fcvtn2 v5.8h, v16.4s
  fcvtn2 v6.8h, v16.4s
  fcvtn2 v7.8h, v16.4s
  fcvtn2 v8.8h, v16.4s
  fcvtn2 v9.8h, v16.4s
  fcvtn2 v10.8h, v16.4s
  fcvtn2 v11.8h, v16.4s
  fcvtn2 v12.8h, v16.4s
  fcvtn2 v13.8h, v16.4s
  fcvtn2 v14.8h, v16.4s
  fcvtn2 v15.8h, v16.4s
  movi v16.16b, 17

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)0318191e1f3f51inst 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)60696b6d6edispatch 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)9fa0a1a7a8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204400393000045601582516010810016000810016002050012801321400200400934003919977111999016012220016024020032006440039400392116020110099100100160000100000061111015302600400361600001004004040040400404004040040
1602044003930000474030251601081001600081001600205001280132140020040039400391997761999016012020016003220032006440039400391116020110099100100160000100000001111011801600400361600001004004040040400404004040040
1602044003930000438072251601081001600081001600205001280132140020040039400391997761999016012020016003220032006440039400391116020110099100100160000100000001111011801600400361600001004004040040400404004040040
1602044003930000504030251601081001600081001600205001280132140020040039400391997761999016012020016003220032006440039400391116020110099100100160000100000001111011801600400361600001004004040040400404004040040
160204400393000043503025160108100160008100160020500128013214002004003940039199776199901601202001600322003200644003940039111602011009910010016000010004034711111011811600400361600001004004040040400404004040040
160204400393000030030251601081001600081001600205001280132140020040039400391997761999016012020016003220032006440039400391116020110099100100160000100000001111011801600400361600001004004040040400404004040040
1602044003929900495030251601081001600081001600205001280132140020040039400391997761999016012020016003220032006440039400391116020110099100100160000100000001111011801600400361600001004004040040400404004040040
1602044003931200546030251601081001600081001600205001280132140020040039400391997761999016012020016003220032006440039400391116020110099100100160000100000001111011801600400361600001004004040040400404004040040
1602044003930000501030251601081001600081001600205001280132140020040039400391997761999016021620016003220032006440039400391116020110099100100160000100000001111011801600400361600001004004040040400404004040040
1602044003930000486030251601081001600081001600205001280132140020040048400391997661999016012020016003220032006440039400391116020110099100100160000100000001111011801600400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03191e1f3a3f51inst 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)9fa9acc2c5cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160024400393000300014042516001010160000101600005012800000140020400394003919996320019160010201600002032000040039400391116002110910101600001000001002231110162114240036155160000104004040040400404004040040
1600244003930000001199251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223114162114240036155160000104004040040400404004040040
160024400393000000487251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223112162112440036155160000104004040040400404004040040
160024400393000000398251600911016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000100246112162112440036155160000104004040040400404004040040
160024400393000000495251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100300100223114162114240036155160000104004040040400404004040040
160024400392990000241251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223215162122440036155160000104004040040400404004040040
16002440039300015007352516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001001200100223112162215840036155160000104004040040400404004040040
1600244003930000005202516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000001002471131621153400361510160000104004040040400404004040040
160024400393000000509251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223112162112440036155160000104004040040400404004040040
160024400393000000151251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223112162114240036155160000104004040040400404004040040