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

Test 1: uops

Code:

  fcvtn2 v0.4s, v1.2d
  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)a6a8accficache miss (d3)d5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10043037240612548251000100010003983130301830373037241532895100010002000303730371110011000000730116112630100030383038303830383038
100430372493612548251000100010003983130301830373037241532895100010002000303730371110011000000730116112630100030383038303830383038
1004303724481312548251000100010003983130301830373037241532895100010002000303730371110011000000730116112630100030383038303830383038
10043037240612548251000100010003983130301830373037241532895100010002000303730371110011000000730116112630100030383038303830383038
10043037240612548251000100010003983130301830373037241532895100010002000303730371110011000000730116112630100030383038303830383038
100430372481612548251000100010003983130301830373037241532895100010002000303730371110011000000730216112630100030383038303830383038
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000000730116112630100030383038303830383038
100430372436842548251000100010003983130301830373037241532895100010002000303730371110011000000730116112630100030383038303830383038
10043037230612548251000100010003983131301830373037241532895100010002000303730371110011000000730116112630100030383038303830383038
10043037240612548251000100010003983130301830373037241532895100010002000303730371110011000000730116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  fcvtn2 v0.4s, v1.2d
  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)0308181e1f223a3f4e51inst 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
1020430037233000000612954825101001001000010010000500427731303001830037301822826532874510100200100002002000030037300371110201100991001001000010019000071011611296340100001003003830038300383003830038
1020430037232000000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296340100001003003830038300383003830038
1020430037233000000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010010000071011611296340100001003003830038300383003830038
1020430037233000000612954825101001001000010010000500427731303001830086300842826532874510100200100002002000030037300371110201100991001001000010000000071014811296340100001003003830038300383003830038
1020430037233000000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010030000071011611296340100001003003830038300383003830038
1020430037233000000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300374110201100991001001000010000000071011611296340100001003003830038300383003830038
1020430037233000000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296340100001003003830038300383003830038
10204300372330000001032954825101001001000010010000500427731303001830037300372826532874510100200100002122000030037300371110201100991001001000010000000071011611296340100001003003830038300383003830038
1020430037233000000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010019000071011611296340100001003003830038300383003830038
102043003723300690001032954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071011611296700100001003013330038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.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)9fa1a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003723305362954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372330612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372330612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372330612954825100101010000101000050427731313001830037301792828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372330612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372320612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
100243003723306129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100018640216222963010000103003830038300383003830038
10024300372330612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372320612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010200640216222963010000103003830038300383003830038
10024300372330612954825100101010000101000050427731313001830037300372828732876710010201000020200003008430037111002110910101000010003640216222963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  fcvtn2 v0.4s, v0.2d
  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)030b18191e1f3a3f4e51inst 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)9fa8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003723300000061295472510100100100001001000050042771600300183003730037282717287411010020010008200200163003730037111020110099100100100001000011171801600296460100001003003830038300383003830038
102043003723300000061295474410100100100001001000050042771600300183003730037282716287401010020010008200200163003730037111020110099100100100001000011171801600296460100001003003830038300383003830038
102043008524700000061295472510100100100001001000050042771601300183003730037282716287411010020010008200200163003730037111020110099100100100001000011171901600296450100001003003830038300383003830038
1020430037233000000251295472510100100100001001000050042771601300183003730037282716287401010020010008200200163003730037111020110099100100100001001011171701600296450100001003003830038300383003830038
102043003723300000061295472510100100100001001000050042771601300183003730037282716287411010020010008200200163003730037111020110099100100100001000011171701600296460100001003003830038300383003830038
1020430037233000000156295472510100100100001001000050042771600300183003730037282716287411010020010008200200163003730037111020110099100100100001001011171801600296450100001003003830038300383003830038
102043003723300000061295472510100100100001001000050042771601300183003730037282716287411010020010008200200163003730037111020110099100100100001001011171801600296450100001003003830038300383003830038
102043003723200000061295472510100100100001001000050042771600300183003730037282717287401010020010008200200163003730037111020110099100100100001001011171801600296450100001003003830038300383003830038
102043003723300000061295472510100100100001001000050042771601300183003730037282717287411010020010008200200163003730037111020110099100100100001001011171701600296460100001003003830038300383003830038
102043003723200000061295472510100100100001001000050042771600300183003730037282716287411010020010008200200163003730037111020110099100100100001000011171801600296460100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)031e1f3f4e51inst 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)9fa7a8a9acc5branch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003723300612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640116222962910000103003830038300383003830038
10024300372331202322954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640216222962910000103003830038300383003830038
1002430037233210612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000300640216222962910000103003830038300383003830038
100243003723300612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640216222962910000103003830038300383003830038
100243003723330612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640216222962910000103003830038300383003830038
1002430037233007262954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640216222962910000103003830038300383003830038
100243003723200612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640216222962910000103003830038300383003830038
100243003723300752954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640416222962910000103003830038300383003830038
10024300372330881052954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640216222962910000103003830038300383003830038
100253003723300612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)031e3f51inst 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)60696d6escheduler 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? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602042008815502222580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000001111011901600200621600001002006620066200662006620066
1602042006515602202580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000001111011901600200621600001002006620066200662006620066
1602042006515601592580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000001111011901600200621600001002006620066200662006620066
1602042006515501922580116100800161008002850064019612004520065200656128012820080028200160056200652015011160201100991001001600001000001111016901600200621600001002006620066200662006620066
160204200651550292580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000001111011901600200621600001002006620066200662006620066
1602042006515508232580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000001111011901600200621600001002006620066200662006620066
16020420065156010042580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000001111011901600200621600001002006620066200662006620066
1602042006515504542580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000001111011901600200621600001002006620066200662006620066
1602042006515502502580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000001111011901600200621600001002006620066200662006620066
1602042006515502202580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000001111011901600200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)031e3f51inst 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)5f6061696d6escheduler 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)9fa8a9accfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaebec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002420081156051258001010800001080000506400000102003120050200503228001020800002016000020046200501116002110910101600001000010042811122021114620043150112160000102004720047200472004720047
160024200461550452580010108000010800005064000011520027200462004632280010208000020160000200462004611160021109101016000010000100348517202118162004315089160000102004720047200472004720047
16002420046155045258001010800001080000506400001152002720046200463228001020800002016000020046200461116002110910101600001000010028851420211992004315084160000102004720047200472004720047
16002420046155045258001010800001080000506400001152002720046200463228001020800002016000020046200461116002110910101600001000010033851620211692004315082160000102004720047200472004720047
16002420046155045258001010800001080000506400001152002720046200463228001020800002016000020046200461116002110910101600001000010030851102021113520043150100160000102004720047200472004720047
1600242004615504525800101080000108000050640000115200272004620046322800102080000201600002004620046111600211091010160000100001003885110202117102004315077160000102004720047200472004720047
1600242004615504525800101080000108000050640000115200272004620046322800102080000201600002004620046111600211091010160000100001002985113202117102004315075160000102004720047200472004720047
160024200461559452980010108000010800005064000001020041200602006032280010208000020160000200512006011160021109101016000010000100293111525211962004820754160000102005220052200522005220052
1600242005115504527800101080000108000050640000110200322005120051322800102080000201600002005120051111600211091010160000100001003331115252111072004820698160000102005220052200522005220052
16002420051155010127800101080000108000050640000110200322005120051322800102080000201600002005120051111600211091010160000100001003331110272111072004820614160000102006120061200522006120061

