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

NEG (register, lsr, 64-bit)

Test 1: uops

Code:

  neg x0, x0, lsr #17
  mov x0, 1
  mov x1, 2

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 2.000

Integer unit issues: 2.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)03mmu table walk data (08)1e3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst int alu (97)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000732671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100001788731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100029731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036

Test 2: Latency 1->2

Code:

  neg x0, x0, lsr #17
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)031e1f3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020420035150006110000198032520100201001010018534214916955200352003518429318700101001020010200200354211102011009910010100100303710259111979120000101002003620036200362003620036
102042003515000611000019803252010020100101001853420491695520035200351842931870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036
102042003515000611000019803252010020100101001853420491695520035200351842931870010100102001020020035421110201100991001010010006710159111979120000101002003620036200362003620036
1020420035150006110000198032520100201001010018534204916955200352003518429318700101001020010200200354211102011009910010100100257683710159111979120000101002003620036200362003620036
102042003515000611000019803252010020100101001853420491695520035200351842931870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036
102042003515000611000019803252010020100101001853420491695520035200351842931870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036
1020420035149006110000198032520100201001010018534204916955200352003518429318700101001020010200200354211102011009910010100100333710159111979120000101002003620036200362003620036
102042003515000611000019803252010020100101001853420491695520035200351842931870010100102001020020035421110201100991001010010010710159111979120000101002003620036200362003620036
102042003515000611000019803252010020100101001853420491695520035200351842931870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036
1020420035149010825110000198032520100201001010018534204916955200352003518429318700101001020010200200354211102011009910010100100423710159111979120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)03l1i tlb fill (04)mmu table walk data (08)18191e1f3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fst unit uop (a7)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024202641521056672532256610054197918920101201511088319401614917090202622030618460261877910885110151103720126427110021109101001010102138277767115662002720142100102039820308203552035620356
100242026015201769335283010100631982417020146201441103119757614917227203402035118463361883610984112091120220350428110021109101001010012144407703103681999920114100102003620036200362003620036
10024200351500000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000640463431979220000100102003620036200362003620036
10024200351500000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000640363341979220000100102003620036200362003620036
100242003515000000061100001974325200102001010010185310149169552003520035184513187181001010020100202003542111002110910100101000045640463441979220000100102003620036200362003620036
10024200351500000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100200640463441979220000100102003620036200362003620036
10024200351500000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000640363321979220000100102003620036200362003620036
10024200351500000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100003640263321979220000100102003620036200362003620036
10024200351500000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000640363441979220000100102003620036200362003620036
10024200351500000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000640463431979220000100102003620036200362003620036

Test 3: throughput

Count: 8

Code:

  neg x0, x8, lsr #17
  neg x1, x8, lsr #17
  neg x2, x8, lsr #17
  neg x3, x8, lsr #17
  neg x4, x8, lsr #17
  neg x5, x8, lsr #17
  neg x6, x8, lsr #17
  neg x7, x8, lsr #17
  mov x8, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss data (0b)18191e1f3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)int prf full (71)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802042676920000000002880031261462816018216018280262161906049236522673226732166510716661802628037680376267323911802011009910080100100000000011151292162226729160082801002673326733267332673326733
802042673220000010902880031261462816018216018280262161906049236522673226732166510816661802628037680376267323911802011009910080100100000100011151292162126729160082801002673326733267332673226733
802042673220000000002880031261462816018216018280262161906049236522673226732166510816661802628037680376267323911802011009910080100100000006011151292162226729160082801002673326733267332673326733
802042673220000000002880031261462816018216018280262161906049236522673226732166510816661802628037680376267323911802011009910080100100000003011151291162126729160082801002673326733267332673326733
802042673220000000002880031261462816018216018280262161906149236522673226732166510716661802628037680376267323911802011009910080100100000000011151292162226729160082801002673326733267332673326733
802042673220000000003676800312614628160182160182802621619061492365126732267321665108166618026280376803762673239118020110099100801001000004500011151291161226729160082801002673326733267332673326733
802042673220000000002880031261462816018216018280262161906149236522673226732166510816661802628037680376267323911802011009910080100100000100011151292162226729160082801002673326733267332673326733
802042673220000000002880031261462816018216018280262161906149236522673226732166510816661802628037680376267323911802011009910080100100000203011151291162226729160082801002673326733267332673326733
8020426732200000000050380031261462816018216018280262161906049236522673226732166510816661802628037680376267323911802011009910080100100000100011151292162226728160082801002673326733267332673326733
802042673220000000002880031261462816018216018280262161906049236522673226732166510816661802628037680376267323911802011009910080100100000500011151292162226729160082801002673326733267332673326733

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)6061696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2branch mispred nonspec (cb)cdcfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800242673420000000000061800002128025160010160010800101631421049236312671126711166233166858001080020800202671139118002110910800101000002090005020006227926704160000800102671226712267122671226712
800242671120000000000061800002128025160010160010800101631421049236312671126711166233166858001080020800202671139118002110910800101000005000005020006227726704160000800102671226712267122671226712
8002426711200000000024061800002128025160010160010800101631421049236312671126711166233166858001080020800202671139218002110910800101000003000005020005226526704160000800102671226712267122671226712
800242671120000000000061800002128025160010160010800101631421049236312671126711166233166858001080020800202671139118002110910800101000001000005020005227526704160000800102671226712267122671226712
800242671120000000000061800002128025160010160010800101631421049236312671126711166613166858001080020800202671139118002110910800101000001000005020007226826704160000800102671226712267122671226712
800242671120000000000061800002128025160010160010800101631421049236312671126711166233166858001080020800202671139118002110910800101000004019950005020007225526704160000800102671226712267122671226712
800242671120000000000061800002128025160010160010800101631421049236312671126711166233166858001080020800202671139118002110910800101000203000005020007229626704160000800102671226712267122671226712
800242671120000000000061800002128025160010160010800101631421049236312671126711166233166858001080020800202671139118002110910800101000000000005020008225826704160000800102671226712267122671226712
800242671120000000000061800002128025160010160010800101631421049236312671126711166233166858001080020800202671139118002110910800101000001000005020005226526704160000800102671226712267122671226712
800242671120000000000061800002128025160010160010800101631421049236312671126711166233166858001080020800202671139118002110910800101000001000005020007226526704160000800102671226712267122671226712