Apple M1 Microarchitecture Research by Dougall Johnson

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

USUBW (vector, 4S)

Test 1: uops

Code:

  usubw v0.4s, v0.4s, v1.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)03181e1f3f4e51inst 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)a0a1a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10042037160007116872510001000100026468012018203720371572318951000100020002037203711100110000000073216111787100020382038203820382038
10042037160006116872510001000100026468002018203720371572318951000100020002037203711100110000000073116111787100020382038203820382038
10042037150006116872510001000100026468002018203720371572318951000100020002037203711100110000000073116111787100020382038203820382038
10042037150006116872510001000100026468002018203720371572318951000100020002037203711100110000000073116111787100020382038203820382038
10042037150006116872510001000100026468002018203720371572318951000100020002037203711100110000030673116111787100020382038203820382038
10042037160006116872510001000100026468002018203720371572318951000100020002037203711100110000000073116111787100020382038203820382038
10042037160006116872510001000100026468002018203720371572318951000100020002037203711100110000000073116111787100020382038203820382038
10042037160006116872510001000100026468002018203720371572318951000100020002037203711100110000000073116111787100020382038203820382038
10042037160006116874910001000100026468002018203720371572318951000100020002037203711100110000000673116111787100020382038203820382038
10042037160006116872510001000100026468002018203720371572318951000100020002037203711100110000000073116111787100020382038203820382038

Test 2: Latency 1->2

Code:

  usubw v0.4s, v0.4s, v1.4h
  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)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)9fa6a8acbranch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020420037155010519687251010010010000100100005002847680120018200372003718422318745101002001000020020000200372003711102011009910010010000100000071011611197910100001002003820038200382003820038
102042003715506119687251010010010000100100005002847680020018200372003718422318745101002001000020020000200372003711102011009910010010000100000071011611197910100001002003820038200382003820038
102042003715506119687251010010010000100100005002847680120018200372003718422318745101002001000020020000200372003711102011009910010010000100000071011611197910100001002003820038200382003820038
1020420037155020819687251010010010000100100005002847680120018200372003718422318745101002001000020020000200372003711102011009910010010000100000071011611197910100001002003820038200382003820038
1020420037155016819687251010010010000100100005002847680120018200372003718422318745101002001000020020000200372003711102011009910010010000100000071011611197910100001002003820038200382003820038
102042003715506119687251010010010000100100005002847680120018200372003718422318745101002001000020020000200372003711102011009910010010000100000071011611197910100001002003820038200382003820038
102042003715536119687251010010010000100100005002847680020018200372003718422318745101002001000020020000200372003711102011009910010010000100003071011611197910100001002003820038200382003820038
102042003715506119687251010010010000100100005002847680020018200372003718422318745101002001000020020000200372003711102011009910010010000100000071011611197910100001002003820038200382003820038
1020420037155128419687251010010010000100100005002847680120018200372003718422318745101002001000020020000200372003711102011009910010010000100000071011611197910100001002003820038200382003820038
1020420037155010719687251010010010000100100005002847680120018200372003718422318745101002001000020020000200372003711102011009910010010000100000071011611197910100001002003820085200852008620038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)03080b18191e1f3a3c3f4e51inst 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)6061696d6edispatch 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)9fa0a1a6a8acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024200371560000002066196872510010101000010100005028476801020018200372003718444318767100102010000202000020037200371110021109101010000100000791307551481171419967410000102022820273202282022820274
10024202621570000540352202502196321221007112100601410760712854095102019820260200841845920188601077222108292221660202742027561100211091010100001002001009027571473151219948410000102027220275202732031420178
10024202751570145660440206619687251001010100001010000502847680102001820037200371844471876710010201000020200002003720037111002110910101000010222130716549111219859210000102027520226200382022820275
1002420274157005567244030294919632117100711410012121076071285373110201982027420274184441918879109302410000242165620276202737110021109101010000100200993546852133111119785010000102008520085200382003820038
100242003716100005430236508196436210075101004813104567228515291020234202262008518456151882310622221050622213262017920132911002110910101000010000004800957171319895210000102027420275201802018220369
100242027116310000020314119610118100381310048111060850285024610201262022620180184501818842106222010000202000020037200371110021109101010000102021752527761333181620057010000102003820038200382003820038
1002420178163102000103840196742510038121000013101527128476801020090201802032018448818852106222410990202131220418200849110021109101010000102030138150644816101019785010000102003820038200382003820038
100242003715500000020154196872510010101000010100005028476801020018200372003718444318767100102010000202000020037200371110021109101010000100000306448168819785010000102003820038200382003820038
10024200371560000002066196872510010101000010100005028476801020018200372003718444318767100102010000202000020037200371110021109101010000100000006441016101019785410000102003820038200382003820038
10024200371550000002032719687251001010100001010000502847680102001820037200861844431876710010201000020200002003720037111002110910101000010000000644101651019785010000102003820038200382003820038

