Apple M1 Microarchitecture Research by Dougall Johnson

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

USUBW2 (vector, 8H)

Test 1: uops

Code:

  usubw2 v0.8h, v0.8h, v1.16b
  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)030a1e3f4e51inst 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)a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
100420371500611687251000100010002646802018203720371572318951000100020002037203711100110000373216221787100020382038203820382038
100420371520611687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
100420371620611687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
1004203716206116872510001000100026468020182037203715723189510001000200020372037111001100002173216221787100020382038203820382038
100420371620611687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
100420371620611687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
100420371520611687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
100420371520611687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
100420371620611687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
100420371600611687251000100010002646802018203720371572318951000100020002037203711100110000073216221787100020382038203820382038

Test 2: Latency 1->2

Code:

  usubw2 v0.8h, v0.8h, v1.16b
  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)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)9fa8accfd0d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102042003715501471968725101001001000010010000500284768000200182003720037184223187451010020010000200200002003720037111020110099100100100001000071001161119791100001002003820038200382003820038
10204200371550841968725101001001000010010000500284768010200182003720037184223187451010020010000200200002003720037111020110099100100100001001071001161119791100001002003820038200382003820038
10204200371560611968725101001001000010010000500284768000200182003720037184223187451010020010000200200002003720037111020110099100100100001000071001161119791100001002003820038200382003820038
10204200371553611968725101001001000010010000500284768010200182003720037184223187451010020010000200200002003720037111020110099100100100001000071001261119791100001002003820038200382003820038
102042003715612611968725101001001000010010000500284768010200182003720037184223187451010020010000200200002003720037111020110099100100100001000071001161119791100001002003820038200382003820038
10204200371560821968725101001251000010010000500284768010200182003720037184223187451010020010000200200002003720037111020110099100100100001000071001161119791100001002003820038200382003820038
10204200371550611968725101001001000010010000500284768010200182003720037184223187451010020010000200200002003720037111020110099100100100001000071001161119791100001002003820038200382003820038
102042003715601241968725101001001000010010000500284768010200182003720037184223187451010020010000200200002003720037111020110099100100100001000071001161119791100001002003820038200382003820038
1020420037155032061968725101001001000010010000500284768010200182003720037184223187451010020010000200200002003720037111020110099100100100001002371001161119791100001002003820038200382003820038
102042003715512841968725101001001000010010000500284768010200182003720037184223187451010020010000200200002003720037111020110099100100100001000071001161119791100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)030b18191e3f4e51inst 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)9fa0a1a6a8a9accdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100242003715000007261968725100101010000101000050284768002001802003720037184443187671001020100002020000200372003711100211091010100001000000006402163319785010000102003820038200382003820038
10024200371550000611968725100101010000101000050284768002001802003720037184443187671001020100002020000200372003711100211091010100001000010006402162219785010000102003820038200382003820038
1002420037150000061196872510010101000010100005028476800200180200372003718444318767100102010000202000020037200371110021109101010000100021013206402162219785010000102003820038200382003820038
10024200371500000611968725100101010000101000050284768002001802003720037184443187671001020100002020000200372003711100211091010100001000000006402162219785010000102003820038200382003820038
10024200371500000841968725100101010000101000050284768002001802003720037184443187671001020100002020000200372003711100211091010100001000000006402162219785010000102003820038200382003820038
100242003715000006119687251001010100001010000502847680020018020037200371844431876710010201000020200002003720037111002110910101000010000270006402162219785010000102003820038200382003820038
100242003715000006119687251001010100001010000502847680020018020037200371844431876710010201000020200002003720037111002110910101000010000250306402162219785010000102003820038200382003820038
100242003715000006119687251001010100481010608502847680020018020037201811845426188721092720100002121680203212027251100211091010100001004072006403164320004210000102022620386200852039820323
100242022715217506119643431008713100721410912712855378020162020180203711845129188791103022110042022298200852037041100211091010100001000000803907912737219859210000102008620038200382003820038
100242003715001066119687251001010100001010000662852812020270020322203671846424188771001020100002020000200372003711100211091010100001000070006402162219785010000102003820038200382003820038

Test 3: Latency 1->3

Code:

  usubw2 v0.8h, v1.8h, v0.16b
  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)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)9fa0a1a6a7a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102042003715500001200103196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
