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, lsl, 32-bit)

Test 1: uops

Code:

  neg w0, w0, lsl #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)031e3f4c4d51schedule 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10042035150611000173525200020001000325702035203515753184210001000100020354211100110000731671117812000100020362036203620362036
10042035150611000173525200020001000325702035203515753184210001000100020354211100110000731671117812000100020362036203620362036
10042035160611000173525200020001000325702035203515753184210001000100020354211100110000731671117812000100020362036203620362036
10042035150611000173525200020001000325702035203515753184210001000100020354211100110000731671117812000100020362036203620362036
10042035150611000173525200020001000325702035203515753184210001000100020354211100110000731671117812000100020362036203620362036
10042035150611000173525200020001000325702035203515753184210001000100020354211100110000731671117812000100020362036203620362036
10042035150611000173525200020001000325702035203515753184210001000100020354211100110000731671117812000100020362036203620362036
10042035150611000173525200020001000325702035203515753184210001000100020354211100110000731671117812000100020362036203620362036
10042035150611000173525200020001000325702035203515753184210001000100020354211100110000731671117812000100020362036203620362036
10042035150611000173525200020001000325702035203515753184210001000100020354211100110000731671117812000100020362036203620362036

Test 2: Latency 1->2

Code:

  neg w0, w0, lsl #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)0309l2 tlb miss data (0b)18191e3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6d6emap 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 miss (a1)l1d cache writeback (a8)a9acbranch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102042003515000000103100001980325201002010010100185342491695520035200351842931870010100102001020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
10204200351500000084100001980325201002010010100185342491695520035200351842931870010100102001020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
10204200351500000061100001980325201002010010100185342491695520035200351842931870010100102001020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
10204200351500000061100001980325201002010010100185342491695520035200351842931870010100102001020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
102042003515000000103100001980325201002010010100185342491695520035200351842961871310100102001020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
10204200351500000061100001980325201002010010100185342491695520035200351842931870010100102001020020035421110201100991001010010000000710159111979120033101002003620036200362003620036
10204200351500000061100001980325201002010010100185342491695520035200351842931870010100102001020020035421110201100991001010010001000710159111979120000101002003620036200362003620036
10204200351500000061100001980325201452010010279185342491695520035200351842931870010100102001020020082421110201100991001010010000000710159111979120000101002003620036200362003620036
10204200351500000061100001980325201002010010100185342491695520035200351842931870010100102001020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
10204200351500000061100001980325201002010010100185342491695520035200351842931870010100102001020020035421110201100991001010010000000710159111979120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)03mmu table walk data (08)l2 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)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 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)? int retires (ef)f5f6f7f8fd
1002420035150000000082100001974325200102001010010185310149169552003520035184513187181001010020100202003542111002110910100101000000000640363221979220000100102003620036200362003620036
1002420035150000000061100001974325200102001010010185310149169552003520035184513187181001010020100202003542111002110910100101000000000640263221979220000100102003620036200362003620036
1002420035150000000061100001974325200102001010010185310149169552003520035184513187181001010020100202003542111002110910100101000000000640263221979220000100102003620036200362003620036
1002420035150000000061100001974325200102001010010185310149169552003520035184513187181001010020100202003542111002110910100101000000000640263221979220000100102003620036200362003620036
1002420035150000000061100001974325200102001010010185310049169552003520035184513187181001010020100202003542111002110910100101000000000640263221979220000100102003620036200362003620036
1002420035150000000061100001974325200102001010010185310049169552003520035184513187181001010020100202008142211002110910100101000000000640263221979220000100102003620036200362003620036
10024200351500000000595100001974325200102001010010185310149169552003520035184517187341015610020100202003542111002110910100101000000000640263221982620023100102003620036200362003620036
10024200351500001100611000019743252001020010100101853101491700020035200351845131871810010100201002020035421110021109101001010440012100652746595631991720112100102003620263202612030820264
10024202171520014554044029751006319791152201452014910738193825049172272021920173184622918830108841085210862203084271100211091010010100020001197327475107551999120136100102029620309203012026020082
1002420264152001668045283451100451980614820146201451088119558614917219203072030918465311881710883110351086320298427110021109101001010403002307704124451999320113100102030720309203072030520081

