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

USHL (vector, 4H)

Test 1: uops

Code:

  ushl 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)03mmu table walk data (08)18191e1f3f4e51schedule 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)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)dbddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
10042037150001206116872510001000100026468012018203720371572318951000100020002037203711100110000000000732160111787100020382038203820382038
10042037160009010316872510001000100026468002018203720371572318951000100020002037203711100110000000000731160111787100020382038203820382038
1004203716000006116872510001000100026468002018203720371574318951000100020002037203711100110000000000731160111787100020382038203820382038
1004203716000006116872510001000100026468002018203720371572318951000100020002037203711100110000001000731160111787100020382038203820382038
1004203716000006116872510001000100026468002018203720371572318951000100020002037203711100110000000000731160111787100020382038203820382038
1004203716000006116872510001000100026468002018203720371572318951000100020002037203711100110000000000731160111787100020382038203820382038
10042037170001206116872510001000100026468002018203720371572318951000100020002037203711100110000000000731160111787100020382038203820382038
1004203716000006116872510001000100026468002018203720371572318951000100020002037203711100110000000000731160111787100020382038203820382038
1004203715000006116872510001000100026468002018203720371572318951000100020002037203711100110000000000731160111787100020382038203820382038
10042037160000061168725100010001000264680020182037203715723189510001000200020372037111001100000029000731160111787100020382038203820382038

Test 2: Latency 1->2

Code:

  ushl 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)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)acc2branch mispred nonspec (cb)cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ea? simd retires (ee)? int retires (ef)f5f6f7f8fd
102042003715500003300821968725101001001000010010000500284768012001820037200371842231874510100200100002002000020037200371110201100991001001000010000010007100116111979100100001002003820038200382003820038
10204200371550000000611968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000000007100116111979100100001002003820038200382003820038
1020420037156000038400611968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000000007100116111979100100001002003820038200382003820038
10204200371550000300611968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000030007410116111979100100001002003820038200382003820038
102042003715500002100611968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000000007100116111979100100001002003820038200382003820038
102042003715500000001031968725101001001000010010000500284768012001820037200371842231874510100200100002002000020037200371110201100991001001000010000000007100116111979100100001002003820038200382003820038
1020420037155000015003461968725101001001000010010000500284768012001820037200371842231874510100200100002002000020037200371110201100991001001000010000003007100116111979100100001002003820038200382003820038
1020420037156000031500611968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000000007100116111979100100001002003820038200382003820038
102042003715500004500611968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000000017100116111979100100001002003820038200382003820038
1020420037155000036300611968725101001001000010010000500284768012001820037200371842231874510100200100002002000020037200371110201100991001001000010000000007100116111979100100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)03181e3f4e51schedule 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
10024200371500961196872510010101000010100005028476801200182003720037184447187671001020100002020000200372003711100211091010100001060640216221978510000102003820038200382003820038
10024200371500061196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640216221978510000102003820038200382003820038
100242003715013961196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640216221978510000102003820038200382003820038
10024200371500061196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640216221978510000102003820038200382003820038
100242008415009536196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000640216221978510000102003820038200382003820038
10024200371500061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000640216221978510000102003820038200382003820038
100242003715002761196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000640216121978510000102003820038200382003820038
10024200371500061196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640216221978510000102003820038200382003820038
10024200371500061196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640216221978510000102003820038200382003820038
10024200371500061196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640216221978510000102003820038200382003820038

Test 3: Latency 1->3

Code:

  ushl 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 data (08)l2 tlb miss data (0b)18191e1f3f4e51schedule 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)a9acc2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
