Apple M1 Microarchitecture Research by Dougall Johnson

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

SUB (vector, 2S)

Test 1: uops

Code:

  sub v0.2s, v0.2s, v1.2s
  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)03080b18191e1f3f4e51inst 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)a1a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10042085160110132883681676441000101211522646801201820372037157231910115210002324208420731110011000202079140111843100020852074208520382038
100420731611110883341676491012100010002646801201820852037157281914100010002000203720371110011000000073116111787100020382038203820382038
1004203715000000611687251000100010002646801201820372037157231895100010002000203720371110011000010073116111787100020382038203820382038
1004203715000000611687251000100010002646801201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
1004203716000000611687251000100010002646801201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
1004203715000000611687251000100010002646801201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
1004203715000000611687251000100010002646801201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
1004203716000000611687251000100010002646801201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
1004203716000000611687251000100010002646800201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
1004203715000000611687251000100010002646800201820372037157231895100010002000203720371110011000010373116111787100020382038203820382038

Test 2: Latency 1->2

Code:

  sub v0.2s, v0.2s, v1.2s
  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)0307080a181e3f4e51inst 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)9fa0a1a6a8a9acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204200371501010016819687251010010010000100100005002847680200182003720037184296187411010020010008200200162003720037111020110099100100100001000000031117181161119805100001002003820038200382003820085
10204200371501111014519687251010010010000100100005002847680200182003720037184297187411010020010008200200162003720037111020110099100100100001000031001117181161119806100001002003820038200382003820038
10204200371501010012819687251010010010000100100005002847680200182003720037184297187411010020010008200200162003720037111020110099100100100001000000001117171161119805100001002003820038200382003820038
1020420037150101006119687251010010010000100100005002847680200182003720037184297187401010020010008200200162003720037111020110099100100100001000000031117171161119806100001002003820038200382003820038
10204200371501010014519687251010010010000100100005002847680200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000007102162219791100001002003820038200382003820038
1020420037150000006119687251010010010000100100005002847680200182003720037184223187451010020010000200200002003720037111020110099100100100001000000030007102162219791100001002003820038200382003820038
10204200371500000126119687251010010010000100100005002847680200182008520037184223187451010020210000200200002003720037111020110099100100100001002220200007102162219791100001002003820038200862003820038
10204200371500000016819687251010010010000100100005002847680200182003720037184223187451010020010000200200002003720037111020110099100100100001000000030007102162219791100001002003820038200382003820038
102042003715000001216619687251010010010000100100005002847680200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000007102162219791100001002003820038200382003820038
10204200371500000016619687251010010010000100100005002847680200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000007102162219791100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)03080b18191e1f3a3f4e51inst 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)9fa0a1a6a7a8a9acc2cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100242003715000000006119687251001010100001010000502847680020018200372003718444318767100102010000202000020037200371110021109101010000100000000006403162219785010000102003820038200382003820038
100242003715000000006119687251001010100001010000502847680020018200372003718444318767100102010000202000020037200371110021109101010000100000000006402162219785010000102003820038200382003820038
100242003715000000006119687251001010100001010000502847680020018200372003718444318767100102010000202000020037200371110021109101010000100000006006402162219785010000102003820038200382003820038
1002420037150000000061196872510022101000010100005028476800200182003720037184443187671001020108342421616202732027471100211091010100001040001011818007754654219895310000102031920360203222032320322
10024203221520066672440029501962180100361410072131076090285537802019820320203231846328188721108020110002021996203212003771100211091010100001000001011965007692162219785010000102003820038200382003820038
100242003715000005401761219619687117100611510060131076072285409502019820037202731845925188581077320108192021662202742027561100211091010100001022201412588207474655420004210000102031020228202722032520276
10024203201511066792528010251963213410087131007210108157028553780202342018020320184652818879109292410997202197820322203666110021109101010000100000002053006402412219785010000102003820038200382003820227
1002420227151016554044006119687251001010100001010000502847680020054200372003718444318767100102010000202000020037200371110021109101010000100000006006402162219785010000102003820038200382003820038
10024200371650000000811968725100101010000101000066284768002001820037200371844439188601001024100002020000200372003711100211091010100001024000415945208546884220111410000102050320548204652050820509
1002420273158005101188440013119676251001010100001010000502847680020198200852037018449318767100102010000202000020037200371110021109101010000100000000006402162219785010000102003820038200382003820038

Test 3: Latency 1->3

Code:

  sub v0.2s, v1.2s, v0.2s
  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)0304080b18191e1f3f4e51inst 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)9fa0a1a6a7a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020420037150100000040119687251010010010000100100005002847680200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
