Apple M1 Microarchitecture Research by Dougall Johnson

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

SHA1H

Test 1: uops

Code:

  sha1h s0, s0
  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)a6a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004203715961936251000100010006892120182037203717873189510001000100020372037111001100000073116111969100020382038203820382038
1004203715061936251000100010006892120182037203717873189510001000100020372037111001100000073116111969100020382038203820382038
1004203715061936251000100010006892120182037203717873189510001000100020372037111001100000073116111969100020382038203820382038
1004203715061936251000100010006892120182037203717873189510001000100020372037111001100000073116111969100020382038203820382038
1004203715061936251000100010006892120182037203717873189510001000100020372037111001100000073116111969100020382038203820382038
1004203716061936251000100010006892120182037203717873189510001000100020372037111001100000073116111969100020382038203820382038
1004203715061936251000100010006892120182037203717873189510001000100020372037111001100000073116111969100020382038203820382038
1004203715061936251000100010006892120182037203717873189510001000100020372037111001100000073116111969100020382038203820382038
10042037155461936251000100010006892120182037203717873189510001000100020372037111001100000073116111969100020382038203820382038
1004203715061936251000100010006892120182037203717873189510001000100020372037111001100000073116111969100020382038203820382038

Test 2: Latency 1->2

Code:

  sha1h s0, s0
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)030b18191e1f3a3f4e51inst 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
1020420037150000000619936251010010010000100100005007079210200182003720037186373187451010020010000200100002003720037111020110099100100100001000000071021611199680100001002003820038200382003820038
1020420037150000000619936251010010010000100100005007079210200182003720037186373187451010020010000200100002003720037111020110099100100100001000000071011611199680100001002003820038200382003820038
1020420037150000000619936251010010010000100100005007079210200182003720037186373187451010020010000200100002003720037111020110099100100100001000000071011611199680100001002003820038200382003820038
1020420037150000000619936441010010010000100100005007079211200182003720037186373187451010020010000200100002003720037111020110099100100100001000000071011611199680100001002003820038200382003820038
1020420037150000000619936251010010010000100100005007079210200182003720037186373187451010020010000200100002003720037111020110099100100100001000000071011611199680100001002003820038200382003820038
1020420037150000000619936251010010010000100100005007079210200182003720037186373187451010020010000200100002003720037111020110099100100100001000000071011611199680100001002003820038200382003820038
1020420037150000000619936251010010010000100100005007079211200182003720037186373187451010020010000200100002003720037111020110099100100100001000000071011611199680100001002003820038200382003820038
1020420037150000000619936251010010010000100100005007079211200182003720037186373187451010020010000200100002003720037111020110099100100100001000000071011611199680100001002003820038200382003820038
1020420037149000000619936251010010010000100100005007079211200182003720037186373187451010020010000200100002003720037111020110099100100100001000000071011611199680100001002003820038200382003820038
10204200371500000007269936251010010010000100100005007079211200182003720037186373187451010020010000200100002003720037111020110099100100100001000000071011611199680100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)030b191e1f3f4e51inst 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)9fa1a6a8a9acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100242003715000007269936251001010100001010000507079212001820037200371865931876710010201000020100002003720037111002110910101000010000000640316221996810000102003820038200382003820038
100242003715000008629936251001010100001010000507079212001820037200371865931876710010201000020100002003720037111002110910101000010000000640216221996810000102003820038200382003820038
10024200371500000619936251001010100001010000507079212001820037200371865931876710010201000020100002003720037111002110910101000010000000640216222000410000102003820038200382003820038
10024200371500000619936251001010100001010000507079212001820037200371865931876710010201000020100002003720037111002110910101000010000000640216221996810000102003820038200382003820038
10024200371500000619936251001010100001010000507079212001820037200371865931876710010201000020100002003720037111002110910101000010000000640216221996810000102003820038200382003820038
10024200371500000619936251001010100001010000507079212001820037200371865931876710010201000020100002003720037111002110910101000010000000640216221996810000102003820038200382003820038
10024200371500000619936251001010100001010000507079212001820037200371865931880110010201000020100002003720037111002110910101000010000000640216221996810000102003820038200382003820038
10024200371500000619936251001010100001010000507079212001820037200371865931876710010201000020100002003720037111002110910101000010000000662216221996810000102003820038200382003820038
10024200371500000619936251001010100001010000507079212001820037200371865931876710010201000020100002003720037111002110910101000010000000640216221996810000102003820038200382003820038
10024200371500000619936251001010100001010000507079212001820037200371865931876710010201000020100002003720037111002110910101000010000000640216221996810000102003820038200382003820038

