Apple M1 Microarchitecture Research by Dougall Johnson

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

SMAXV (vector, 4S)

Test 1: uops

Code:

  smaxv s0, v0.4s
  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)03081e3f4e51inst 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
10043037220021025472510001000100039816013018303730372414328951000100020003037303711100110000073216332629100030383038303830383038
10043037220061254725100010001000398160130183037303724143289510001000200030373037111001100012473216332629100030383038303830383038
1004303722006125472510001000100039816013018303730372414328951000100020003037303711100110000073316332629100030383038303830383038
1004303723006125472510001000100039816013018303730372414328951000100020003037303711100110000073316332629100030383038303830383038
1004303722006125472510001000100039816013018303730372414328951000100020003037303711100110000073316332629100030383038303830383038
1004303723008225472510001000100039816013018303730372414328951000100020003037303711100110000073316332629100030383038308530383038
1004303723006125472510001000100039816013018303730372414328951000100020003037303711100110000373316332629100030383038303830383038
1004303723006125472510001000100039816013018303730372414328951000100020003037303711100110000073316332629100030383038303830383038
10043037220012025472510001000100039816013018303730372414328951000100020003037303711100110000073316332629100030383038303830383038
10043037230010525472510001000100039816013018303730372414328951000100020003037303711100110000073316332629100030383038303830383038

Test 2: Latency 1->2

Code:

  smaxv s0, v0.4s
  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)9fa0a1a7a8c5cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225015129547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100000007102161129709100001003003830038300383003830038
1020430037225056229547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100000007101161129633100001003003830038300383003830038
10204300372250268229547251010010010000100100005004277160030018300373003728264328745101002001016520020000300373003711102011009910010010000100001007101161129633100001003003830038300383003830038
1020430037224014929547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100000007101161129633100001003003830038300383003830038
102043003722506129547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100000007101161129633100001003003830038300383003830038
102043003722506129547251010010010000100100005004277160030018300373003728264328745101002001000020020000300373003711102011009910010010000100000007101161129633100001003003830038300383003830038
1020430037225021229547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100000007101161129633100001003003830038300383003830038
1020430037225010329547251010010010000100100005004277160030018300373003728264328745101002001000020020000300373003711102011009910010010000100000017101161129633100001003003830038300383003830038
1020430037225023729547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100000007101161129633100001003003830038300383003830038
102043003722506129547251010010010000100100005004277160130018300373003728264328745101002001000020020000300373003711102011009910010010000100000007401161129633100001003003830038300383003830038

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)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)9fa0a7accdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722518929547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722414529547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372256129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722518729547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100100640216222962910000103003830038300383003830038
10024300372256129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372258229547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372256129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000102046680640216222962910000103003830038300383003830038
100243003722519329547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722510329547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372258429547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038

Test 3: throughput

Count: 8

Code:

  smaxv s0, v8.4s
  smaxv s1, v8.4s
  smaxv s2, v8.4s
  smaxv s3, v8.4s
  smaxv s4, v8.4s
  smaxv s5, v8.4s
  smaxv s6, v8.4s
  smaxv s7, v8.4s
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)0304080f1e3a3f51inst 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)9fa8acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8020420058155000043125801081008000810080020500640132020020200392003999770699908012020080032200160064200392003911802011009910010080000100000111512210168820036800001002004020040200402004020040
8020420039150000023125801081008000810080020500640132020020200392003999770699908012020080032200160064200392003911802011009910010080000100000111512210488820036800001002004020040200402004020040
80204200391500000211542580108100800081008002050064013212002020039200399977069990801202008003220016006420039200391180201100991001008000010000011151228163820036800001002004020040200402004020040
802042003915500002715258010810080008100800205006401321200202003920039997776999080120200800322001600642003920039118020110099100100800001000001115122101681020036800001002004020040200402004020040
80204200391551000267927801161008001610080028500641008120029200512004899760999868012820080038200160076200492004811802011009910010080000100000222513211239920045800001002004920050200492004920050
8020420049156000026526801161008001610080028500640196120029200492004899760109986801282008003820016007620049200481180201100991001008000010000022251324234920045800001002004920049200492004920050
80204200481550009299926801161008001610080028500640196120029200492004899760109986801282008003820016007620048200891180201100991001008000010000022251321123111120046800001002005020050200492005020050
802042004915000002852680116100800161008002850064019612002920048200489976099986801282008003820016007620048200481180201100991001008000010000022251329234920046800001002005020049200492004920050
802042004915000002120627801161008001610080028500640196120029200492004999760109986801282008003820016007620048200481180201100991001008000010000022251339239920046800001002004920049200492005020049
802042004915000092107827801161008001610080028500640196120029200492004899760109986801282008003820016007620048200481180201100991001008000010000022251339239420045800001002005020049200492004920050

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0318191e3f51inst 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)9fa8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
800242005115000124025800101080000108000050640000020020200392003999960310019800102080000201600002003920039118002110910108000010005020101612102003680000102004020040200402004020040
8002420039150001272625800101080000108011650640000020020200392003999960310019800102080000201600002003920039118002110910108000010005020151611142003680000102004020040200402004020040
8002420039155002764025800101080000108000050640000020020200392003999960310019800102080000201600002003920039118002110910108000010035020161614142003680000102004020040200402004020040
8002420039155003612580010108000010800005064000002006220039200399996031001980010208000020160000200392003911800211091010800001000502014169112003680000102004020040200402004020040
8002420039155003424025800101080000108000050640000020020200392003999960310019800102080000201600002003920039118002110910108000010005020161615112003680000102004020040200402004020040
8002420039150003484025800101080000108000050640000020020200392003999960310019800102080000201600002003920039118002110910108000010005020131613102003680000102004020040200402004020040
80024200391500006125800101080000108000050640000020020200392003999960310019800102080000201600002003920039118002110910108000010005020141613162003680000102004020040200402004020040
80024200391500006125800101080000108000050640000120020200392003999960310019800102080000201600002003920039118002110910108000010005020141615142003680000102004020040200402004020040
800242003915000154025800101080000108000050640000120020200392003999960310019800102080000201600002003920039118002110910108000010005020121616122003680000102004020040200402004020040
800242003915600154025800101080000108000050640000120020200392003999960310019800102080000201600002003920039218002110910108000010005020131614152003680000102004020040200402004020040