Apple M1 Microarchitecture Research by Dougall Johnson

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

FRINTA (vector, 4H)

Test 1: uops

Code:

  frinta v0.4h, v0.4h
  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)a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
100430372306125472510001000100039816013018303730372414328951000100010003037303711100110000073316332629100030383038303830383038
1004303723034425472510001000100039816013018303730372414328951000100010003037303711100110000073316332629100030383038303830383038
100430372306125472510001000100039816003018303730372414328951000100010003037303711100110000073316332629100030383038303830383038
10043037230290254725100010001000398160130183037303724143289510001000100030373037111001100043373316332629100030383038303830383038
1004303723012825472510001000100039816003018303730372414328951000100010003037303711100110000073316332629100030383038303830383038
100430372306125472510001000100039816003018303730372414328951000100010003037303711100110000073316322629100030383038303830383038
1004303722186125472510001000100039816003018303730372414328951000100010003037303711100110000073316332629100030383038303830383038
1004303723015625472510001000100039816003018303730372414328951000100010003037303711100110001073316332629100030383038303830383038
100430372306125472510001000100039816003018303730372414328951000100010003037303711100110000073316332629100030383038303830383038
100430372306125472510001000100039816003018303730372414328951000100010003037303711100110001373316332629100030383038303830383038

Test 2: Latency 1->2

Code:

  frinta v0.4h, v0.4h
  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)0304181e1f3f4e51inst 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)9fa8a9acc5cfd5d6ddinst fetch restart (de)e0? int output thing (e9)ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037233100061295472510100100100001001000050042771601300183003730037282643287451010020010000200100003003730037111020110099100100100001000000710116112963300100001003003830038300383003830038
10204300372330012061295472510100100100001001000050042771601300183003730037282643287451010020010000200100003003730037111020110099100100100001000000710116112963300100001003003830038300383003830038
1020430037233000093295472510100100100001001000050042771600300183003730037282643287451010020010000200100003003730037111020110099100100100001001030710116112963300100001003003830038300383003830038
10204300372320000104295472510100100100001001000050042771601300183003730037282643287451010020010000200100003003730037111020110099100100100001000000710116112977200100001003003830038300383003830038
10204300372320000422295472510100100100001001000050042771600300183003730037282643287451010020010000200100003003730037111020110099100100100001000000710116112963300100001003003830038300383003830038
1020430037232000061295472510100100100001001000050042771600300183003730037282643287451010020010000200100003003730037111020110099100100100001000000710116112963300100001003003830038300383003830038
1020430037233000061295472510100100100001001000050042771600300183003730037282643287451010020010000200100003003730037111020110099100100100001000000710116112963300100001003003830038300383003830038
1020430037233000061295472510100100100001001000050042771600300183003730037282643287451010020010000200100003003730037111020110099100100100001000000710116112963300100001003003830038300383003830038
10204300372330000103295472510100100100001001000050042771600300183003730037282643287451010020010000200100003003730037111020110099100100100001001000710116112977700100001003003830038300383003830038
10204300372330000536295472510100100100001001000050042771600300183003730037282643287451010020010000200100003003730037111020110099100100100001000000710116112963300100001003003830038300383003830038

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)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)9d9fa0a1a6a7a8a9acc2c5branch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037242000015031929547251001010100321010000504277160030018030037300372828632876710010201000020100003003730037111002110910101000001000000000006402162229629010000103003830038300383003830038
1002430037241000030164729547251001010100001010000504277160030018030037300372828632876710010201000020100003003730037111002110910101000001000000000006402162229629010000103003830038300383003830038
100253003723800000080729547251001010100001010000504277160030018030037300372828632876710010201000020100003003730037111002110910101000001000000000006402162229629010000103003830038300383003830038
10024300372390000801132123429547251001010100001010000504277160030018030037300372828632876710010201000020100003003730037111002110910101000001000000000006402162229629010000103003830038300383003830038
100243003724100000044729547251001010100001010000504277160030018030037300372828632876710010201000020100003003730037111002110910101000001000001000006402162229629010000103008630074301773018230038
100243012124211037924402768295026210055121002416106005042771601301260302723032228292122880410163201000022100003003730179411002110910101000001000220000106402332229629010000103003830038300853003830083
1002430037241000038882329547251001010100001010000504277160130018030037300372828632876710010221000020100003003730084111002210910101000001000000000116402162229673010000103003830038300853003830038
100253003724100000058229529251001010100001010000504277160030018030037300372828632876710010201000020100003003730037111002110910101000001000001601440006402162229629210000103003830038300383003830038
1002430037241000000478295472510010101000710100005042771600300180300373003728287222876710010201018020100003003730037111002110910101000001000000000006402162229629010000103003830038300383003830038
1002430037242000000420295472510010101000012100005042771600300180300373003728286328767101592010000201000030037300372110021109101010000010000000270006402162129629010000103003830038300383008530038