Test 3: Latency 1->3

Code:

  usubw v0.4s, v1.4s, 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): 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)60696b6d6edispatch 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)9fa0a1a6a7a8a9acc5branch mispredict (cb)cdcfd0d5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102042003715500000006119687251010010010000100100005002847680120018020037200371842203187451010020010000200200002003720037111020110099100100100001000000000000710011611197910100001002003820038200382003820038
102042003715500000006119687251010010010000100100005002847680020018020037200371842203187451010020010000200200002003720037111020110099100100100001000000000000710011611197910100001002003820038200382003820038
102042003715500000006119687251010010010000100100005002847680020018020037200371842203187451010020010000200200002003720037111020110099100100100001000000000000710011611197910100001002003820038200382003820038
102042003715500000006119687251010010010000100100005002847680020018020037200371842203187451010020010000200200002003720037111020110099100100100001000000000000710011611197910100001002003820038200382003820038
102042003715500000006119687251010010010000100100005002847680120018020037200371842203187451010020010000200200002003720037111020110099100100100001000000000000710011611197910100001002003820038200382003820038
102042003715500000008219687251010010010000100100005002847680020018020037200371842203187451010020010000200200002003720037111020110099100100100001000000000000710011611197910100001002003820038200382003820038
102042003715600000006119687251010010010000100100005002847680020018020037200371842203187451010020010000200200002003720037111020110099100100100001000000000000710011611197910100001002003820038200382003820038
1020420037156000000010119687251010010010000100100005002847680020018020037200371842203187451010020010000200200002003720037111020110099100100100001000000000000710011611197910100001002003820038200382003820038
102042003715500000006119687251010010010000100100005002847680020018020037200371842203187451010020010000200200002003720037111020110099100100100001000000000000710011611197910100001002003820038200382003820038
102042003715500000006119687251010010010000100100005002847680020018020037200371842203187451010020010000200200002003720037111020110099100100100001000000000000710011611197910100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)030818191e1f3a3f4e51inst 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)9fa0a6a8acc2branch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100242003715500000214819687251001010100001010000502847680020018200372003718444318767100102010000202000020037200371110021109101010000100000006441116111219785010000102008520038200382003820038
1002420037155000120262196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000064411168819785010000102003820038200382003820038
10024200371560000026219687251001010100001010000502847680020018200372003718444318767100102010000202000020037200371110021109101010000100000006441116121119785010000102003820038200382003820038
100242003715500000211019687251001010100001010000502847680020018200372003718444318767100102010000202000020037200371110021109101010000100000006441116111119785010000102003820038200382003820038
100242003715500000212519687251001010100001010000502847680120018200372003718444318767100102010000202000020037200371110021109101010000100000006441116111119785010000102003820038200382003820038
10024200371550000026619687251001010100001010000502847680120018200372003718444318767100102010000202000020037200371110021109101010000100000006441116111219785010000102003820038200382003820038
10024200371560000026619687251001010100001010000502847680020018200372003718444318767100102010000202000020037200371110021109101010000100000006441116111219785010000102003820038200382003820038
100242003715600000266196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000064491611619785010000102003820038200382003820038
1002420037155000002661968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037111002110910101000010000000644616111219785010000102003820038200382003820038
1002420037155000002731196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000064491691019785010000102003820038200382003820038

