Apple M1 Microarchitecture Research by Dougall Johnson

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

MUL (by element, 8H)

Test 1: uops

Code:

  mul v0.8h, v0.8h, 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)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
10043037230822548251000100010003983133018303730372415328951000100020003037303711100110000073216112630100030383038303830383038
10043037230612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230842548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037220612548251000100810003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230822548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230822548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037220612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038

Test 2: Latency 1->2

Code:

  mul v0.8h, v0.8h, 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)0318191e1f3f4e51inst 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)9fa6a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722400002512954825101001001000010010000500427731303001830037300372826532874510100200101612002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000037101161129634100001003003830038300383003830038
102043003722500006129548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000727101161129634100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731303006530037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003722500006129548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000277101161129634100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372240000612954825101001001000010010000500427867203001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)030718191e3f4e51inst 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)9facbranch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250110612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010006403164329632010000103003830038300383003830038
10024300372251000612954825100101010000101000050427731303001830037300372828732876710012201000020200003003730037111002110910101000010826906423162229630010000103003830038300383003830038
100243003722510001032954825100101010000121000060427731303001830037300372828732876710010201000020200003003730037111002110910101000010284506402162229630010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010006402163329632010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010006402162229630010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010006402162229630010000103003830038300383003830038
10024300372240000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010006402162229630010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010006402162229630010000103003830038300383003830038
10024300372251000612954825100101010000121000060427731303001830037300372828732876710010201000020200003003730037111002110910101000010006402162229630010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010006404162229630010000103003830038300383003830038

Test 3: Latency 1->3

Code:

  mul v0.8h, v1.8h, 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)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)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)9fa8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250612954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001001607101161129634100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773131300180300373003728265328745101002001000020020000300373008521102011009910010010000100097101161129634100001003003830038300383003830038
102043003722512612954825101001001000010010000500427731303001803003730037282653287451010020010000200200003003730037111020110099100100100001003707101161129634100001003003830038300383003830038
10204300372250612954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001000187101161129634100001003003830038300383003830038
10204300372250612954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001004107101161129634100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773130300180300373003728265328745101002001000020020000300373003711102011009910010010000100097101161129634100001003003830038300383003830038
10204300372251561295482510100100100001001000050042773131300180300373003728265328745101002001000020020000300373003711102011009910010010000100097101161129634100001003003830038300383003830038
102043003722509202954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001003307101161129634100001003003830038300383003830038
1020430037225061295482510100100100001001003250042773130300180300373003728265328745101002001000020020000300373003711102011009910010010000100097101161129634100001003003830038300383003830038
10204300372250612954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001004407101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)033f4e51inst 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)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)9fa8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037225612954825100101010000101000050427731330018300373003728287032876710010201000020200003003730037111002210910101000010250640216222963010000103003830038300383003830038
1002430037225726295482510010101000010100005042773133001830037300372828703287671001020100002020000300373003711100211091010100001009640216222963010000103003830038300383003830038
10024300372251032954825100101010000101000050427731330018300373003728287032876710010201000020200003003730037111002110910101000010390640216222963010000103003830038300383003830038
1002430037225612954825100101010000101000050427731330018300373003728287032876710010201000020200003003730037111002110910101000010490640216222963010000103003830038300383003830038
100243003722561295482510010101000010100005042773133001830037300372828703287671001020100002020000300373003711100211091010100001080640216222963010000103003830038300383003830038
1002430037225612954825100101010000101000050427731330018300373003728287032876710010201000020200003003730037111002110910101000010390640216222963010000103003830038300383003830038
1002430037225612954825100101010000101000050427731330018300373003728287032876710010201000020200003003730037111002110910101000010410640216222963010000103003830038300383003830038
1002430037225612954825100101010000101000050427731330018300373003728287032876710010201000020200003003730037111002110910101000010500640216222963010000103003830038300383003830038
1002430037225612954825100101010000101000050427731330018300373003728287032876710010201000020200003003730037111002110910101000010360640216222963010000103003830038300383003830038
100243003722461295482510010101000010102985042773133001830037300372828703287671001020100002020000300373003711100211091010100001013640216222963010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  mul v0.8h, v8.8h, v9.h[1]
  mul v1.8h, v8.8h, v9.h[1]
  mul v2.8h, v8.8h, v9.h[1]
  mul v3.8h, v8.8h, v9.h[1]
  mul v4.8h, v8.8h, v9.h[1]
  mul v5.8h, v8.8h, v9.h[1]
  mul v6.8h, v8.8h, v9.h[1]
  mul v7.8h, v8.8h, 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)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)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
80204200391504125801001008000010080000541640000020020200392003999733999780100200800002001600002003920039118020110099100100800001001235110316112003616800001002004020040200402004020040
802042003915041258010010080000100800005006400000200202003920039997339997801002008000020016000020039200391180201100991001008000010003511011611200360800001002004020040200402004020040
802042003915041258010010080000100800005006400000200202003920039997339997801002008000020016000020039200391180201100991001008000010003511011611200360800001002004020040200402004020040
802042003915041258010010080000100800005006400000200202003920039997339997801002008000020016000020039200391180201100991001008000010000511011611200360800001002004020040200402004020040
8020420039150516258010010080000100800005006400000200202003920039997339997801002008000020016000020039200391180201100991001008000010000511011611200360800001002004020040200402004020040
8020420039150412580100100800001238000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100030511011611200360800001002004020040200402004020040
802042003915041258010010080000100800005006400000200202003920039997339997801002008000020016000020039200391180201100991001008000010000511011611200360800001002004020040200402004020040
802042003915041258010010080000100800005006400001200202003920039997339997801002008000020016000020039200391180201100991001008000010000511011611200360800001002004020040200402004020040
802042003915041258010010080000100800005006400001200202003920039997339997801002008000020016000020039200391180201100991001008000010000511011611200360800001002004020040200402004020040
802042003915041258010010080000100800005006400000200202003920039997339997801002008000020016000020039200391180201100991001008000010000511011611200360800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03083f51inst 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)9fa6a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420048150040258001010800001080000506400000120020200392003999963100198001020800002016000020039200391180021109101080000100350050202016772003680000102004020040200402004020040
800242003915004025800101080000108000050640000002002020039200399996310019800102080000201600002003920039118002110910108000010038035020616572003680000102004020040200402004020040
800242003915003252580010108000010800005064000000200202003920039999631001980010208000020160000200392003911800211091010800001000005020716582003680000102004020040200402004020040
80024200391500402580010108000010800005064000000200202003920039999631001980010208000020160000200392003911800211091010800001000005020616752003680000102004020040200402004020040
80024200391500402580010108000010800005064000000200202003920039999631001980010208000020160000200392003911800211091010800001000005020816782003680000102004020040200402004020040
8002420039150015525800101080000108000050640000002002020039200399996310019800102080000201600002003920039118002110910108000010010185020616862003680000102004020040200402004020040
80024200391500402580010108000010800005064000000200202003920039999631001980010208000020160000200392003911800211091010800001000005020816962003680000102004020040200402004020040
8002420039150040258001010800001080000506400000020020200392003999963100198001020800002016000020039200391180021109101080000100580350201116842003680000102004020040200402004020040
800242003915004025800101080000108000050640000012002020039200399996310019800102080000201600002003920039118002110910108000010023035020716752003680000102004020040200402004020040
8002420039150040258001010800001080000506400000020020200392003999963100198001020800002016000020039200391180021109101080000100430905020816582003680000102004020040200402004020040