Apple M1 Microarchitecture Research by Dougall Johnson

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

FCVTZS (scalar, fixed-point, H to H)

Test 1: uops

Code:

  fcvtzs h0, h0, #3
  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)03091e3f4e51inst 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)a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004303723006125472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
10043037230126125472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
1004303723006125472510001000100039816003018303730372414328951000100010003037303721100110000073116112629100030383038303830383038
1004303723006125472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
1004303724006125472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
1004303723006125472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
1004303723006125472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
1004303723008425472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
1004303723006125472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
1004303724006125472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038

Test 2: Latency 1->2

Code:

  fcvtzs h0, h0, #3
  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)03040b18191e1f3a3f4e51inst 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)9fa0a1a7a8a9acb5c2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)eb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003724210009000612954725101001001000010010000500427716003001830037300372826432874510100200100002001000030037300371110201100991001001000010000000000710116112963300100001003003830038300383003830038
102043003723300009001602954725101001001000010010000500427716003001830037300372826432874510100200100002001000030037300371110201100991001001000010000000300710116112963300100001003003830038300383003830038
10204300372330000900612954725101001001000010010000500427716003001830037300372826432874510100200100002001000030037300371110201100991001001000010000000000710116112963300100001003003830038300383003830038
102043003723300003900612954725101001001000010010000500427716003001830037300372826432874510100200100002001000030037300371110201100991001001000010000000000710116112963300100001003003830038300383003830038
1020430037233000024001032954725101001001000010010000500427716003001830037300372826432874510100200100002001000030037300371110201100991001001000010000000000710116112963300100001003003830038300383003830038
102043003723200002700612954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000000000710116112963300100001003003830038300383003830038
102043003723300002130018492954725101001001000010010000500427716003001830037300372826432874510100200100002001000030037300371110201100991001001000010000000000710116112963300100001003003830038300383003830038
10204300372330000000612954725101001001000010010000500427716003001830037300372826432874510100200101822001000030037300371110201100991001001000010000000000710116112963300100001003003830038300383003830038
102043003723300001200612954725101001001000010010000500427716003001830037300372826432874510100200100002001000030037300371110201100991001001000010000000000710116112963300100001003003830038300383003830038
10204300372320100000612954725101001001000010010000500427716003001830037300372826432874510100200101822001000030037300371110201100991001001000010000000000710116112963300100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03080b18191e1f3f4e51inst 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)9fa0a1a8acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372330000540612954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010000006402162229629010000103003830038300383003830038
100243003723200002250612954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010001006402162229629010000103003830038300383003830038
1002430037233000000612954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010000006402162229629010000103003830038300383003830038
1002430037233000018907262954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010000006402162229629010000103003830038300383003830038
100243003723300001290103295472510010101000015111578742893280302343041430456283154128915113642211324221132130462304515110021109101010000104402797508734972330065410000103040530546305613054730562
10024305102361111111452968103294392441010814100801111200764290680030378303633060228328532895611663201181622119033032230555121100211091010100001002014075286931043630027410000103056430556305563031230511
1002430608237000000612954725100101010000101000050427716013001830037300372828632876710010201000020100003003730037111002110910101000010000006402162229629010000103003830038300383003830038
1002430037242000011101942954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010000006402162229629010000103003830038300383003830038
100243003724101000011542954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010000006402162229629010000103003830038300383003830038
10024300372320000960612954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010000006402162229629010000103003830038300383003830038

Test 3: throughput

Count: 8

Code:

  fcvtzs h0, h8, #3
  fcvtzs h1, h8, #3
  fcvtzs h2, h8, #3
  fcvtzs h3, h8, #3
  fcvtzs h4, h8, #3
  fcvtzs h5, h8, #3
  fcvtzs h6, h8, #3
  fcvtzs h7, h8, #3
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03080b0e18191e1f3f51inst issue (52)~issue int (53)~issue fp/simd (54)~issue ld/st (55)~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)9fa0a1a6a8a9acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8020420058155000001203025801081008000801008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040
802042003915500000005825801081008000801008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040
802042003915600000003025801081008000801008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040
802042003915500000003025801081008000801008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040
802042003915500000303025801081008000801008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040
802042003915500000003025801081008000801008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040
8020420039155000000030258010810080008010080020500640132020020200392003999776100198012020080032200800322003920039118020110099100100800001000000030111511801600200360800001002004020040200402004020040
802042003915600000003025801081008000801008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040
802042003915500000003025801081008000801008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040
802042003915500000003025801081008000801008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000005090111511801600200360800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030a1e3f51inst 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)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)inst ldst (9b)9fa8acc2cfd2d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420039155033402580010108000010800005064000000200202003920039999603100198001020800002080000200392003911800211091010800000100005020017161772003680000102004020040200402004020040
800242003915000402580010108000010800005064000000200202003920039999603100198001020800002080000200392003911800211091010800000100005020017161782003680000102004020040200402004020040
80024200391500032525800101080000108000050640000002002020039200399996031001980010208000020800002003920039118002110910108000001000050200171617172003680000102004020040200402004020040
80024200391500040258001010800001080000506400000020020200392003999960310019800102080000208000020039200391180021109101080000010000502007168172003680000102004020040200402004020040
800242003915000402580010108000010800005064000000200202003920039999603100198001020800002080000200392003911800211091010800000100045020017166172003680000102004020040200402004020040
80024200391500040258001010800001080000506400000020020200392003999960310019800102080000208000020039200391180021109101080000010000502006168172003680000102004020040200402004020040
80024200391500040258001010800001080000506400000020020200392003999960310019800102080000208000020039200391180021109101080000010000502008166172003680000102004020040200402004020040
800242003915000402580010108000010800005064000000200202003920039999603100198001020800002080000200392003911800211091010800000101005020017168172003680000102004020040200402004020040
8002420039150204025800101080000108000050640000002002020039200399996031001980010208000020800002003920039118002110910108000001000050200171617142003680000102004020040200402004020040
800242003915020402580010108000010800005064000000200202003920039999603100198001020800002080000200392003911800211091010800000100005020017161772003680000102004020040200402004020040