Apple M1 Microarchitecture Research by Dougall Johnson

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

SQRDMULH (scalar, S)

Test 1: uops

Code:

  sqrdmulh 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)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)a0a1a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10043037220612548251000100010003983131301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
10043037220612548251000100010003983131301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
10043037220612548251000100010003983130301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
100430372201032548251000100010003983131301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
10043037230612548251000100010003983131301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038

Test 2: Latency 1->2

Code:

  sqrdmulh 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)030b1e3f4e51inst 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)9fa8acc2branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225039061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011601296340100001003003830038300383003830038
102043003722504261295484610187132100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
1020430037225036061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
102043003722500187295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
1020430037225038461295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
1020430037224038761295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
1020430037225036661295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
1020430037225020161295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
10204300372250084295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
1020430037224033061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038

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)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)9fa1a6a8acc2cdcfd0d5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250000411061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000064002162229630010000103003830038300383003830038
10024300372250000321061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000064002162229630010000103003830038300383003830038
1002430037225000000251295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000064002162229630010000103003830038300383003830038
10024300372250000728861295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000064002162229630010000103003830038300383003830038
10024300372250000297061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000002078703722429906410000103036930357303213036730180
100243036722711679366164628295391591006216100481611043874286812130306303673040628299352889811058201115020222883036730369911002110910101000010200196452079403732429943610000103032030275303693036730038
10024300372250000006129548251001010100161010000504285455030270303663038828315342888010910221110424222623032030322711002110910101000010021194182078704733229873310000103036830371303693032330368
100243036822710761089792524829476203100441410072161126766428138403030630180305012831839288611135820100002020000300373003711100211091010100001002100064002162229630010000103003830038300383003830038
1002430037225000060612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010001000640682162229630010000103003830038300843003830038
100243003724100003030136295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000064002162229630010000103003830038300383003830038

Test 3: Latency 1->3

Code:

  sqrdmulh 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)031e3f4e51inst 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)9fa0a8accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722527612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
102043003722515612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
102043003722512612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
102043003722524612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
102043003722533612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372253667262954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225277262954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372252744129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100018071011611296340100001003003830038300383003830038
102043003722536612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225321612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03191e3f4e51inst 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)9fa8cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250368229548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100640416222963010000103003830038300383003830038
100243003722401026129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100640216222963010000103003830038300383003830038
1002430037225006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100640216222963010000103003830038300383003830038
100243003722501176129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100640216222963010000103003830038300383003830038
10024300372251576129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300372110021109101010000100640216222963010000103003830038300383003830038
100243003722404356129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100640216222963010000103003830038300383003830038
1002430037225023153629548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100640216222963010000103003830038300383003830038
100243003722501116129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100640216222963010000103003830038300383003830038
100243003722501176129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100640217222963010000103003830038300383003830038
1002430037225006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100640216222963010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  sqrdmulh s0, s8, s9
  sqrdmulh s1, s8, s9
  sqrdmulh s2, s8, s9
  sqrdmulh s3, s8, s9
  sqrdmulh s4, s8, s9
  sqrdmulh s5, s8, s9
  sqrdmulh s6, s8, s9
  sqrdmulh 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)0308090a0b18191e1f3f51inst 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)9fa0a1a6a7a8accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8020420039150000000210412580100100800001008000050064000002002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511041633200360800001002004020040200402004020040
802042003915000000000412580100100800001008000050064000002002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511021653200360800001002004020040200402004020040
80204200391500000002370412580100100800001008000050064000002008320039200399973399978010020080000200160000200392003911802011009910010080000100000009511031632200360800001002004020040200402004020040
802042003915000000000412580100100800001008000050064000002002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511031632200360800001002004020040200402004020040
802042003915000000012602762580100100800001008000050064000002002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511031632200360800001002004020040200402004020040
8020420039150000000240412580100100800001008000050064000002002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511031632200360800001002004020040200402004020040
802042003915000000000412580100100800001008000050064000002002020089200399973399978010020080000200160000200392003911802011009910010080000100000000511031632200360800001002004020040200402004020040
802042003915000000090412580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511031623200360800001002004020040200402004020040
802042003915000000000412580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511021623200360800001002004020040200402004020040
8020420039150000000005162580100100800001008000050064000002002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511031633200360800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)031e3f5051inst 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)9facc3cfd2d5d6daddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
800242004815048400258001010800001080000506400002002020039200399996310019800102080000201600002003920039118002110910108000010005094081608172003680000102004020040200402004020040
80024200391501684002580010108000010800005064000020020200392011399963100198001020800002016000020039200391180021109101080000103050200141606172003680000102004020040200402004020040
8002420039150040025800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000502001716017172003680000102004020040200402004020040
800242003915004002580010108000010800005064000020020200392003999963100198001020800002016000020039200391180021109101080000100050200141601782003680000102004020040200402004020040
800242003915004002580010108000010800005064000020020200392003999963100198001020800002016000020039200391180021109101080000100050200171608172003680000102004020040200402004020040
800242003915004002580010108000010800005064000020020200392003999963100198001020800002016000020039200391180021109101080000100050200171601772003680000102004020040200402004020040
80024200391500400258001010800001080000506400002002020039200399996310019800102080000201600002003920039118002110910108000010605020081608172003680000102004020040200402004020040
800242003915033400258001010800001080000506400002002020039200399996310019800102080000201600002003920039118002110910108000010005020161608182003680000102004020040200402004020040
800242003915015400258001010800001080000506400002002020039200399996310019800102080000201600002003920039118002110910108000010005020081601762003680000102004020040200402004020040
800242003915004002580010108000010800005064000020020200392003999963100198001020800002016000020039200391180021109101080000100050200171661672003680000102004020040200402004020040