Test 5: throughput

Count: 16

Code:

  fcvtn2 v0.4s, v16.2d
  fcvtn2 v1.4s, v16.2d
  fcvtn2 v2.4s, v16.2d
  fcvtn2 v3.4s, v16.2d
  fcvtn2 v4.4s, v16.2d
  fcvtn2 v5.4s, v16.2d
  fcvtn2 v6.4s, v16.2d
  fcvtn2 v7.4s, v16.2d
  fcvtn2 v8.4s, v16.2d
  fcvtn2 v9.4s, v16.2d
  fcvtn2 v10.4s, v16.2d
  fcvtn2 v11.4s, v16.2d
  fcvtn2 v12.4s, v16.2d
  fcvtn2 v13.4s, v16.2d
  fcvtn2 v14.4s, v16.2d
  fcvtn2 v15.4s, v16.2d
  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)03070a1e3f51inst 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)5e60696d6edispatch 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)9fa1a6a8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602044005831001072251601081001600081001600205001280132811401434003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040
160204400393101103025160108100160008100160020500128013200400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040
160204400393101103025160108100160008100160020500128013200400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040
160204400393101103025160108100160008100160020500128013201400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040
160204400393101103025160108100160008100160020500128013200400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040
16020440039310111213525160108100160108100160020500128013201400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040
160204400393101103025160108100160008100160020500128013201400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040
160204400393101103025160108100160008100160020500128013201400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000801111011811631400361600001004004040040400404004040040
160204400393101103025160108100160008100160020500128013201400204003940039199776199901601202001600322003202784003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040
160204400393111103025160108100160008100160020500128013201400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011811611400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030a0b18191e1f3f51inst 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)9fa0a6a8a9acc2cdcfd0d2icache miss (d3)d5d6d7d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002440039310000000462516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000000001002231161604215640036406160000104004040040400404004040040
160024400393110000007425160010101600001016000050128000011400204003940039199963200191600102016000020320000400394003911160021109101016000010000000010024622616042264400362012160000104004040040400404004040040
160024400393100000005225160010101600001016000050128000001400204003940039199963200191600102016000020320000400394003911160021109101016000010000000010022622816042269400364012160000104004040040400404004040040
160024400393220000005225160010101600001016000050128000001400204003940039199963200191600102016000020320000400394003911160021109101016000010000000010022621616021256400364012160000104004040040400404004040040
160024400393100000006925160010101600001016000050128000001400204003940039199963200191600102016000020320000400394003911160021109101016000010000000010022311816021199400364012160000104004040040400404004040040
1600244003931100000071725160010101600001016000050128000001400204003940039199963200191600102016000020320000400394003911160021109101016000010000000010024622616042164400364012160000104004040040400404004040040
16002440039310000000462516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000000001002231161602115640036206160000104004040040400404004040040
16002440039310000000462516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000000001002231161602118540036206160000104004040040400404004040040
16002440039310000000522516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000000001002462261604229940036406160000104004040040400404004040040
1600244003931100003001490251600101016000010160000501280000014002040039400391999632001916001020160000203200004003940039111600211091010160000100000000100226128160422411400362012160000104004040040400404004040040