Apple M1 Microarchitecture Research by Dougall Johnson

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

FRINTN (vector, 8H)

Test 1: uops

Code:

  frintn v0.8h, v0.8h
  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)03070a1e3a3f4e51inst 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)a0a8acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10043037241102682547251000100010003981601301830373037241432895100010001000303730371110011000000077416442629100030383038303830383038
10043037231102682547251000100010003981601301830373037241432895100010001000303730371110011000000077416442629100030383038303830383038
100430372311122682547251000100010003981601301830373037241432895100010001000308430371110011000013077416442629100030383038303830383038
10043037231102682547251000100010003981601301830373037241432895100010001000303730371110011000000077416442629100030383038303830383038
10043037231102682547251000100010003981601301830373037241432895100010001000303730371110011000003077416442629100030383038303830383038
10043037231102682547251000100010003981601301830373037241432895100010001000303730371110011000000077416442629100030383038303830383038
10043037231102682547251000100010003981601301830373037241432895100010001000303730371110011000000077416442629100030383038303830383038
100430372311122682547251000100010003981601301830373037241432895100010001000303730841110011000000077416442629100030383038303830383038
10043037231102682547251000100010003981601301830373037241432895100010001000303730371110011000000077416442629100030383038303830383038
10043037231102682547251000100010003981601301830373037241432895100010001000303730371110011000000077416442629100030383038303830383038

Test 2: Latency 1->2

Code:

  frintn v0.8h, v0.8h
  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)0308090b18191e1f3a3f464e51inst 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)9fa0a1a6a7a8a9abacc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037232000000006102954725101001001000011210000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000001000071011611296330100001003003830038300383003830038
1020430037241000000006102954725101001001000010010000500427716003001830037300372826432874510100200100002001000030037300371110201100991001001000010000001000071011611296330100001003003830038300383003830038
10204300372330000000072602954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000001000071011611296330100001003003830038300383003830038
1020430037233000000006102954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000000000071011611296330100001003003830038300383003830038
1020430037233000000006102954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000000000071011611296330100001003003830038300383003830038
10204300372330000000061029547251010012710000100100005004277160130018300373003728264328745101002001000020010000300373003711102011009910010010000100000036000071011611296330100001003003830038300383003830038
10204300372330000015006102954725101001001000010010000500427716003001830037300372826432874510100200100002001000030037300371110201100991001001000010000000000071011611296330100001003003830038300383003830038
102043003723300000001591802946419210224153100481571150079842906800303783055030513283034728942115012361165823311490304663032612110201100991001001000010000303900252980932175213002939100001003056430519305593051230514
10204305132361101011132096805452029457193102381441006414811500763429068003041430515305662829352289441164723611652230109133051330560121102011009910010010000100000114055084866256332994533100001003037230180303743037230373
102043022623610188936704052960294701731019713410064140112007304286624030270303733036828286342886911350224109852121115530368303758110201100991001001000010022311620195100894195222988534100001003046530507303703047530467

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)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)9fa0a1a6a7a8a9accfd5d6ddinst fetch restart (de)e0? int output thing (e9)eb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037225000000612954725100101010000101000050427716003001830037300372828673287671001020100002010000300373003711100211091010100001000000012364021622296290010000103003830038300383003830038
1002430037225000000712954725100101010000101000050427716003001830037300372828603287671001020100002010000300373003711100211091010100001000000012664021622296290010000103003830038300383003830038
10024300372250000006129547251001010100001010000504277160030018300373003728286032876710010201000020100003003730037111002110910101000010000000064021622296290010000103003830038300383003830038
1002430037224000000612954725100101010000101000050427716003001830037300372828603287671001020100002010000300373003711100211091010100001000000010264021622296290010000103003830038300383003830038
10024300372250000006129547251001010100001010000504277160130018300373003728286032876710010201000020100003003730037111002110910101000010000000064021622296290010000103003830038300383003830038
1002430037225000000612954725100101010000101000050427716003001830037300372828603287671001020100002010000300373003711100211091010100001000000012064021622296290010000103003830038300383003830038
10024300372250000009432954725100101010000101000050427716003001830037300372828603287671001020100002010000300373003711100211091010100001000000013564021622296290010000103003830038300383003830038
1002430037225000000612954725100101010000101000050427716013001830037300372828603287671001020100002010000300373003711100211091010100001000000010864021622296290010000103003830038300383003830038
1002430037225000000612954725100101010000101000050427716003001830037300372828603287671001020100002010000300373003711100211091010100001000000012064021622296290010000103003830038300383003830038
10024300372250000006129547251001010100001010000504277160030018300373003728286032876710010201000020100003003730037111002110910101000010000000064021622296290010000103003830038300383003830038