10204200371550000159132061196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
10204200371550000000124196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
10204200371610000000105196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
1020420037155000000061196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
1020420037155000000061196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000003071011611197910100001002003820038200382003820038
1020420037155000000061196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
1020420037155001156188084196764310116103100121001000050028476801200182003720085184263187621010020010000200200002003720037111020110099100100100001000000000073211611197910100001002003820038200382003820038
10204200371550000000103196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000000071011611197910100001002003820038200382003820038
10204201811550000106552801031961915210223140100361451091269028552581202702041620420184473918891112042081116022422340203702037271102011009910010010000100200010138550863273312006232100001002037120373204202037120373

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)0308191e3a3f4e51inst 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
10024200371550000124196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640316331978510000102003820038200382003820038
10024200371550000369196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000640316331978510000102003820038200382003820038
10024200371550000609196872510010101000010101526028476800200182008420037184447187671031620101662020000200372003711100211091010100001010661316331978510000102008620038200382003820038
1002420037156016082196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001003640316331978510000102003820038200382003820038
10024200371550000377196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640316331978510000102003820038200382003820038
1002420037161100061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000640316331978510000102003820038200382003820038
10024200371560000107196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000640316331978510000102003820038200382003820038
1002420037155000061196872510010101000012100005028502460200182003720037184443187671001020100002020000200372003711100211091010100001006640316331978510000102003820038200382003820038
10024200371550000147196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000640316331978510000102003820038200382003820038
10024200371560000191196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001003640316331978510000102003820038200862003820038

Test 4: throughput

Count: 8

Code:

  usubw2 v0.8h, v8.8h, v9.16b
  usubw2 v1.8h, v8.8h, v9.16b
  usubw2 v2.8h, v8.8h, v9.16b
  usubw2 v3.8h, v8.8h, v9.16b
  usubw2 v4.8h, v8.8h, v9.16b
  usubw2 v5.8h, v8.8h, v9.16b
  usubw2 v6.8h, v8.8h, v9.16b
  usubw2 v7.8h, v8.8h, v9.16b
  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)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)9fa0a1a6a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80204200591550000004025801001008000010080000500640000120019200382003899733999680100200800002001600002003820038118020110099100100800001000000000511021611200350800001002003920039200392003920039
80204200381550000904025801001008000010080000500640000120019200382003899733999680100200800002001600002003820038118020110099100100800001000000000511011611200350800001002003920039200392003920039
80204200381550000004025801001008000010080000500640000120019200382003899733999680100200800002001600002003820038118020110099100100800001000000000511011611200350800001002003920039200392003920039
80204200381550000004025801001008000010080000500640000020019200382003899733999680100200800002001600002003820038118020110099100100800001000000000511011611200350800001002003920039200392003920039
8020420038155000018019925801001008000010080000500640000020019200382003899733999680100200800002001600002003820038118020110099100100800001000000000511011611200350800001002003920039200392003920039
80204200381560000004025801001008000010080000500640000020019200382003899733999680100200800002001600002003820038118020110099100100800001000000000511011611200350800001002003920039200392003920039
80204200381560000004025801001008000010080000500640000020019200382003899733999680100200800002001600002003820038118020110099100100800001000000000511011611200350800001002003920039200392003920039
80204200381550000004025801001008000010080000500640000020019200382003899733999680100200800002001600002003820038118020110099100100800001000000000511011611200350800001002003920039200392003920039
80204200381550000006825801001008000010080000500640000020019200382003899733999680100200800002001600002003820038118020110099100100800001000000000511011611200350800001002003920039200392003920039
80204200381550000004025801001008000010080000500640000020019200382003899733999680100200800002001600002003820038118020110099100100800001000000000511011611200350800001002003920039200392003920039

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03081e3f51inst 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)5f6061696d6edispatch 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)9fa8acc5cfd0d2d5d6d9daddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80024200401610039258001010800001080000506400000002001920038200389996031001880010208000020160000200382003811800211091010800001000050200021600332003580000102003920039200392003920039
8002420038155012392580010108000010800005064000000020019200382003899960310018800102080000201600002003820038118002110910108000010000502000410800552003580000102003920039200392003920039
80024200381550039258001010800001080000506400000002001920038200389996031001880010208000020160000200382003811800211091010800001000050200031600432003580000102003920039200392003920039
800242003815500229258001010800001080000506400000002001920038200389996031001880010208000020160000200382003811800211091010800001000050200041600442003580000102003920039200392003920039
80024200381550083258001010800001080000506400000002001920038200389996031001880010208000020160000200382003811800211091010800001000050200051600342003580000102003920039200392003920039
80024200381550039258001010800001080000506400000002001920038200389996031001880010208000020160000200382003811800211091010800001000050200091600342003580000102003920039200392003920039
800242003815500392580010108000010800005064000000020019200382003899960310018800102080000201600002003820038218002110910108000010000502000121600332003580000102003920039200392003920039
80024200381550039258001010800001080000506400000002001920038200389996031001880010208000020160000200382003811800211091010800001000050200051600342003580000102003920039200392003920039
800242003815500392580010108000010800005064000000020019200382003899960310018800102080000201600002003820038118002110910108000010030502000121600442003580000102003920039200392003920039
80024200381550039258001010800001080000506400000002001920038200389996031001880010208000020160000200382003811800211091010800001000050200041600332003580000102003920039200392003920039