Test 3: throughput

Count: 8

Code:

  neg w0, w8, lsl #17
  neg w1, w8, lsl #17
  neg w2, w8, lsl #17
  neg w3, w8, lsl #17
  neg w4, w8, lsl #17
  neg w5, w8, lsl #17
  neg w6, w8, lsl #17
  neg w7, w8, lsl #17
  mov x8, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)67696a6d6emap 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)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80204267712000000002880031261462816018216018280262161906049236522673226782166518166618026280376803762673239118020110099100801001000000000111512900160026729160082801002673326732267332673326733
80204267322010000002880031261462816018216018280262161906049236522673226732166518166618026280376803762673239118020110099100801001000000000111512900160026729160082801002673326733267332673326733
80204267322000000002880031261462716018216018280262161906049236522673226732166518166618026280376803762673239118020110099100801001000000000111512900160026729160082801002673326733267332673326733
802042673220000000028800312614628160182160182802621619060492365226732267321665181666180262803768037626732391180201100991008010010000013000111512900160026729160082801002673226733267332673326733
80204267322000000002880031261462816018216018280262161906049236522673226732166518166618026280376803762673239118020110099100801001000000000111512900160026729160082801002673326733267332673226733
80204267322000000002880031261462816018216018280262161906049236522673226732166518166618026280376803762673239118020110099100801001000000000111512900160026729160082801002673326733267332673326733
80204267322000000002880031261462816018216018280262161906049236522673226732166518166618026280376803762673239118020110099100801001000000000111512900160026729160082801002673326733267332673326733
80204267322000000002880031261462816018216018280262161906049236522673226732166518166618026280376803762673139118020110099100801001000000000111512900160026729160082801002673326733267332673326733
80204267322000000002880031261462816018216018280262161906049236522673226732166517166618026280376803762673239118020110099100801001000000000111512900161026729160082801002673326733267332673326733
80204267322000000002880031261462816018216018280262161906049236522673226732166518166618026280376803762673239118020110099100801001000000000111512900160026729160082801002673326733267322673326733

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1i tlb fill (04)mmu table walk data (08)09l2 tlb miss data (0b)18191e1f3a3f4c4d51schedule 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 tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2cfd2d5map dispatch bubble (d6)daddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024267172000000006360061800002128025160010160010800101631421492363126711267111662331668580010800208002026711391180021109108001010000000005020025220202626704160000800102671226712267122671226712
800242671120000000000061800002128025160010160010800101631421492363126711267111662331668580010800208002026711391180021109108001010000000005097023220262526704160000800102671226712267122671226712
8002426711200000001000114800002128025160010160010800101631421492363126711267111662331668580010800208002026711391180021109108001010000000005020025220202626704160000800102671226712267122671226712
8002426711200000000000536800002128025160010160010800101631420492363126711267111662331668580010800208002026711391180021109108001010000000005020024220192426704160000800102671226712267122671226712
800242671120000000000061800002128025160010160010800101631421492363126769268841662331668580010800208002026711391180021109108001010000000005020027220282726704160000800102671226770268852671226769
8002426711200000100300618000021280251600101600108001016314204923631267702671116623301668580219802318002026768391180021109108001010000000005020021220281426704160000800102671226712267122671226712
800242671120000000000061800002128025160010160010800101631421492363126711267111662331668580010800208002026711391180021109108001010000000005020027220222626704160000800102671226712267122671226712
800242671120000000000061800002128025160010160010800101631420492363126711267111662331668580010800208002026711391180021109108001010000000005020025220271926704160000800102671226712267122671226712
800242671120000000077100103800002128025160010160010800101631420492363126711267111662331668580010800208002026711391180021109108001010000000005020028220272626704160000800102671226712267122671226712
8002426711200000100534280082800002128025160010160010802201631420492363126770267111662431668580010800208002026711391180021109108001010000000005020027220152726704160000800102671226712267122671226712