Test 3: throughput

Count: 8

Code:

  sha1h s0, s8
  sha1h s1, s8
  sha1h s2, s8
  sha1h s3, s8
  sha1h s4, s8
  sha1h s5, s8
  sha1h s6, s8
  sha1h s7, s8
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03080b18191e1f3f51inst 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)9fa0a6a8a9acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80204800406000000001922580100100800001008000050064000018001980038800386997166999280100200800082008000880038800381180201100991001008000010000003011151170160080035800001008003980039800398003980039
8020480038599000000382580100100800001008000050064000018001980038800867001066999280100200800082008000880038800381180201100991001008000010000100011151170160080035800001008003980039800398003980039
802048003860000000011342580100100800001008000050064000018001980038800386997166999280125200800082008000880038800381180201100991001008000010020000011151170160080072800001008003980039800398018480039
80204800386000000002504480100100800001008000050064000008001980038800386997166999280100200800082008000880038800381180201100991001008000010000000011151170490080035800001008003980039800398003980039
80204800386000000002082580100100800001008000050064000018001980038800386997166999280100200800082008000880038800381180201100991001008000010000000011151170160080035800001008003980039800398003980039
80204800385990000002082580100100800001008000050064078008001980038800386997166999280100200800082008000880038800381180201100991001008000010000003011151170160080035800001008003980039800398003980039
8020480038600000000592580100100800001008000050064000018001980038800386997166999280100200800082008000880038800381180201100991001008000010000000011151170160080183800001008003980039800398003980039
8020480038600000000382580100100800001008000050064000018001980038800386997166999280100200800082008000880038800381180201100991001008000010000000011151170160080183800001008003980039800398003980039
8020480038600000000384480100100800001008000050064000018001980038800386997166999280100200800082008000880038800381180201100991001008000010000003011151171160080035800001008003980039800398003980039
8020480038600000000382580100100800001008000050064000008001980038800386997166999280100200800082008000880038800381180201100991001008000010000000011151170160080035800001008003980039800398023380039

1000 unrolls and 10 iterations

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

retire (01)cycle (02)031e3f51inst 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)9fa8acc5branch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002480039600604925800101080000108000050640000180019080038800386998637001880010208000020800008003880038118002110910108000010000050207162480033080000108003980039800398003980039
800258003859904925800101080000108000050640000080019080038800386998637001880010208000020800008003880038118002110910108000010000050204166480033080000108003980039800398003980039
8002480038599071425800101080000108000050640000080019080038800386998637001880010208000020800008003880038118002110910108000010000050204164280033080000108003980039800398003980039
8002480038599394925800101080000108000050640000080019080038800386998637001880010208000020800008003880038118002110910108000010330050204164580033080000108003980039800398003980039
800248003860004925800101080000108000050640000080019080038800386998637001880010208000020800008003880038118002110910108000010000050204164480033080000108003980039800398003980039
80024800386000353258001010800001080000506400000800190800388003869986370018800102080917208038180957804261918002110910108000010010630050202164280033080000108003980039800398003980039
80024800385996613725801021080000108000050640000080019080038802306998637001880010208000020800008003880038118002110910108000010030050204167280033080000108003980039800398003980136
8002480038599394925800331080000108000050640000080019080038800386998637005480010208000020800008003880038118002110910108000010000150202164280033080000108003980039800398003980039
800248003859904925800101080000108000050640000080019080038800386998637001880010208000020800008003880038118002110910108000010000050204164280033080000108003980039800398003980039
800248003860004925800101080000108000050640000080019080038800386998637001880010208000020800008003880038118002110910108000010000050202162480033080000108008780039800398003980039