Apple M1 Microarchitecture Research by Dougall Johnson

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

FRINT32Z (scalar, S)

Test 1: uops

Code:

  frint32z s0, s0
  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)696d6edispatch 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)a0a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
100430372206125472510001000100039816030183037303724143289510001000100030373037111001100000073416112629100030383038303830383038
1004303722156125472510001000100039816030183037303724143289510001000100030373073111001100000073116112629100030383038303830383038
100430372206125472510001000100039816030183037303724143289510001000100030373037111001100000073116112629100030383038303830383038
100430372306125472510001000100039816030183037303724143289510001000100030373037111001100000073116112629100030383038303830383038
100430372306125472510001000100039816030183037303724143289510001000100030373037111001100000073116112629100030383038303830383038
100430372306125472510001000100039816030183037303724143289510001000100030373037111001100000073116112629100030383038303830383038
100430372206125472510001000100039816030183037303724143289510001000100030373037111001100000373116112629100030383038303830383038
100430372208225472510001000100039816030183037303724143289510001000100030373037111001100000073116112629100030383038303830383038
100430372308225472510001000100039816030183037303724143289510001000100030373037111001100000073116112629100030383038303830383038
1004303723033725472510001000100039816030183037303724143289510001000100030373037111001100000073116112629100030383038303830383038

Test 2: Latency 1->2

Code:

  frint32z s0, s0
  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)9fa0a1a6a7a8a9acc2c5cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037233000000061295472510100100100001001014850042771600300180300373003728264328745101002001000020010000300373003711102011009910010010000100000062000071011611296330100001003003830038300383003830038
10204300372330000000612954725101001001000010010000500427716003001803022430037282773287451010020010000200111603026330321121102011009910010010000100200012332602010261138122996839100001003066330709305653074630424
102043070424610141317821232075372942923410269157101041621180084342947360303780306583070628310622890412114234123212441214330702306591511020110099100100100001000030240361100010471138113010243100001003065830504307033070330607
10204305022460113101980004649294292831025617310104168119508234296241030522030741307042831170290021227525412305250122663071030704151102011009910010010000100200030416180010134145143003239100001003074430706307133065930750
1020430701247001312145211440612954722610256163100961001000054242866240302700303583037028289282885411040220111562181116630420303247110201100991001001000010000012015207771109232997737100001003041930697304553042230465
1020430654245101089480061295472510100113100001431075063942852720301980303133036828296412887011112222114942301132430327304189110201100991001001000010000211219696208944102112992127100001003046730464304683046430326
10204302742451146543440016129547251010010010000100100005004277160030018030037300372826432874510100200100002001000030037300371110201100991001001000010000001000071011611296330100001003003830038300383003830038
102043003723300000006129547251010010010000100100005004277160030018030037300372826432874510579202100002001032830037300841110201100991001001000010000000090071022511295950100001003003830038300383003830038
1020530037233000093006129547251010010010000100104505004277160030018030037300372826432874510100200100002001000030037300371110201100991001001000010000000032071011611296330100001003003830038300863003830038
102043003723300000006129547251010010010000100100005004277160030018030037300372826432874510100200100002001000030037300371110201100991001001000010020002900071013211296690100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03080b191e3f4e51inst 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)9fa1a6a8a9acc2cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722400006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100040300640216222962910000103003830038300383003830038
100243003722500006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100010300640216222962910000103003830038300383003830038
1002430037225000061295472510010101000013100005042771601300183003730037282863287671001020100002010000300373003711100211091010100001000360600640216222962910000103003830038300383003830038
100243003722500006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100010000640216222962910000103003830038300383003830038
100243003722500006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100020300640216222962910000103003830038300383003830038
100243003722500006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100010300640216222962910000103003830038300383003830038
100243003722400006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100010300640216222962910000103003830038300383003830038
100243003722500005372954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010003501200640216222962910000103003830038300383003830038
100243003722500006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100010300640216222962910000103003830038300383003830038
100243003722500006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100010300640216222962910000103003830038300383003830038

Test 3: throughput

Count: 8

Code:

  frint32z s0, s8
  frint32z s1, s8
  frint32z s2, s8
  frint32z s3, s8
  frint32z s4, s8
  frint32z s5, s8
  frint32z s6, s8
  frint32z s7, s8
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03080b18191e1f3a3f51inst 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)9fa0a1a6a8a9acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042005815600000002132580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511811600200360800001002004020040200402004020040
80204200391550000000302580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040
80204200391560000000952580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040
802042003915500000006952580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040
802042003915500000003025801081008000810080020500640132120020200392003999776100258012020080032200800322003920039118020110099100100800001000001030111511801600200360800001002004020040200402004020040
80204200391550000000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801610200360800001002004020040200402004020040
80204200391550000000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040
80204200391550000000302580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040
80204200391550000000302580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040
80204200391550000000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03081e1f3f51inst 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)9fa0a8accfd0d2d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420050155000402580010108000010800005064000001200202003920039999631001980010208000020800002003920039118002110910108000010000502012681216322003680000102004020040200402004020040
8002420039155000402580010108000010800005064000000200202003920039999631001980010208000020800002003920039118002110910108000010000502000316332003680000102004020040200402004020040
8002420039155000402580010108000010800005064000000200202003920039999631001980010208000020800002003920039118002110910108000010000502000316322003680000102004020040200402004020040
8002420039155000402580010108000010800005064000001200202003920039999631001980010208000020800002003920039118002110910108000010000502000316322003680000102004020040200402004020040
8002420039156000402580010108000010800985064000000200202003920039999631001980010208000020800002003920039118002110910108000010000502000316322003680000102004020040200402004020040
8002420039155000402580010108000010800005064000000200202003920039999631001980010208000020800002003920039118002110910108000010010502000316232003680000102004020040200402004020040
8002420039155000402580092108000010800005064000000200202003920039999631001980010208000020800002003920039118002110910108000010000502000316332003680000102004020040200402004020040
8002420039155000402580010108000010800005064000000200202003920039999631001980010208000020800002003920039118002110910108000010000502000316332003680000102004020040200402004020040
8002420039155000402580010108000010800005064000000200202003920039999631001980010208000020800002003920039118002110910108000010000502000216332003680000102004020040200402004020040
8002420039155000402580010108000010800005064000000200202003920039999631001980326208000020800002003920039218002110910108000010400502000416232003680000102004020040200402004020040