Apple M1 Microarchitecture Research by Dougall Johnson

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

FRINTX (scalar, H)

Test 1: uops

Code:

  frintx h0, h0
  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)033f4e51inst 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)accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10043037231032547251000100010003981601301830373037241432895100010001000303730371110011000073216222629100030383038303830383038
1004303723612547251000100010003981600301830373037241432895100010001000303730371110011000073216222629100030383038303830383038
10043037232052547251000100010003981600301830373037241432895100010001000303730371110011000073216222629100030383038303830383038
10043037232542547251000100010003981600301830373037241432895100010001000303730371110011000073216222629100030383038303830383038
10043037232792547251000100010003981600301830373037241432895100010001000303730371110011000073216222629100030383038303830383038
10043037231622547251000100010003981600301830373037241432895100010001000303730371110011000073216222629100030383038303830383038
1004303723612547251000100010003981600301830373037241432895100010001000303730371110011000073216222629100030383038303830383038
10043037232502547251000100010003981600301830373037241432895100010001000303730371110011000073216222629100030383038303830383038
1004303722612547251000100010003981600301830373037241432895100010001000303730371110011000073216222629100030383038303830383038
1004303723612547251000100010003981600301830373037241432895100010001000303730371110011000073216222629100030383038303830383038

Test 2: Latency 1->2

Code:

  frintx h0, h0
  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)03080b18191e3f4e51inst 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)9fa1a8a9acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225000010861295472510100100100001001000050042771601300180300373003728264328745101002001000020010000300373003711102011009910010010000100000007101161129633100001003003830038300383003830038
10204300372250000225117295472510100100100001001000050042771601300180300373003728264328745101002001000020010000300373003711102011009910010010000100000007101161129633100001003003830038300383003830038
10204300372250000361295472510100100100001001000050042771601300180300373003728264328745101002001000020010000300373003711102011009910010010000100000007101161129633100001003003830038300383003830038
10204300372250000961295472510100100100001001000050042771601300180300373003728264328745101002001000020010000300373003711102011009910010010000100000007101161129633100001003003830038300383003830038
1020430037224000013261295472510100100100001001000050042771601300180300373003728264328745101002001000020010164300853003711102011009910010010000100000007101161129633100001003003830038300383003830038
10204300372250000661295472510100100100001001000050042771601300180300373003728264328745101002001000020010000300373003711102011009910010010000100000007101161129633100001003003830038300383003830038
102043003722500002761295472510100100100001001000050042771601300180300373003728264328745101002001000020010000300373003711102011009910010010000100010007101161129633100001003003830038300383003830038
102043003722400002461295472510100100100001001000050042771601300180300373003728264328745101002001000020010000300373003711102011009910010010000100000007101161129699100001003003830038300383003830038
10204300372250000361295472510100100100001001000050042771601300180300373003728264328745101002001000020010000300373003711102011009910010010000100000007101161129633100001003003830038300383003830038
102043003722500001561295472510100100100001001000050042771601300180300373003728264328745101002001000020010000300373003721102011009910010010000100000007101161129633100001003003830038300383003830038

1000 unrolls and 10 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)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)9fa0a1a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722500000006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100000006402162229629010000103003830038300383003830038
1002430037225000000053629547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100000006402162229629010000103003830038300383003830038
100243003722500000006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100000006402162229629010000103003830038300383003830038
100243003722400000006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100000006402162229629010000103003830038300383003830038
100243003722500000006129547251001010100001010000504277160030018300373007028286328767100102010000201000030037300371110021109101010000100000006402162229629010000103003830038300383003830038
100243003722500000006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100000006402162229629010000103003830038300383003830038
100243003722500000006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100000006402162229629010000103003830038300383003830038
10024300372250000000612954725100101010000101000050427716003001830037300372830727288981106725111522211141303673035481100211091010100001020041964007693953329865410000103032330368303693035830369
10024303692281177804616039642948415310080151004812110507142866240302703036630371283163128879110662610000201098330370303577110021109101010000100210306402162229629010000103037030370303713035730368
1002430355227007792761605171294841791006113100561411050934285272030126304153036628313372890011215241131824114753045330464101100211091010100001000002506508123895229977410000103046330414304173041430417

Test 3: throughput

Count: 8

Code:

  frintx h0, h8
  frintx h1, h8
  frintx h2, h8
  frintx h3, h8
  frintx h4, h8
  frintx h5, h8
  frintx h6, h8
  frintx h7, h8
  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)030b18191e1f3f51inst 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)9fa8c2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042004915000090302580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000011151181160020036800001002004020040200402004020040
802042003915000052803025801081008000810080020500640132120020200392003999776100158012020080032200800322003920039118020110099100100800001000011151180160020036800001002004020040200402004020040
802042003915000000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000011151180160020036800001002004020040200402004020040
8020420039150000150302580108100800081008002050064013212002020039200399977699908012820080038200800382004820048118020110099100100800001000022251281231120046800001002004920049200492005020049
80204200491500003360642680116100800161008002850064019602002920048200499976999868012820080038200800382004820048118020110099100100800001000022251291231120045800001002005020049200492005020049
8020420048151000270642780116100800161008002850064019602002920048200489976999868012820080038200800382004920049118020110099100100800001000022251291231120045800001002004920050200492004920049
80204200481510302106427801161008001610080028500640196020029200482004999761099868012820080038200800382004820048118020110099100100800001000022251291231120045800001002004920049200502004920049
802042004815100000642780116100800161008002850064019602002920048200499976999868012820080038200800382004920048118020110099100100800001000022251291231120045800001002005020049200492004920049
8020420049150000180302580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000011151180160020036800001002004020040200402004020040
8020420039150000210302580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000011151180160020036800001002004020040200402004020040

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)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)9fa1a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
800242005115001508225800101080000108000050640000020020200392003999963100198001020800002080000200392003911800211091010800001020005020116112003680000102004020040200402004020040
8002420039150019204025800101080000108000050640000020020200392003999963100198001020800002080000200392003911800211091010800001001035020116112003680000102004020040200402004020040
8002420039150017108225800101080000108000050640000020020200392003999963100198001020800002080000200392003911800211091010800001001035020116112003680000102004020040200402004020040
800242003915001208225800101080000108000050640000020020200392003999963100198001020800002080000200392003911800211091010800001001035020116112003680000102004020040200402004020040
8002420039150015004025800101080000108000050640000020020200392003999963100198001020800002080000200392003911800211091010800001001035020116112003680000102004020040200402004020040
8002420039150024908225800101080000108000050640000020020200392003999963100198001020800002080000200392003911800211091010800001002035020116112003680000102004020040200402004020040
8002420039150024604025800101080000108000050640000020020200392003999963100198001020800002080000200392003911800211091010800001001005020116112003680000102004020040200402004020040
800242003915002708225800101080000108000050640000020020200392003999963100198001020800002080000200392003911800211091010800001001035020116112003680000102004020040200402004020040
8002420039150015008225800101080000108000050640000020020200392003999963100198001020800002080000200392003911800211091010800001001035020116112003680000102004020040200402004020040
8002420039150027308225800101080000108000050640000020020200392003999963100198001020800002080000200392003911800211091010800001001035020116112003680000102004020040200402004020040