Apple M1 Microarchitecture Research by Dougall Johnson

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

SQDMULH (scalar, S)

Test 1: uops

Code:

  sqdmulh s0, s0, s1
  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)03181e3f4e51inst 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
1004303722006125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230010325482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723006125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303722006125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723006125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303722036125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723006125482510001000100039831313018303730372415328951000100020003037303711100110007073116112630100030383038303830383038
1004303722006125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723006125482510001000100039831303018303730372415328951000100020003037303711100110003373116112630100030383038303830383038
1004303722006125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038

Test 2: Latency 1->2

Code:

  sqdmulh s0, s0, s1
  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)030b191e3f4e51inst 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)9fa8a9accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722400917029548251010010010000100100005004277313030018300373003728265032874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225001595729548251010010010000100100005004277313130018300373003728265032874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225000105429548251010010010000100100005004277313130018300373003728265032874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
102043003722500098029548251010010010000100100005004277313130018300373003728265032874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372250006129548251010010010008100100005004277313130018300373003728265032874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225000107129548251010010010000100100005004277313130018300373003728265032874510100200100002002000030037300371110201100991001001000010000671011611296340100001003003830038300383003830038
10204300372250006129548251010010010000100100005004277313130018300373003728265032874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372330006129548251010010010000100100005004277313130018300373003728265032874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225000101529548251010010010000100100005004277313130018300373003728265032874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372250006129548251010010010000100100005004277313030018300373003728265032874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)0308090a0b18191e1f3f4e51inst 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)9fa0a1a6a7a8acc2branch mispredict (cb)cfd0icache miss (d3)d5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003724100000000612953025100101010000101000050427731310300183003730037282873287671001020100002020000300373003711100211091010100001000001000640002172229630010000103003830038300853003830038
1002430037241000000604352954825100101010000101000050427731300300183003730037283053287671001020100002020000300373003711100211091010100001000002300640002162229630010000103008530038300383003830038
1002430037241000000006129548251001010100001010000504277797003001830037300372828732876710010201000020200003008330037111002110910101000010000035300640002162329668010000103003830038300383003830038
1002430037243000000120612954825100101010000101044750427731310300183003730037282873287671001020100002020000300373003711100211091010100001000001900640002162229630010000103003830038300383003830038
100243003723300000000612954825100101010000101000050427731300300183003730037282873287671001020100002020000300373003711100211091010100001000007000640002162229630010000103003830038300383003830038
100243003722500000000612954825100101010000101000050427731300300183003730037282873287671001020100002020000300373003711100211091010100001000006000640002162229699010000103003830038300383003830038
1002430037225000000006129548251001010100001010000504277313003001830037300372828732876710010201000020200003003730037111002110910101000010000009600640002162229630010000103003830038300383003830038
1002430228228011199132088071652944918010091121008812115477642922400030270304133041228312362891211057201119820226063036830366811002110910101000010400012151220787002992729917210000103036930419303673036830275
10024304192270000001320612954825100101510040101000050427731300300183041530415283184028920113592011470202231030463304621011002110910101000010040103050440787002893529899210000103036830370303733040430369
1002430369228011178111363246632948516110069151005617105967142868941030018300373003728287328767100102010000202000030037300371110021109101010000100000247200640002162229630010000103003830086300383003830038

Test 3: Latency 1->3

Code:

  sqdmulh s0, s1, s0
  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)03090b181e3a3f4e51inst 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)9fa1a6a8accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250000057729548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
10204300372250000010529548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
1020430037224000006129548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
1020430037224000008429548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
102043003722500000167329548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
10204300372250000095029548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
10204300372250001206129548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
10204300372250000017029548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
10204300372250000025529548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296320100001003003830038300383003830038
10204300372250000014929548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)031e3a3f4e51inst 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)9fa1a8acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722500212295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006403163329630010000103003830038300383003830038
10024300372250084295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006403163329630010000103003830038300383003830038
100243003722500212295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006403163329650010000103003830038300383003830038
10024300372240061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006403163329630010000103003830038300383003830038
100243003722590191295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006403163329630010000103003830038300383003830038
100243003722500316295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006403163329683010000103003830038300383003830038
10024300372250061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006403163329630010000103003830038300383003830038
100243003722500505295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006403163329630010000103003830038300383003830038
100243003722500170295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006403163329630010000103003830038300383003830038
10024300372250082295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006403163329630010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  sqdmulh s0, s8, s9
  sqdmulh s1, s8, s9
  sqdmulh s2, s8, s9
  sqdmulh s3, s8, s9
  sqdmulh s4, s8, s9
  sqdmulh s5, s8, s9
  sqdmulh s6, s8, s9
  sqdmulh s7, s8, s9
  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)033f51inst 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)9fa8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8020420060150412580100100800001008000050064000020020200392003999733999780100200800002001600002003920039118020110099100100800001000051103161120036800001002004020040200402004020040
80204200391507942580100100800001008000050064000020020200392003999733999780100200800002001600002003920039118020110099100100800001000051101161120036800001002004020040200402004020040
8020420039150412580100100800001008000050064000020020200392003999733999780100200800002001600002003920039118020110099100100800001000051101161120036800001002004020040200402004020040
8020420039150412580100100800001008000050064000020020200392003999733999780100200800002001600002003920039118020110099100100800001000051101161220036800001002004020040200402004020040
8020420039150412580100100800001008000050064000020020200392003999733999780100200800002001600002003920039118020110099100100800001000051101161120036800001002004020040200402004020040
8020420039150412580100100800001008000050064000020020200392003999733999780100200800002001600002003920039118020110099100100800001000051101161120036800001002004020040200402004020040
8020420039150412580100100800001008000050064000020020200392003999733999780100200800002001600002003920039118020110099100100800001000051103161120036800001002004020040200402004020040
8020420039150412580100100800001008000050064000020020200392003999733999780100200800002001600002003920039118020110099100100800001000051101161120036800001002004020040200402004020040
8020420039150412580100100800001008000050064000020020200392003999733999780100200800002001600002003920039118020110099100100800001000051101161120036800001002004020040200402004020040
80204200391508822580100100800001008000050064000020020200392003999733999780100200800002001600002003920039118020110099100100800001000051101161120036800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0318191e1f3f51inst 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)9fa8a9accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
800242004015000008225800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000050201168620036080000102004020040200402004020040
800242003915000004025800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000050203163320036080000102004020040200402004020040
800242003915000004025800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000050203166320036080000102004020040200402004020040
800242003915000004025800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000050203163320036080000102004020040200402004020040
800242003915000004025800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000050201164620036080000102004020040200402004020040
8002420039150000035325800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000050203165320036080000102004020040200402004020040
8002420039150000036425800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000050203165620036380000102004020040200402004020040
80024200391501101966325801071080192128000050640000203572004120098100058100478011020800002016000020039200391180021109101080000100451550203163320036080000102004020040200402004020040
800242003915000304025800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000050203163520036080000102004020040200402004020040
800242003915000004025800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000050202163320036080000102004020040200402004020040