102042003715000000006119687251010010010000100100005002847680200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
102042003715000000006119687251010010010000100100005002847680200182003720037184223187451010020010000200200002003720037111020110099100100100001000000400071011611197910100001002003820038200382003820038
102042003715000000006119687251010010010000100100005002847680200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
102042003715000000006119687251010010010000100100005002847680200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
1020420037150000000033019687251010010010000100100005002847680200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611198610100001002003820038200382003820038
10204200371500000000321719687251010010010000100100005002847680200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
1020420037150000000012419687251010010010000100100005002847680200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
102042003715000000906119687251010010010000100100005002847680200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
102042003715000000006119687811010010010000100100005002847680200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)03070a3a3f4e51inst 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)9fa1a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100242003715011238319687441001010100001010000502847680120018200372003718444318767100102010000202000020037200371110021109101010000100000644101610111978510000102003820038200382003820038
10024200371501122151968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000064410161161978510000102003820038200382003820038
10024200371501121331968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000064481611101978510000102003820038200382003820038
100242003715011215419687251001010100001010000502847680120018200372003718444318767100102010000202000020037200371110021109101010000100000644121610101978510000102003820038200382003820038
10024200371501126819687251001010100001010000502847680120018200372003718444318767100102010000202000020037200371110021109101010000100000644101611101978510000102003820038200382003820038
10024200371501126819687251001010100001010000502847680120018200372003718444318767100102010000202000020037200371110021109101010000100000644101610101978510000102003820038200382003820038
10024200371501121771968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000064481610111978510000102003820038200382003820038
100242003715011244619687251001010100001010000502847680120018200372003718444318767100102010000202000020037200371110021109101010000100000644111610101978510000102003820038200382003820038
100242003715011215819687251001010100001010000502847680020018200372003718444318767100102010000202000020037200371110021109101010000100010644111610121978510000102003820038200382003820038
100242003715011217519687251001010100001010000502847680120018200372003718444318767100102010000202000020037200371110021109101010000100000644101611111978510000102003820038200382003820038

Test 4: throughput

Count: 8

Code:

  sub v0.2s, v8.2s, v9.2s
  sub v1.2s, v8.2s, v9.2s
  sub v2.2s, v8.2s, v9.2s
  sub v3.2s, v8.2s, v9.2s
  sub v4.2s, v8.2s, v9.2s
  sub v5.2s, v8.2s, v9.2s
  sub v6.2s, v8.2s, v9.2s
  sub v7.2s, v8.2s, v9.2s
  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)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)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)9fa1a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8020420038150082258010010080000100800005006400001200192003820038997339996801002008000020016000020038200381180201100991001008000010000051102161120035800001002003920039200392003920039
8020420038150040258010010080000100800005006400000200192003820038997339996801002008000020016000020038200381180201100991001008000010000051101161120035800001002003920039200392003920039
8020420038150040258010010080000100800005006400000200192003820038997339996801002008000020016000020038200381180201100991001008000010000051101161120035800001002003920039200392003920039
80204200381500705258010010080000100800005006400001200192003820038997339996801002008000020016000020038200381180201100991001008000010000051101161120035800001002003920039200392003920039
8020420038150040258010010080000100800005006400001200192003820038997339996801002008000020016000020038200381180201100991001008000010001051101161120035800001002003920039200392003920039
8020420038150040258010010080000100800005006400001200192003820038997339996801002008000020016000020038200381180201100991001008000010000051101161120035800001002003920039200392003920039
8020420038150040258010010080095100800005006400000200192003820038997339996801002008000020016000020038200381180201100991001008000010000051101161120035800001002003920039200392003920039
8020420038150040258010010080000100800005006400000200192003820038997339996801002008000020016000020038200381180201100991001008000010000051101161120035800001002003920039200392003920039
8020420038150040258010010080000100800005006400000200192003820038997339996801002008000020016000020038200381180201100991001008000010000051101161120035800001002003920039200392003920039
8020420038150040258010010080000100800005006400000200192003820038997339996801002008000020016000020038200381180201100991001008000010000051101161120035800001002003920039200392003920039

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03191e3f51inst 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)9fa6a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80024200481500012325800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100005020216442003580000102003920039200392003920039
8002420038150006225800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100005020416442003580000102003920039200392003920039
8002420038150003925800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100005020216232003580000102003920039200392003920039
8002420038150003925800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100005020216322003580000102003920039200392003920039
80024200381500021025800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100005020216222003580000102003920039200392003920039
80024200381500019025800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100005020216242003580000102003920039200392003920039
800242003815000111525800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100005020216332003580000102003920039200392003920039
8002420038150003925800101080000108000050640000020019200382003899963100188001020800002016000020038200381180021109101080000100005020416322003580000102003920039200392003920039
8002420038150003925800101080000108000050640000020019200382003899963100188001020800002016000020038200381180021109101080000100005020216332003580000102003920039200392003920039
8002420038150006025800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100005020216332003580000102003920039200392003920039