Apple M1 Microarchitecture Research by Dougall Johnson

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

SQRSHRUN (2D)

Test 1: uops

Code:

  sqrshrun v0.2s, v0.2d, #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)03080918191e1f3f4e51inst 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
10043037220000006125472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
100430372300000015625472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
10043084230000006125472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
10043037230000006125472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
10043037220000006125472510001000100039816013018303730372414328951000100010003037303711100110000373116112629100030383038303830383038
10043037230000006125472510001000100039816003018303730372414328951000100010003037303711100110000373116112629100030383038303830383038
10043037230000006125472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
10043037230100006125472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
10043037230000006125472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
10043037230000006125472510001000100039816003018303730372414328951000100010003037303711100110000073116112629100030383038303830383038

Test 2: Latency 1->2

Code:

  sqrshrun v0.2s, v0.2d, #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)0308090b18191e1f3a3f4e51inst 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)696b6d6edispatch 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 fp/simd store (99)inst neon or fp (9a)9fa0a1a6a8acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)eb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722500000150061295472510100100100001001000050042771603001803003730037282643287451010020010000200100003003730037111020110099100100010000100000000710116112963300100001003003830038300383003830038
1020430037225000000006129547251010010010000100100005004277160300180300373003728267728782101002001000020010000300853013321102011009910010001000010022012224529351972129991450100001003046630322303243056130562
1020430607236010121010566162565329439293102621561009615911950789429338430414030466301782830548289681180823411496222118143060730322811020110099100100010000100420035975288611372130065390100001003070930695301823022830466
10204304652670111012924704057922946623310224148100721541100278142866243030603041730408283075828984113472241182123411156307063066091102011009910010001000010020201993009491591130030340100001003013530317302763042530604
102043003723411045156440041062953825101001001004013811950749429203230450030645305162829638289101158523811321234121523046630467101102011009910010001000010000001672007101161229993340100001003061630658304553046830038
10204300372330000001080441295472510100100100001001000050042771603001803003730037282643287451010020410000200100003003730037111020110099100100010000100000030710116112963300100001003003830038300383003830038
10204300372250000000061295472510100100100001001000050042771603001803003730037282643287451010020010000200100003003730037111020110099100100010000100000000710116112963300100001003003830038300383003830038
10204300372250000000061295472510100100100001001000050042771603001803003730037282643287451010020010000200100003003730037111020110099100100010000100000000710116112963300100001003003830038300383003830038
102043003722500000000103295472510100100100001001000050042771603001803003730037282643287451010020010000200100003003730037111020110099100100010000100000000710116112963300100001003022930038300383003830038
10204300372330000030061295472510100100100001001000050042771603001803003730037282649287451010020210000200100003003730037111020110099100100010000100000262710116112963300100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03081e3f4e51inst 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)9fa8accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722500612954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010006403162229629010000103003830038300383003830038
100243003722500612954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010006402162229629010000103003830038300383003830038
100243003722500612954725100101010000101000050427716003001830037300842828632876710010201000020100003003730037111002110910101000010006402162229629010000103017930038300843003830038
100243003722500612954725100101010000101000050427716013001830037300372828632876710010201000020100003003730037111002110910101000010006402162229629010000103003830038300383003830038
100243003722400612954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010006402162229629010000103003830038300383003830038
1002430037225004412954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010406402162229629110000103003830038300383003830038
100243003722500612954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010006402162229629010000103003830038300383003830038
100243003722500612954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010006402162229629010000103013430038300383003830038
100243003722500612954725100101010000101000055427716003001830037300372828632876710010201000020100003003730037111002110910101000010006402162229629010000103003830038300383003830038
100243003722500612954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010006402162229629010000103003830038300383003830038

Test 3: throughput

Count: 8

Code:

  sqrshrun v0.2s, v8.2d, #3
  sqrshrun v1.2s, v8.2d, #3
  sqrshrun v2.2s, v8.2d, #3
  sqrshrun v3.2s, v8.2d, #3
  sqrshrun v4.2s, v8.2d, #3
  sqrshrun v5.2s, v8.2d, #3
  sqrshrun v6.2s, v8.2d, #3
  sqrshrun v7.2s, v8.2d, #3
  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)03090b18191e1f3f51inst 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)9fa0a1a6a8acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80204200391500000003025801081008000810080020500640132020020200392003999776999080120200800322008003220039200391180201100991001008000010000000011151181160020036800001002004020040200402004020040
80204201151500000003025801081008000810080020500640132020020200392003999776999080120200800322008003220039200391180201100991001008000010000000011151180160020036800001002004020040200402004020040
80204200391500000003025801081008000810080020500640132020020200392003999776999080120200800322008003220039200391180201100991001008000010000000011151180160020036800001002004020040200402004020040
80204200391500000003025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010000000011151180160020036800001002004020040200402004020040
80204200391500000003152580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000102011151180160020036800001002004020040200402004020040
80204200391500000003025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010040000011151180160020036800001002004020040200402004020040
80204200391500000003025801081008000810080020500640132020020200392003999776999080120200800322008003220039200391180201100991001008000010000000011151180160020036800001002004020040200402004020040
80204200391500000003025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010000000011151180160020036800001002004020040200402004020040
80204200391500000003025801081008000810080020500640132120020200392003999776999080120200800322008003220039200391180201100991001008000010000000011151180160020036800001002004020040200402004020040
80204200391500000003025801081008000810080020500640132020020200392003999776999080120200800322008003220039200391180201100991001008000010000000011151180160020036800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03090b18191e1f3f51inst 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)9fa0a1a6a8a9acc5branch mispredict (cb)cficache miss (d3)d5d6ddinst fetch restart (de)e0ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420039150000065709222580010108000010800005064000012002002003920039999631001980010208000020800002003920039118002110910108000010000000005020071646200366980000102004020040200402004020040
8002420039150000000452580010108000010800005064000012002002003920039999631001980010208000020800002003920039118002110910108000010000000005020061657200364980000102004020040200402004020040
8002420039150000000402580010108000010800005064000012002002003920039999631001980010208000020800002003920039118002110910108000010000000005020061657200364780000102004020040200402004020040
8002420039150000000402580010108000010800005064000012002002003920039999631001980010208000020800002003920039118002110910108000010000000005054071646200368080000102004020040200402004020040
8002420039150000000402580010108000010800005064000012002002003920039999631001980010208000020800002003920039118002110910108000010000000005020061664200366880000102010320040200402004020040
8002420039150000000402580010108000010800005064000012002002003920039999631001980010208000020800002003920039118002110910108000010000000005020041666200364880000102004020040200402004020040
8002420039150000000402580010108000010800005064000012002002003920039999631001980010208000020800002003920039118002110910108000010000100005020061666200364980000102004020040200402004020040
8002420039150000000402580010108000010800005064000012002002003920039999631001980010208000020800002003920039118002210910108000010000000105020041666200365080000102004020040200402004020040
80024200891500000007052580010108000010800005064000012002002003920039999631001980010208000020800002003920039118002110910108000010000000005045071676200364780000102004020040200402004020040
8002420039150000000402580010108000010800005064000012002002003920039999631001980010208000020800002003920039118002110910108000010000000005020061664200364780000102004020040200402004020040