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

UHSUB (vector, 4H)

Test 1: uops

Code:

  uhsub v0.4h, v0.4h, 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 uop (01)cycle (02)031e3f4e51schedule uop (52)schedule simd uop (54)dispatch simd uop (57)ldst uops in schedulers (5b)60696d6emap 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 tlb access (a0)ld unit uop (a6)l1d cache writeback (a8)c2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
10042037160611687251000100010002646801201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
10042037150821687251000100010002646801201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
10042037150611687251000100010002646801201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
10042037150611687251000100010002646800201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
10042037150611687251000100010002646800201820372037157231895100010002000203720851110011000000073116111787100020382038203820382038
10042037150611687251000100010002646800201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
10042037160611687251000100010002646800201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
10042037150611687251000100010002646800201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
10042037150611687251000101210002646800201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
100420371501491687251000100010002646800201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038

Test 2: Latency 1->2

Code:

  uhsub v0.4h, v0.4h, 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 uop (01)cycle (02)030918193f4e51schedule 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 miss (a1)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1020420037150000191196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000007102163119791100001002003820038200382003820038
102042008415000061196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000007101161119791100001002003820038200382003820038
102042003715000061196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000007101161119791100001002003820038200382003820038
102042003715000061196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000007101161119791100001002003820038200382003820038
102042003715000084196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000007101161119791100001002003820038200382003820038
1020420037149000147196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000007101161119791100001002003820038200382003820038
102042003715000061196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000007101161119791100001002003820038200382003820038
102042003715000061196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000007101161119791100001002003820038200382003820038
102042003715000061196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000007101161119791100001002003820038200382003820038
102042003715000061196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000007101161119791100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)03191e3f4e51schedule 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
1002420037165015103196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001010640216321978510000102003820038200382003820038
10024200371500061196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640216421978510000102003820038200382003820038
10024200371500198145196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640216421978510000102003820038200382003820038
100242003715000103196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640216421978510000102003820038200382003820038
100242003715000214196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640216321978510000102003820038200382003820038
10024200371500061196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001003640216421978510000102003820038200382003820038
10024200371500061196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640216321978510000102003820038200382003820038
10024200371500089196874410010101000010100005028476801200182003720037184443187671001020100002020000200842003711100211091010100001000640216421978510000102003820038200382003820038
10024200371500061196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640216421978510000102003820038200382003820038
1002420037150001075196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640216421978510000102003820038200382003820038

Test 3: Latency 1->3

Code:

  uhsub v0.4h, v1.4h, 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 uop (01)cycle (02)03mmu table walk instruction (07)mmu 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)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)l1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
10204200371500000000033219687251010010010000100100005002847680020018020037200371842231874510100200100002002000020037200371110201100991001001000010000000710116111979125100001002003820038200382003820038
1020420037150000000006119687251010010010000100100005002847680020018020037200371842231874510100200100002002000020037200371110201100991001001000010000000710116111979125100001002003820038200382003820038
102042003715000000000611968725101001001000010010000500284768002001802003720037184223187451010020010000200200002003720037111020110099100100100001000000071011611197910100001002003820038200382003820038
1020420037150000100002081968725101001001000010010000500284768002001802003720037184223187451010020010000200200002003720037111020110099100100100001000000071011611197910100001002003820038200382003820038
102042003715000000000611968725101001001000010010000500284768002001802003720037184223187451010020010000200200002003720037111020110099100100100001000000071221722197910100001002003820038200382003820038
102042003715010000000611968725101001001000010010000500284768002001802003720037184223187451010020010000200200002003720037111020110099100100100001000000071011711197910100001002003820038200382003820038
102042003715000000000611968725101001001000010010000500284768002001802003720037184223187451010020010000200200002003720037111020110099100100100001000000071011611197910100001002003820038200382003820038
102042003715000000000611968725101001001000010010000500284768002001802003720037184223187451010020010000200200002003720037111020110099100100100001000000071011611197910100001002003820038200382003820038
102042003715501113141264130719687251010010010000100103045002847680020090020179200371844131880110586220103342122132220275202765110201100991001001000010022057882777441211982519100001002008520038200382003820182
102042022715002024273176011251967643101621001000010010000500284896302001802003720037184223187451010020010000200200002003720037111020110099100100100001000009071011611197910100001002003820038200382003820038

