Apple M1 Microarchitecture Research by Dougall Johnson

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

SMULL (by element, 4S)

Test 1: uops

Code:

  smull v0.4s, v0.4h, v1.h[1]
  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)a8cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10043037220612548251000100010003983131301830373037241532895100010002000303730371110011000073216222630100030383038303830383038
10043037220612548251000100010003983131301830373037241532895100010002000303730371110011000073116212630100030383038303830383038
10043037230612548251000100010003983131301830373037241532895100010002000303730371110011000073116222630100030383038303830383038
10043037220612548251000100010003983131301830373037241532895100010002000303730371110011000073216222630100030383038303830383038
10043037220612548251000100010003983131301830373037241532895100010002000303730371110011000073116222630100030383038303830383038
10043037230612548251000100010003983131301830373037241532895100010002000303730371110011000073216222630100030383038303830383038
10043037223612548251000100010003983131301830373037241532895100010002000303730371110011000473216222630100030383038303830383038
10043037230612548251000100010003983131301830373037241532895100010002000303730371110011000073216222630100030383038303830383038
10043037230612548251000100010003983131301830373037241532895100010002000303730371110011000073216222630100030383038303830383038
10043037233612548251000100010003983131301830373037241532895100010002000303730371110011000073216222630100030383038303830383038

Test 2: Latency 1->2

Code:

  smull v0.4s, v0.4h, v1.h[1]
  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)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)9fa0a1a8acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430323227117795417645082949314310200137100481421089470342866970303063032230374282863228851111872161099722422316303243036791102011009910010010000100220195850869272322973926100001003037430371302283036230405
102043035822710729396163965295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000013071021622296340100001003003830038300383003830038
1020430037225000024061295482510100103100081001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000003071021622296340100001003003830038300383003830038
10204300372250000255061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071021622296340100001003003830038300383003830038
102043003722500020061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071021622296340100001003003830038300383003830038
1020430037225000018061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071021622296340100001003003830038300383003830038
1020430037225000060251295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071021622296340100001003003830038300383003830038
102043003722500006061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071021622296340100001003003830038300383003830038
1020430037225000060103295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071021622296340100001003003830038300383003830038
10204300372250000917661295482510100100100001001000050042773131300183003730037282653287451010020010000200200003008430037111020110099100100100001000000071021622296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03191e1f3f4e51inst 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
10024300372240198061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000066402162229630010000103003830038300383003830038
100243003722500061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225027061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
10024300372250537061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373008311100211091010100001000006402162229630010000103003830038300383003830038
1002430037225015061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
100243003722506061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
100243003722500061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225030082295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
10024300372250120726295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225027061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038

Test 3: Latency 1->3

Code:

  smull v0.4s, v1.4h, v0.h[1]
  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)0308091e3f4e51inst 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)9fa0a8acbranch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250006129548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100053307411161129634100001003003830038300383003830038
1020430037225000612954825101001151000810010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010003007101161129634100001003003830038300383003830038
1020430037225000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010003007101161129634100001003003830038300383003830038
10204300372250006129548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100091207101161129634100001003003830038300383003830038
102043003722400126129548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100046907101161129634100001003003830038300383003830038
10204300372250006129548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100032007101161129634100001003003830038300383003830038
10204300852261006129548251010010010000100100005004277313030054300373003728265328745101002001000020020000300373003711102011009910010010000100051607101161129634100001003003830038300383003830038
102043003722500061295482510100100100001001000050042773130300183003730037282653287451010020010172200200003003730037111020110099100100100001000461207101161129634100001003003830038300383003830038
1020430037225000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010005307101161129634100001003003830038300383003830038
10204300372250006129548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100050607101161129634100001003003830038300383003830038

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
10024300372250404206129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
1002430037225000008229548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
1002430037225000006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
1002430037225000006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
1002430037225000006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
1002430037225000606129539251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
1002430037226000006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
1002430037225000006129548251001010100001010148504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
1002430037225000006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038
1002430037225000006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000006402162229630010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  smull v0.4s, v8.4h, v9.h[1]
  smull v1.4s, v8.4h, v9.h[1]
  smull v2.4s, v8.4h, v9.h[1]
  smull v3.4s, v8.4h, v9.h[1]
  smull v4.4s, v8.4h, v9.h[1]
  smull v5.4s, v8.4h, v9.h[1]
  smull v6.4s, v8.4h, v9.h[1]
  smull v7.4s, v8.4h, v9.h[1]
  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)0307080b18191e1f3f51inst 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
80204200581500000000412580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100139511031611200360800001002004020040200402004020040
8020420039150000000041258010010080000100800005006400001200202003920039997339997801002008000020016000020039200391180201100991001008000010013511011611200360800001002004020040200402004020040
8020420039150000000041258010010080000100800005006400000200202003920039997339996801252008000020016000020039200391180201100991001008000010000511011611200360800001002004020040200402004020040
80204200391500000000412580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100376511011611200360800001002004020040200402004020040
8020420039150000000041258010010080000125800005006400000200202003920039997339997801002008000020016000020039200391180201100991001008000010000511011611200360800001002004020040200402004020040
8020420039150000000041258010010080000100800005006400001200202003920039998939997801002008000020016000020039200391180201100991001008000010000511011611200360800001002004020040200402004020040
8020420039150000000041258010010080000100800006266400000200202003920039997339997801002008000020016000020039200391180201100991001008000010000511011611200360800001002004020040200402004020040
8020420039150000000041258010010080000125800005006400000200202003920039997339997801002008000020016000020039200391180201100991001008000010010511011611200360800001002004020040200402004020040
8020420039150000000041258010010080000100800005006400001200202003920039997339997801002008000020016000020039200391180201100991001008000010010511231733200360800001002004020040200402004020040
80204200391500000000412580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100540511011611200360800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0307080a191e3f51inst 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)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)9fa8acc5cficache miss (d3)d5d6d9ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420039150000004025800121080000108000050640000002002020039200399996310019800102080000201600002003920039118002110910108000010030502001916017172003680000102004020040200402004020040
800242003915000000402580012108000010800005064000011200202003920039999631001980010208000020160000200392003911800211091010800001000050200171609172003680000102004020040200402004020040
8002420039150000004025800121080000108000050640000102002020039200399996310019801172080000201600002003920039118002110910108000010060502001616015162003680000102004020040200402004020040
80024200391500000304025800121080000108000050640000002002020039200399996310019800102080000201600002003920039118002110910108000010130502001716014172003680000102004020040200402004020040
800242003915000000402580012108000010800005064000000200202003920039999631001980010208000020160210200392003911800211091010800001000050200171609172003680000102004020040200402004020040
8002420039150000006125800121180098108000050640000002002020039200399996310019800102080000201600002003920039118002110910108000010000502001716017172003680000102004020040200402004020040
800242003915000000402580012108000010800005064000000200202003920039999631001980010208000020160000200392003911800211091010800001000050200161609172003680000102004020040200402004020040
800242003915000000402580012108000010800005064000011200202003920102999631001980010208000020160000200392003911800211091010800001000050200171601782007580000102004020040200402004020040
8002420039150200004025800121080000108000050640000112002020100200929996310019801102080000201600002003920039118002110910108000010030502001616014172003680000102004020040200402004020040
8002420039150000008225800121080000108000050640000012002020039200399996310019800102080000201600002003920039118002110910108000010000502001716017172003680000102004020040200402004020040