Test 3: throughput

Count: 8

Code:

  frintn v0.8h, v8.8h
  frintn v1.8h, v8.8h
  frintn v2.8h, v8.8h
  frintn v3.8h, v8.8h
  frintn v4.8h, v8.8h
  frintn v5.8h, v8.8h
  frintn v6.8h, v8.8h
  frintn v7.8h, v8.8h
  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)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)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)cdcfd6dde0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042005815503025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010000111511816020036800001002004020040200402004020040
802042003915603025801081008000810080020500640132020020200392003999776999080120200800322008003220039200391180201100991001008000010000111511816020036800001002004020040200402004020040
802042003915603025801081008000810080020500640132020020200392003999776999080120200801322008003220039200391180201100991001008000010000111511816020036800001002004020040200402004020040
802042003915503025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010000111511816020036800001002004020040200402004020040
802042003915503025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010000111511816020036800001002004020040200402004020040
802042003916103025801081008000810080020500640132020020200392003999776999080120200800322008003220039200391180201100991001008000010000111511816020036800001002004020040200402004020040
802042003915603025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010000111511816020036800001002004020040200402004020040
8020420039155018325801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010003111511816020036800001002004020040200402004020040
802042003915503025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010000111511816020036800001002004020040200402004020040
802042003915603025801081008011210080020500640952120117200392003999776999080234200800322008003220142200393180201100991001008000010000111511816020036800001002004020040200402004020040

1000 unrolls and 10 iterations

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

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)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)9fa0a8acc2branch mispredict (cb)cfd2icache miss (d3)d5d6ddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420039155040258001010800001080000506400000020020200392003999963100198001020800002080000200392003911800211091010800001001000502000151617172003620080000102004020040200402004020040
8002420039155033925800101080000108000050640000002002020039200399996310019800102080000208031820173201111180021109101080000100000050200017161717200360080000102004020040200402004020040
8002420039156010525800101080000108000050640000002002020039200399996310019800102080000208000020039200391180021109101080000100000050200017161217200360680000102004020040200402004020040
8002420039155018825800101080000108000050640000012002020039200399996310019800102080000208000020039200391180021109101080000100000050200017161717200360080000102004020040200402004020040
8002420039156010862580010108000010800005064000000200202003920039999631001980010208000020800002003920039118002110910108000010000005020001716178200360080000102004020040200402004020040
800242003915601902580010108000010800005064000000200202003920039999631001980010208000020800002003920039118002110910108000010010005020011616178200360080000102004020040200402004020040
800242003915501712580010108000010800005064000000200202003920039999631001980010208000020800002003920039118002110910108000010000005020001716177200360080000102004020040200402004020040
80024200391550706258001010800001080000506400000020020200392003999963100198001020800002080000200392003911800211091010800001000000502000616619200360080000102004020040200402004020040
80024200391550234258001010800001080000506400000020020200392003999963100198001020800002080000200392003911800211091010800001000000502000616817200360080000102004020040200402004020040
80024200391550699258001010800001080000506400000020020200392003999963100198001020800002080000200392003911800211091010800001000000502000616178200360080000102004020040200402004020040