Apple M1 Microarchitecture Research by Dougall Johnson

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

SQDMULL (vector, 4S)

Test 1: uops

Code:

  sqdmull v0.4s, v0.4h, v1.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)03191e1f3f4e51inst 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)a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004303724090612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037241300612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303725000612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303725000612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303724000612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303724000612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037250120612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303725000612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303724000612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230150612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038

Test 2: Latency 1->2

Code:

  sqdmull v0.4s, v0.4h, v1.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)0304080b18191e1f3f4e51inst 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)6061696d6edispatch 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)9fa7a9acbranch mispredict (cb)cdcfd0d5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722510000006129548251010010010000100100005004277313153001830037300372826532874510100200100002002000030037300371110201100991001001000010000000710521622296340100001003003830038300383003830038
102043003722500000006129548251010010010000100100005004277313153001830037300372826532874510100200100002002000030037300371110201100991001001000010000000710521622296340100001003003830038300383003830038
102043003722500000006129548251010010010000100100005004277313153001830037300372826532874510100200100002002000030037300371110201100991001001000010000000710521622296340100001003003830038300383003830038
102043003722400100006129548251010010010000100100005004277313153001830037300842827432874510100204100002002000030037300371110201100991001001000010000000710521622296340100001003003830038300383003830038
102043003722500000006129548251010010010000100100005004277313153001830037300372826532874510100200100002002000030037300371110201100991001001000010000000710521622296340100001003003830038300383003830038
102043003722500000006129548251010010010000100100005004277313153001830037300372826532874510253200100002002000030037300371110201100991001001000010000300710521622296340100001003003830038300383003830038
102043003722400000006129548251010010010000100100005004277313153001830037300372826532874510100200100002002000030037300371110201100991001001000010000000710521622296340100001003003830038300383003830038
102043003722400000006129548251010010010000100100005004277313153001830037300372826532874510100200100002002000030037300371110201100991001001000010000000710521622296340100001003003830038300383003830038
102043003722401000006129548251010010010000100100005004277313153001830037300372826532874510100200100002002000030037300371110201100991001001000010000001710521622296340100001003003830038300383003830038
102043003722500000006129548251010010010000100100005004277313153001830037300372826532874510100200100002002000030037300371110201100991001001000010000000710521622296340100001003003830038300383003830038

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)9fa1a6a7a8a9acc2c5cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250000006129548251001010100001010000504277313030018300373003728287032876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
10024300372240000006129548251001010100001010000504277313030018300373003728287032876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
10024300372250100006129548251001010100001010000504277313130018300843003728287032876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
10024300372250000006129548251001010100001010000504277313030018300373003728287032876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
10024300372250000006129548251001010100001010000504277313130018300373003728287032876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
10024300372250000006129548251001010100001010000504277313030018300373003728287032876710010201017020200003003730037111002110910101000010000000007686653529881210000103017930367303703037130373
1002430226227005692461645332947610010052141004812108948142868120302703036630367283160312889611059221115120222763035630417911002110910101000010400125510207914736429880410000103036930367304183037030370
10024300372250001001032953925100101010000101000050428545503027030366303222831102828878109042011142202195230322303697110021109101010000102311019435007928734729884310000103037230322303633035530419
1002430370228107793935246322948514010068141005614111926642881690303423041730413283240442890911357241130922228423041830414911002110910101000010000000408304646429774310000103013230416304173041630453
1002430455228116101452880644529458200100871710080121074565428952603037830542303712833102428970114803211619322296430508305449110021109101010000102001227858006402166529846310000103032030439302753037030323

Test 3: Latency 1->3

Code:

  sqdmull v0.4s, v1.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)03091e3a3f4e51inst 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)9fa7a8accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722500061295482510100100100001001000050042773131300180300373003728265328745101002001000020020000300373003711102011009910010010000100007271011611296340100001003003830038300383003830038
