Apple M1 Microarchitecture Research by Dougall Johnson

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

SQRDMULH (vector, 2S)

Test 1: uops

Code:

  sqrdmulh v0.2s, v0.2s, v1.2s
  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)a6a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004303722061254825100010001000398313130183037303724153289510001000200030373037111001100000073216112630100030383038303830383038
1004303723061254825100010001000398313130183037303724153289510001000200030373037111001100000373116112630100030383038303830383038
1004303722061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303722061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303722061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303722061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303723061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
10043037230140254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303723061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303723061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038

Test 2: Latency 1->2

Code:

  sqrdmulh v0.2s, v0.2s, v1.2s
  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)031e1f3f4e51inst 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)9fa8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225006129548251010010010000100100005004277313130018300373003728272628740101002001000820020016300373003711102011009910010010000100001117170160029646100001003003830038300383003830038
10204300372250024629548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
10204300372252406129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100100007101161129634100001003003830038300383003830038
1020430037225006129548251010010010000100100005004277313130018300373013428265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
1020430037225006129548251010010010000100100005004277313130018300373003728265328745101002001018020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
10204300372253906129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
1020430037225006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
1020430037224006129548251010010010000100100005004277313130022300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
1020430037225006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
1020430037225006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)030b18191e1f3f4e51inst 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
1002430037225000006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
1002430037225000006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
100243003722500054306129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830084
100243003722400052506129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
1002430037225000006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
10024300372250000093529548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383008530038
100243003722500027025129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
10024300372250000072629548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
10024300372250000072629548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
10024300372250000072629530251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038

Test 3: Latency 1->3

Code:

  sqrdmulh v0.2s, v1.2s, v0.2s
  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)030b18191e3f4e51inst 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)696d6edispatch 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)9fa0a1a6a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722500012612954825101001001000010010000500427731330018300373003728266328745101002001033020020000300373003711102011009910010010000100000303071011611296680100001003003830038300383003830038
102043003722500012612954825101001001000010010000500427731330018300373003728265328745101002001000020020000300373003711102011009910010010000100000003071011611296340100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731330018300373003728265328745101002081000020020000300373003711102011009910010010000100000000271011611296340100001003022830038300383003830038
10204300372250000612954825101001001000010010000500427731330018300373003728265328745101002001000020020000300373003711102011009910010010000100000003071011611296340100001003003830038300383003830038
1020430037225000875362951925101001001000010010000500427731330018300373003728265328745101002001000020020000301813003711102011009910010010000100000000071011611296340100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731330018300373003728265328745101002001032920020000300373003711102011009910010010000100000100071011611296340100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731330018300373003728265328745101002001000020020000300373003711102011009910010010000100000006071011631296340100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731330018300373022528265328745101002001000020020000300373003711102011009910010010000100020006071011611296340100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731330018300373013228265328745101002001000020020000300373003711102011009910010010000100000003071011611296340100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731330018300373003728265328745101002001000020020000300373003711102011009910010010000100000006071011611296340100001003003830038300383003830038

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)9fa8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372240004202512954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010003640316222963010000103003830038300383003830038
100243003722500000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
100243003722500000662954825100101010007101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
100243003722500000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
100243003722500000612954825100101010000101000050427731303001830037302252828732876710010201000020200003003730037111002110910101000010000640316222963010000103003830038300383003830038
10024300372250000028262954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
100243003722500000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
100243003722500000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
100243003722400000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225000003462954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  sqrdmulh v0.2s, v8.2s, v9.2s
  sqrdmulh v1.2s, v8.2s, v9.2s
  sqrdmulh v2.2s, v8.2s, v9.2s
  sqrdmulh v3.2s, v8.2s, v9.2s
  sqrdmulh v4.2s, v8.2s, v9.2s
  sqrdmulh v5.2s, v8.2s, v9.2s
  sqrdmulh v6.2s, v8.2s, v9.2s
  sqrdmulh v7.2s, v8.2s, v9.2s
  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)031e1f3f51inst 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)9fa0a1a8acc5cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8020420060151004125801001008000010080000500640000120020020039200399973399978010020080000200160000200392003911802011009910010080000100000156051102161120036800001002004020040200942009220040
8020420092150004774480100100800001008000058464000012002002003920039997339997801002008000020016000020039200391180201100991001008000010000090051101161120036800001002004020040200402004020040
80204200391500041258010010080000100800006176400001200200200392003999733999780100200800002001600002003920039118020110099100100800001000023051101161120036800001002004020040200402004020040
80204200391500041258010010080000100800005006400001200200200392003999733999780100200800002001600002003920039118020110099100100800001000016051101161120036800001002004020040200402004020040
802042003915000412580100100800001008000050064000012002032003920039997339997801002008000020016000020039200391180201100991001008000010000118051101161120036800001002004020040200402004020040
802042003915000412580100100800001008000050064000012002002003920039997339997801002008000020016000020039200391180201100991001008000010000024051101161120036800001002004020040200402004020040
802042003915000412580100100800001008000050064000012002002003920039997339997801002008000020016000020039200391180201100991001008000010000099051101161120036800001002004020040200402004020040
8020420039150004125801001008000011580000500640000120020020039200399973399978010020080000200160000200392003911802011009910010080000100000129051101161120036800001002004020040200402004020040
80204200391490083258010010080000100800005006400001200200200392003999733999780100200800002001600002003920039118020110099100100800001000010051101161120036800001002004020040200402004020040
802042003915090832580100100800001008000050064000012002002003920039997339997801002008000020016000020039200391180201100991001008000010000093051101161120036800001002010020145201482004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03080b18191e1f3f51inst 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)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)9fa0a1a6a8accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80024200391500000004025800101080000108000050640000002002020039200399996031001980010208000020160000200392003911800211091010800001000007850203162220036080000102004020040200402004020040
80024200391500000002312580010108000010800005064000000200202003920039999603100198001020800002016000020039200391180021109101080000100000350202162220036080000102004020040200402004020040
8002420039150000000402580010108000010800005064000000200202003920039999603100198001020800002016000020039200391180021109101080000100000050202162220036080000102004020040200402004020040
80024200391500000004025800101080000108000050640000002002020039200399996031001980010208000020160000200392003911800211091010800001000013050202162220036080000102004020040200402004020040
8002420039150000000402580010108000010800005064000001200202003920039999603100198032920800002016000020039200391180021109101080000100000050202162220036080000102004020040200402004020040
8002420039149000000402580010108000010800005064000001200202003920039999603100198001020800002016000020039200391180021109101080000100001350202162220036080000102004020040200402004020040
8002420039150000000402580010108000010800005064000000200202003920039999603100198001020800002016000020039200391180021109101080000100000050202162220036080000102004020040200402004020040
8002420039150000000402580010108000010800005064000000200202003920039999603100198001020800002016000020039200391180021109101080000100000050202162220036080000102004020040200402004020040
8002420039150000000402580010108000010800005064000000200202003920039999603100198001020800002016000020039200391180021109101080000100000350562162220036080000102004020040200402004020040
8002420039150000015061117802061180486118042160640000002018120194200399996021101558032520803162016084620141200395180021109101080000100020235850202162220036080000102004020040200402004020040