Test 4: throughput

Count: 8

Code:

  usubw v0.4s, v8.4s, v9.4h
  usubw v1.4s, v8.4s, v9.4h
  usubw v2.4s, v8.4s, v9.4h
  usubw v3.4s, v8.4s, v9.4h
  usubw v4.4s, v8.4s, v9.4h
  usubw v5.4s, v8.4s, v9.4h
  usubw v6.4s, v8.4s, v9.4h
  usubw v7.4s, v8.4s, v9.4h
  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)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)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)9fa0a1a6a8acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80204200381560000008225801001008000010080000500640000120019020038200389973399968010020080000200160000200382003811802011009910010080000100000000511021611200350800001002003920039200392003920039
80204200381550000004025801001008000010080000500640000120019020038200389973399968010020080000200160000200382003811802011009910010080000100000000511011611200350800001002003920039200392003920039
80204200381560000004025801001008000010080000500640000120019020038200389973399968010020080000200160000200382003811802011009910010080000100000000511021611200350800001002003920039200392003920039
80204200381550000004025801001008000010080000500640000020019020038200389973399968010020080000200160000200382003811802011009910010080000100000000511012211200350800001002003920039200392003920039
80204200381551000004025801001008000010080000500640000120083020038200389973399968010020080000200160000200382003811802011009910010080000100000000511011611200350800001002003920039200392003920039
80204200381550000008225801001008000010080000500640000020019020038200389973399968010020080000200160000200382003811802011009910010080000100000060511011611200350800001002003920039200392003920039
80204200381550000004025801001008000010080000500640000120019020038200389973399968010020080000200160000200382003811802011009910010080000100000030511011611200350800001002003920039200392003920039
80204200381550000004025801001008000010080000500640000120019020038200389973399968010020080000200160000200382003811802011009910010080000100000000511011611200350800001002003920039200392003920039
802042003815500000029825801001008000010080000500640000120019020038200389973399968010020080000200160000200382003811802011009910010080000100000000511011611200350800001002003920039200392003920039
80204200381550000004025801001008000010080000500640000120019020038200389973399968010020080000200160000200382003811802011009910010080000100000000511011611200350800001002003920039200392003920039

1000 unrolls and 10 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)9fa8accfd0d2d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420059155039258001010800001080000506400000200192003820038999631001880010208000020160000200382003811800211091010800001000502002516462003580000102003920039200392003920039
800242003815533242580010108000010800005064000002001920038200389996310018800102080000201600002003820038118002110910108000010005020001016432003580000102003920039200392003920039
8002420038155039258001010800001080000506400000200192003820038999631001880010208000020160000200382003811800211091010800001010502000816492003580000102003920039200392003920039
8002420038156339258001010800001080000506400000200192003820038999631001880010208000020160000200382003811800211091010800001000502000816442003580000102003920039200392003920039
8002420038155039258001010800001080000506400000200192003820038999631001880010208000020160000200382003811800211091010800001000502001416762003580000102003920039200392003920039
8002420038155039258001010800001080000506400000200192003820038999631001880010208000020160000200382003811800211091010800001000502000516772003580000102003920039200392003920039
800242003815601803258001010800001080000506400000200192003820038999631001880010208000020160000200382003811800211091010800001000502001316472003580000102003920039200392003920039
80024200381550812580010108000010800005064000002001920038200389996310018800102080000201600002003820038118002110910108000010005020001016432003580000102003920039200392003920039
8002420038155039258001010800001080000506400000200192003820038999631001880010208000020160000200382003811800211091010800001000502000816442003580000102003920039200392003920039
80024200381556609258001010800001080000506400000200192003820038999631001880010208000020160000200382003811800211091010800001000502000616742003580000102003920039200392003920039