1000 unrolls and 10 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)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002420037150000000061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000006402162219785010000102003820038200382003820038
1002420037150000000061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000006402162219785010000102003820038200382003820038
1002420037150000000061196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000000006402162219785010000102003820038200382003820038
1002420037150000000061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000006402162219785010000102003820038200382003820038
100242003715000007200480196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000006402162219785010000102003820038200382003820038
10024200371500000000346196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000006402162219785010000102003820038200382003820038
1002420037150000000061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000006402162219785010000102003820038200382003820038
10024200371500000000103196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000006402162219785010000102003820038200382003820038
1002420037150000000082196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000006402162219785010000102003820038200382003820038
1002420037150000000061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000006402162219785010000102003820038200382003820038

Test 4: throughput

Count: 8

Code:

  uhsub v0.4h, v8.4h, v9.4h
  uhsub v1.4h, v8.4h, v9.4h
  uhsub v2.4h, v8.4h, v9.4h
  uhsub v3.4h, v8.4h, v9.4h
  uhsub v4.4h, v8.4h, v9.4h
  uhsub v5.4h, v8.4h, v9.4h
  uhsub v6.4h, v8.4h, v9.4h
  uhsub v7.4h, v8.4h, 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 uop (01)cycle (02)03l2 tlb miss data (0b)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)696d6emap 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)9facbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
802042006015000113258010810080008100800205006401322001920038200389977699898012020080032200160064200382003811802011009910010080000100011151180160020035800001002003920039200392003920039
80204200381500029258010810080008100800205006401322001920038200389977699898012020080032200160064200382003811802011009910010080000100011151180160020035800001002003920039200392003920039
80204200381500040258010010080000100800005006400002001920038200389973399968010020080000200160000200382003811802011009910010080000100000051101161120035800001002003920039200392003920039
80204200381500040258010010080000100800005006400002001920038200389973399968010020080000200160000200382003811802011009910010080000100000051101161120035800001002003920039200392003920039
80204200381500040258010010080000100800005006400002001920038200389973399968010020080000200160000200382003811802011009910010080000100000051101161120035800001002003920039200392003920039
80204200381500040258010010080000100800005006400002001920038200389973399968010020080000200160000200382003811802011009910010080000100000051101161120035800001002003920039200392003920039
80204200381500040258010010080000100800005006400002001920038200389973399968010020080000200160000200382003811802011009910010080000100000051101161120035800001002003920039200392003920039
80204200381500040258010010080000100800005006400002001920038200389973399968010020080000200160000200382003811802011009910010080000100000051101161120035800001002003920039200392003920039
80204200381500040498010010080000100800005006400002001920038200389973399968010020080000200160000200382003811802011009910010080000100000051101161120035800001002003920039200392003920039
8020420038150001062258010010080000100800005006400002001920038200389973399968010020080000200160000200382003811802011009910010080000100000051101161120035800001002003920039200892003920039

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l2 tlb miss data (0b)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)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)a9accfd0d2d5map dispatch bubble (d6)d9ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
80024200471501014425800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100005020003160332003580000102003920039200392003920039
80024200381560030525800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100005020002160322003580000102003920039200392003920039
8002420038150003925800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000101035020004160222008280000102003920039200392003920039
8002420038150003943800101080000128009650640000120019200382003899963100188001020800002016000020038200381180021109101080000100005020003160242003580000102003920039200392003920039
8002420038150003925800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100005020002160222003580000102003920039200392003920039
80024200381500123925800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100005020002160332003580000102003920039200392003920039
8002420038150003925800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000101935020002160432003580000102003920039200392003920039
8002420038150003925800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100005020002160222003580000102003920039200392003920039
800242003815000392580010108000010800005064000012001920038200389996310018800102080000201600002003820038118002110910108000010550125020002160442003580000102003920039200392003920039
8002420038150003925800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100005020004160422003580000102003920039200392003920039