10204300372240006129548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000371011611296340100001003003830038300383003830038
102043003722500061295482510100100100001001000050042773130300180300373003728265328745101002001000020020000300373003711102011009910010010000100001571011611296340100001003003830038300383003830038
10204300372250006129548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372250006129548251010010010000100100005004277313030018030037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225012072629548441011410010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000671011611296340100001003003830038300383003830038
102043003722500066295482510100100100001001000050042773130300180300373003728265328745101002001000020020000300373003711102011009910010010000100002171011611296340100001003003830038300383003830038
1020430037225000612954825101001001000010010000500427731303001803003730037282653287451010020010000200200003003730037111020110099100100100001000010871011611296340100001003003830038300383003830038
10204300372250008229548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000671011611296340100001003003830038300383003830038
1020430037225000612954825101001001000010010000500427731303001803003730037282653287451010020010000200200003003730037111020110099100100100001000017171011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)030809191e1f3f4e51inst 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)9fa8a9acc2branch mispredict (cb)cfd5d6ddinst fetch restart (de)e0ec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722500000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630110000103003830038300383003830038
100243003722500000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
100243003722500000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
100243003722500000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010003006402162229630010000103003830038300383003830038
100243003722500000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
100243003722500000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
100243003722500000612953025100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010006006402162229630010000103003830038300383003830038
100243003722400000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
100243003722400000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
100243003722500000612953925100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  sqdmull v0.4s, v8.4h, v9.4h
  sqdmull v1.4s, v8.4h, v9.4h
  sqdmull v2.4s, v8.4h, v9.4h
  sqdmull v3.4s, v8.4h, v9.4h
  sqdmull v4.4s, v8.4h, v9.4h
  sqdmull v5.4s, v8.4h, v9.4h
  sqdmull v6.4s, v8.4h, v9.4h
  sqdmull v7.4s, v8.4h, v9.4h
  movi v8.16b, 9
  movi v9.16b, 10

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03080b18191e3f51inst 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)9fa0a1a6a8acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042004815000000832580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100002034511061611200360800001002004020040200402004020040
8020420039150000001522580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100000130511021611200360800001002004020040200402004020040
802042003915000000412580100115800001008000050064000002002020039200399973399978010020080000200160000200932003911802011009910010080000100000030511011611200360800001002004020040200402004020040
8020420039153000004125801001008000010080000500640000120020200392003999733999780100200800002001600002003920039118020110099100100800001000000120511011611200360800001002004020040200402004020040
8020420039150000012412580100100800001008000050064000002002020039200399973399978010020080000200160000200392003911802011009910010080000100000090511011611200360800001002004020040200402004020040
802042003915000000832580100100800001008000050064000002002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511011611200360800001002004020040200402004020040
802042003915000000321925801001008000010080000500640000020020200392003999733999780100200800002001600002003920039118020110099100100800001000000510511011611200360800001002004020040200402004020040
8020420039150110030412580100100800001008000050064000002002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511011611200360800001002004020040200402004020040
802042003915000000412580100100800001008000050064242002002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511011621200360800001002004020040200402004020040
8020420039150000003262580100100800001008000050064000002002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511011611200360800001002004020040200402004020040

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)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)9fa1a8accfd2d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420039150040258001010800001080000506400001200202003920039999631001980010208000020160000200392003911800211091010800001000350200516442003680000102004020040200402004020040
8002420039150040258001010800001080000506400001200202003920039999631001980010208000020160000200392003921800211091010800001000650200316432003680000102004020040200402004020040
8002420039150040258001010800001080000506400001200202003920039999631001980010208000020160000200392003911800211091010800001000050200416432003680000102004020040200402004020040
80024200391502440258001010800001080000506400001200202003920039999631001980010208000020160000200392003911800211091010800001000050200416442003680000102004020040200402004020040
8002420039150040258001010800001080000506400001200202003920039999631001980010208000020160000200392003911800211091010800001000050200416342003680000102004020040200402004020040
8002420039150040258001010800001080000506400001200202003920039999631001980010208000020160000200392003911800211091010800001000050200416332003680000102004020040200402004020040
800242003915004025800101080000108000050640000020020200392003999963100198001020800002016000020039200391180021109101080000100012950200316432003680000102004020040200402004020040
80024200391500402580010108000010800005064000012002020039200399996310019800102080000201600002003920039118002110910108000010005750200316342003680000102004020040200402004020040
8002420039150040258001010800001080000506400000200202003920039999631001980010208000020160000200392003911800211091010800001000050200316432003680000102004020040200402004020040
8002420039150061258001010800001080000506400001200202003920039999631001980010208000020160000200392003911800211091010800001010050200316432003680000102004020040200402004020040