10204200371550000150611968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000000000071011611197910100001002003820038200382003820038
102042003715500001650611968725101001001000010010000500284768012001820037200371842231874510100200100002002000020037200371110201100991001001000010000000000071011611197910100001002003820038200382003820038
1020420037155000012352611968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000000000071011611197910100001002003820038200382003820038
10204200371560000270611968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000204000071011611197910100001002003820038200382003820038
1020420037157000000611968725101001001000010010000500284768012001820037200371842231874510100200101652002000020037200371110201100991001001000010000002000071011611197910100001002003820038200382003820038
1020420037155000013201561968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000000000071011611197910100001002003820038200382003820038
102042003715500002790611968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000000000071011611197910100001002003820038200382003820038
10204200371550000150611968725101001001000010010000500284768012001820037200371842231874510100200100002002000020037200371110201100991001001000010000000000071011611197910100001002003820038200382003820038
10204200371560000150611968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000000000071011611197910100001002003820038200382003820086
10204200371550000330611968725101001001000010010000500284768012001820037200371842231874510100200100002002000020037200371110201100991001001000010000000000071011611197910100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss data (0b)1e1f3f4e51schedule 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)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
100242003715500102642530196547810035111003612104565528502460200182003720037184563187671001020106192020000200372003711100211091010100001000006402162219785010000102003820038200382003820038
1002420037155000372061196872510010101000010100005028515290200182003720037184443187671001020100002020000200372003711100211091010100001000006402162419785010000102003820038200382003820038
10024200371550000061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000606402162219785010000102003820038200382003820038
10024200371560013061196872510010121000010100005028476801200182003720037184443187671001020100002020000201822003711100211091010100001000006402164219785010000102003820038200382003820038
1002420037155000300281196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000006402162219785010000102003820038200382003820038
1002420037156000348061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000006402162219785010000102003820038200382003820038
1002420037155000420061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000006402162219785010000102003820038200382003820038
100242003715600018061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000006402162219785010000102003820038200382003820038
100242003715500012061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000006402162219785010000102003820038200382003820038
10024200371560006061196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001020006402162219785010000102003820038200382003820038

Test 4: throughput

Count: 8

Code:

  ushl v0.4h, v8.4h, v9.4h
  ushl v1.4h, v8.4h, v9.4h
  ushl v2.4h, v8.4h, v9.4h
  ushl v3.4h, v8.4h, v9.4h
  ushl v4.4h, v8.4h, v9.4h
  ushl v5.4h, v8.4h, v9.4h
  ushl v6.4h, v8.4h, v9.4h
  ushl 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)03181e3f51schedule 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)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
8020420038155012402580100100800001008000050064000012001920038200389973399968010020080000200160000200382003811802011009910010080000100051102161120035800001002003920039200392003920039
802042003815600552580100100800001008000050064000002001920038200389973399968010020080000200160000200382003811802011009910010080000100051101161120035800001002003920039200392003920039
802042003815500404880100100800001008000050064000002001920038200389973399968010020080000200160000200382003811802011009910010080000100051101161120035800001002003920039200392003920039
802042003815500402580100100800001008000050064000002001920038200389973399968010020080000200160000200382003811802011009910010080000100051101161120035800001002003920039200392003920039
802042003815510932580100100800001008000050064000002001920038200389973399968010020080000200160000200382003811802011009910010080000100051101161120035800001002003920039200392003920039
802042003815500402580100100800001008000050064000002001920038200389973399968010020080000200160000200382003811802011009910010080000100051101161120035800001002003920039200392003920039
802042003815500402580100100800001008000050064000002001920038200389973399968010020080000200160000200382003811802011009910010080000100051101161120035800001002003920039200392003920039
802042003815500402580100100800001008000050064000012001920038200389973399968010020080000200160000200382003811802011009910010080000100051101161120035800001002003920039200392003920039
802042003815500402580100100800001008000050064000002001920038200389973399968010020080000200160000200382003811802011009910010080000100051101161120035800001002003920039200392003920039
8020420038155002922580100100800001008000050064000012001920038200389973399968010020080000200160000200382003811802011009910010080000100051101161120035800001002003920039200392003920039

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)181e3f51schedule 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 cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
80024200391550036825800101080000108000050640000020019200382003899963100188001020800002016000020038200381180021109101080000100130503821167520035080000102003920039200392003920039
8002420038155000812580010108000010800005064000002001920038200389996310018800102080000201600002003820038118002110910108000010003050208165620035080000102003920039200392003920039
80024200381550003925800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100230502071671220035080000102003920039200392003920039
800242003816100039258001010800001080000506400001200192003820038999631001880010208000020160000200382003811800211091010800001001700502061661220035080000102003920039200392009120039
80024200381601048392580010108000010800005064000002001920038200389996310018800102080000201600002003820038118002110910108000010000050208167720035080000102003920039200392003920039
8002420038155000392580010108000010800005064000002001920038200389996310018800102080000201603902009020038118002110910108000010000050204168720035080000102003920039200392003920099
80024200381550002292580010108000010800005064000002001920038200389996310018800102080000201600002003820038118002110910108000010001405050736165620035280000102003920039200392003920039
800242003815500039258001010800001080000506400000200192003820038999631001880010208000020160000200382003811800211091010800001000005020111671220035080000102003920039200392003920039
8002420038155000392580010108000010800005064000002001920038200389996310018800102080000201600002003820038118002110910108000010003050206166520035080000102003920039200392003920039
80024200381550003925800101080000108000050640000020019200382003899963100188001020800002016000020038200381180021109101080000100000502061611720035080000102003920039200392003920039