Apple M1 Microarchitecture Research by Dougall Johnson

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

ADDV (4H)

Test 1: uops

Code:

  addv h0, v0.4h
  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)cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004303723012425472510001000100039816030183037303724143289510001000200030373037111001100073216112629100030383038303830383038
1004303723726125472510001000100039816030183037303724143289510001000200030373037111001100073116112629100030383038303830383038
100430372306125472510001000100039816030183037303724143289510001000200030373037111001100073116112629100030383038303830383038
100430372206125472510001000100039816030183037303724143289510001000200030373037111001100073116112629100030383038303830383038
1004303722246125472510001000100039816030183037303724143289510001000200030373037111001100073116112629100030383038303830383038
100430372206125472510001000100039816030183037303724143289510001000200030373037111001100073116112629100030383038303830383038
100430372206125472510001000100039816030183037303724143289510001000200030373037111001100073116112629100030383038303830383038
100430372306125472510001000100039816030183037303724143289510001000200030373037111001100073116112629100030383038303830383038
100430372306125472510001000100039816030183037303724143289510001000200030373037111001100073116112629100030383038303830383038
100430372206125472510001000100039816030183037303724143289510001000200030373037111001100073116112629100030383038303830383038

Test 2: Latency 1->2

Code:

  addv h0, v0.4h
  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)9fa8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250197629547251010010010000100100005004277160030018300373003728264328745101002001000020020000300373003711102011009910010010000100007101161129633100001003003830038300383003830038
102043003722506129547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100097101161129633100001003003830038300383003830038
102043003722566129547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100007101161129633100001003003830038300383003830038
102043008622506129547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100007101161129633100001003003830038300383003830038
102043003722506129547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100007101161129633100001003003830038300383003830038
1020430037224034629547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100007101161129633100001003003830038300383003830038
10204300372250120129547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100007101161129633100001003003830038300383003830038
102043003722506129547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100007101161129633100001003003830038300863003830038
102043003722506129547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100007101161129633100001003003830038300383003830038
102043003722506129547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100007101161129633100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03080b191e3f4e51inst 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)9fa6a8a9acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250000124295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010010000640416332962910000103003830038300383003830038
100243003722500106129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640316332962910000103003830038300383003830038
100243003722500106129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640316332962910000103003830038300383003830038
100243003722500006129547251001010100001010000504277160300183003730037282863287671016320100002020000300373003711100211091010100001000000640316332962910000103003830038300383003830038
1002430084225000027429547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640316332962910000103003830038300383003830038
1002430037225000039129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640316332962910000103003830038300383003830038
100243003722500006129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640316332962910000103003830038300383003830038
1002430037225000188429547251001910100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640316332962910000103003830038300383003830038
100243003722500006129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640316332962910000103003830038300383003830038
100243003722500006129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640316332962910000103003830038300383003830038

Test 3: throughput

Count: 8

Code:

  addv h0, v8.4h
  addv h1, v8.4h
  addv h2, v8.4h
  addv h3, v8.4h
  addv h4, v8.4h
  addv h5, v8.4h
  addv h6, v8.4h
  addv h7, v8.4h
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03181e1f3f51inst 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)9fa8acc5branch mispredict (cb)cdcfd5d6inst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042005915000030258010810080008100800205006401322002020039200399977699908012020080032200160064200392003911802011009910010080000100001115118216020036800001002004020040200402004020040
802042003915000030258010810080008100800205006401322002020039200399977699908012020080032200160064200392003911802011009910010080000100001115118016020036800001002004020040200402004020040
802042003915000053258010810080008100800205006401322002020039200399977699908012020080032200160064200392003911802011009910010080000100001115118016020036800001002004020040200402004020040
802042003915000030258010810080008100800205006401322002020039200399977699908012020080032200160064200392003911802011009910010080000100001115118016020036800001002004020040200402004020040
8020420039150000292258010810080008100800205006401322002020039200399977699908012020080032200160064200392003911802011009910010080000100201115118016020036800001002004020040200402004020040
802042003915000030258010810080008100800205006401322002020039200399977699908012020080032200160064200392003911802011009910010080000100001115118016020036800001002004020040200402004020040
8020420039150000302580108100800081008002050064013220020200392003999776999080120200800322001600642003920039118020110099100100800001000241115118016020036800001002004020040200902004020040
802042003915000030258010810080008100800205006401322002020039200399977699908012020080032200160064200392003911802011009910010080000100001115118016020036800001002004020040200402004020040
802042003915000030258010810080008100800205006401322002020039200399977699908012020080032200160064200392003911802011009910010080000100001115118016020036800001002004020040200402004020040
8020420039150000179258010810080008100800205006401322002020039200399977699908012020080032200160064200392003911802011009910010080000100001115118016020036800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03181e1f3f51inst 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)9fa8a9acc2c5cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420039150000862580010108000010800005064000001200202003920039999603100198001020800002016000020039200391180021109101080000100000050209164142003680000102004020040200402004020040
80024200391501001282580010108000010800005064000000200202003920039999603100198001020800002016000020039200391180021109101080000100000050206166112003680000102004020040200402004020040
8002420039150000632580010108000010800005064000000200202003920039999603100198001020800002016000020039200391180021109101080000100000050204164142003680000102004020040200402004020040
800242003915000040258001010800001080000506400001120020200392003999960310019800102080000201600002003920039118002110910108000010000005020416462003680000102004020040200402004020040
800242003915000040258001010800001080000506400000120020200392003999960310019800102080000201600002003920039118002110910108000010000005020616642003680000102004020040200402004020040
80024200391500004025800101080000108000050640000002002020039200399996031001980010208000020160000200392003911800211091010800001041030050204164112003680000102004020040200402004020040
8002420039150000402580010108000010800005064000000200202003920039999603100198001020800002016000020039200391180021109101080000100000050204164102003680000102004020040200402004020040
8002420039150000402580010108000010800005064000001200202003920039999603100198001020800002016000020039200391180021109101080000100000050204168102003680000102004020040200402004020040
80024200391500001492580010108000010800005064000001200202003920039999673100198001020800002016000020039200391180021109101080000100000050206164112003680000102004020040200402004020040
8002420039150090612580010108000010800005064000000200202003920039999603100198001020800002016000020039200391180021109101080000100000050204164112003680000102004020040200402004020040