Apple Microarchitecture Research by Dougall Johnson

M1/A14 P-core (Firestorm): Overview | Base Instructions | SIMD and FP Instructions
M1/A14 E-core (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 uop (01)cycle (02)03l2 tlb miss instruction (0a)1e3f4e51schedule uop (52)schedule simd uop (54)dispatch simd uop (57)ldst uops in schedulers (5b)696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map simd uop (7e)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst simd alu (9a)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (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 uop (01)cycle (02)031e3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)6061696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d cache writeback (a8)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int 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 uop (01)cycle (02)03l2 tlb miss data (0b)18191e3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696b6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int 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 uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3a3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int 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 uop (01)cycle (02)03mmu table walk data (08)191e3a3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int 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 uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int 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 uop (01)cycle (02)03mmu table walk data (08)1e3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)5f6061696d6emap stall dispatch (70)simd prf full (72)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d cache writeback (a8)acbranch cond mispred nonspec (c5)cfd0d2d5map dispatch bubble (d6)d9daddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
80024200401610039258001010800001080000506400000002001920038200389996031001880010208000020160000200382003811800211091010800001000050200021600332003580000102003920039200392003920039
8002420038155012392580010108000010800005064000000020019200382003899960310018800102080000201600002003820038118002110910108000010000502000410800552003580000102003920039200392003920039
80024200381550039258001010800001080000506400000002001920038200389996031001880010208000020160000200382003811800211091010800001000050200031600432003580000102003920039200392003920039
800242003815500229258001010800001080000506400000002001920038200389996031001880010208000020160000200382003811800211091010800001000050200041600442003580000102003920039200392003920039
80024200381550083258001010800001080000506400000002001920038200389996031001880010208000020160000200382003811800211091010800001000050200051600342003580000102003920039200392003920039
80024200381550039258001010800001080000506400000002001920038200389996031001880010208000020160000200382003811800211091010800001000050200091600342003580000102003920039200392003920039
800242003815500392580010108000010800005064000000020019200382003899960310018800102080000201600002003820038218002110910108000010000502000121600332003580000102003920039200392003920039
80024200381550039258001010800001080000506400000002001920038200389996031001880010208000020160000200382003811800211091010800001000050200051600342003580000102003920039200392003920039
800242003815500392580010108000010800005064000000020019200382003899960310018800102080000201600002003820038118002110910108000010030502000121600442003580000102003920039200392003920039
80024200381550039258001010800001080000506400000002001920038200389996031001880010208000020160000200382003811800211091010800001000050200041600332003580000102003920039200392003920039