Test 3: throughput

Count: 8

Code:

  frinta v0.4h, v8.4h
  frinta v1.4h, v8.4h
  frinta v2.4h, v8.4h
  frinta v3.4h, v8.4h
  frinta v4.4h, v8.4h
  frinta v5.4h, v8.4h
  frinta v6.4h, v8.4h
  frinta v7.4h, v8.4h
  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)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)9fa0a8a9acc2c5branch mispredict (cb)cdcficache miss (d3)d5d6daddinst fetch restart (de)e0eb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042005815503025801081008000810080020500640132120020020039200399977699908012020080032200800322003920039118020110099100100800001000000011151180116000200360800001002004020040200402004020040
802042003915003025801081008000810080020500640132020020020039200399977699908012020080032200800322003920039118020110099100100800001000000011151180016000200360800001002004020040200402004020040
8020420039150069525801081008000810080020500640132120020020039200399977999908012020080032200800322003920039118020110099100100800001004000011151180016000200360800001002004020040200402004020040
802042003915003025801081008000810080020500640132020020020039200399977699908012020080032200800322003920039118020110099100100800001000200011151180016000200360800001002004020040200402004020040
802042003915003025801081008000810080020500640132120020020039200399977699908012020080032200800322003920039118020110099100100800001000000011151180016000200360800001002004020040200402004020040
802042003915003025801081008000810080020500640132020020020039200399977699908012020080032200800322003920039118020110099100100800001000000011151180016000200360800001002004020040200402004020040
802042003915003025801081008000810080020500640132020020020039200399977699908012020080032200800322003920039118020110099100100800001000000011151180016000200360800001002004020040205682004020040
802042003916103025801081008000810080020500640132020020020039200399977699908012020080032200800322003920039118020110099100100800001000000011151180016000200360800001002004020040200402004020040
802042003915003025801081008000810080020500640132120020020039200399977699908012020080032200800322003920039118020110099100100800001000000011151180016000200360800001002004020040200402004020040
802042003915003025801081008000810080020500640132120020020039200399977699908012020080032200800322003920039118020110099100100800001000000011151180016000200360800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030b1e3f51inst 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)9fa0a1a8a9accfd2d5d6ddinst fetch restart (de)e0ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80024200511550040258001010800001080000506400000020020200392003999963100198001020800002080000200392003911800211091010800001000000502007165320036080000102004020040200402004020040
80024200391550040258001010800001080000506400000020020200392003999963100198001020800002080000200392003911800211091010800001000000502003165320036080000102004020040200402004020040
800242003915501240258001010800001080000506400000020020200392003999963100198001020800002080000200392003911800211091010800001000000502005165320036080000102004020040200402004020040
80024200391550040258001010800001080000506400000020020200392003999963100198001020800002080000200392003911800211091010800001000000502003163520036080000102004020040200402004020040
80024200391560040258001010800001080000506400000020020200392003999963100198001020800002080000200392003911800211091010800001000000509103275520036080000102004020040200402004020040
80024200391550040258001010800001080000506400000020020200392003999963100198001020800002080000200392003911800211091010800001000000502005165320036080000102004020040200402004020040
80024200391560040258001010800001080000506400000020020200392003999963100198001020800002080000200392003911800211091010800001000000502003165520036080000102004020040200402004020040
80024200391560082258001010800001080000506400000020020200392003999963100198001020800002080000200392003911800211091010800001022021105502009165320036080000102009320040200402004020040
80024200391551040258001010800001080208506400000020085201002003999963100198001020800002080000200392034311800211091010800001000000502008165520036080000102004020040200402004020040
80024200391550040258001010800001080000506400000020020200392003999963100198001020800002080000200392003911800211091010800001000000502004165320036080000102004020040200402004020040