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

Test 1: uops

Code:

  neg w0, w0, 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)031e3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)606d6emap 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
1004203515061100017352520002000100032570020352035157531842100010001000203542111001100000732672317812000100020362036203620362036
1004203515061100017352520002000100032570020352035157531842100010001000203542111001100000733673317812000100020362036203620362036
1004203515082100017352520002000100032570020352035157531842100010001000203542111001100000733673317812000100020362036203620362036
1004203515061100017352520002000100032570020352035157531842100010001000203542111001100000733673317812000100020362036203620362036
1004203516061100017352520002000100032570020352035157531842100010001000203542111001100000733673317812000100020362036203620362036
1004203515084100017352520002000100032570020352035157531842100010001000203542111001100000733673317812000100020362036203620362036
1004203515061100017352520002000100032570120352035157531842100010001000203542111001100000733673317812000100020362036203620362036
1004203515061100017352520002000100032570020352035157531842100010001000203542111001100000733673317812000100020362036203620362036
1004203515061100017352520002000100032570020352035157531842100010001000203542111001100000733673317812000100020362036203620362036
10042035150103100017352520002000100032570020352035157531842100010001000203542111001100000733673317812000100020362036203620362036

Test 2: Latency 1->2

Code:

  neg w0, w0, 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)031e3f4c4d51schedule 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
102042003515005361000019803252010020100101001853421491695520035200351842931870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036
10204200351500611000019803252010020100101001853421491695520035200351842931870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036
10204200351490611000019803252010020100101001853421491695520035200351842931870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036
102042003515039611000019803252010020100102581853421491695520035200351842931870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036
1020420035150462611000019803252010020100101001853421491695520035200351842931870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036
10204200351503611000019803252010020100101001853421491695520035200351842931870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036
10204200351503611000019803252010020100101001853421491695520035200351842931870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036
102042003515027611000019803252010020100101001853421491695520035200351842931870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036
10204200351500611000019803252010020100101001853421491695520035200351842931870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036
102042008515012611000019803252010020100101001853421491695520035200351843531870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)03191e3f4c4d51schedule 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)a9acc2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024200351501261771002719743252001020010100101853100491695520035200351845131871810010100201002020035421110021109101001010000000640263221979220000100102003620036200362003620036
10024200351500618831000019743252001020010100101853100491695520035200351845131871810010100201002020035421110021109101001010000000640263221979220000100102003620036200362003620036
10024200351500294611000019743252001020010100101853100491695520035200351845131871810010100201002020035421110021109101001010000000640263221979220000100102003620036200362003620036
10024200351500378611000019743252001020010100101853100491695520035200351845131871810010100201002020035421110021109101001010000300640263221979220000100102003620036200362003620036
10024200351500348611000019743252001020010100101853100491695520035200351845471871810157105201002020081421110021109101001010000040640283221979220000100102003620036200362003620036
1002420035149015611000019743252001020010100101853101491695520035200351845131871810010100201002020035421110021109101001010000000640263221979220000100102003620036200362003620036
10024200351500288611000019743252001020010100101853100491695520035200351845131871810010100201002020035421110021109101001010000300640263221979220000100102003620036200362003620036
100242003515003031031000019743252001020010100101853100491695520035200351845131871810010100201002020035421110021109101001010000000640263221979220000100102003620036200362003620036
1002420035150004411000019743252001020010100101853100491695520035200351845131871810010100201002020035421110021109101001010000020640263221979220000100102003620036200362003620036
100242003515000611000019743252001020010100101853100491695520035200351845131871810010100201002020035421110021109101001010000000640271221979220000100102003620036200362003620036

Test 3: throughput

Count: 8

Code:

  neg w0, w8, lsr #17
  neg w1, w8, lsr #17
  neg w2, w8, lsr #17
  neg w3, w8, lsr #17
  neg w4, w8, lsr #17
  neg w5, w8, lsr #17
  neg w6, w8, lsr #17
  neg w7, w8, lsr #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 instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)l2 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)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
8020426768200000000000288003126146281601821601828026216190614923652267322673216651816661802628037680376267323911802011009910080100100000000011151293160026729160082801002673326733267332673326733
802042673220000000001320288003126146281601821601828026216190614923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
8020426732200000000000288003126146281601821601828026216190614923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
8020426732200000000000288003126146281601821601828026216190614923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673226733
8020426731200000000000288003126146281601821601828026216190604923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
8020426732200000000000288003126146281601821601828026216190614923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
8020426732200000000000288003126146281601821601828026216190604923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
8020426732200000000000288003126146281601821601828026216190614923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
80204270762022101668015280166480509244572001612921614858173518112814924003270782714016662591681981727816848168327079397180201100991008010010022014436821115318117210326984161392801002708427138270872713627145
80204271352020111769246160288003126146281603621601828026216190614923652267322673216651816661802628037680376267323911802011009910080100100043024398011152770727026944161555801002713727136269622702427126

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6b6d6emap 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 cache writeback (a8)acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)dbddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024267342000618000021280251600101600108001016314204923631026711267111662303166858001080020800202671139118002110910800101001260502032203326704160000800102671226712267122671226712
800242671120006180000212802516001016001080010163142049236310267112671116623031668580010800208002026711391180021109108001010030502032203526704160000800102671226712267122671226712
8002426767200061800002128025160010160010800101631420492363102671126711166230316685800108002080020267113911800211091080010104600502052203226704160000800102671226712267122671226712
80024267112000618000021280251600101600108001016314214923631026711267111662303166858001080020800202671139118002110910800101001770502022202326704160000800102671226712267122671226712
800242671120006180000212802516001016001080010163142049236310267112671116623031668580010800208002026711391180021109108001010000502022202326704160000800102671226712267122671226712
800242671120096180000212802516001016001080010163142149236310267112671116623031668580010800208002026711391180021109108001010060502052203326704160000800102671226712267122671226712
80024267112000618000021280251600101600108001016314204923631026711267111662303166858001080020800202671139118002110910800101007280502032203226704160000800102671226712267122671226712
80024267112000618000021280251600101600108001016314204923631026711267111662303166858001080020800202671139118002110910800101001260502052205326704160000800102671226712267122671226712
80024267112000618000021280251600101600108001016314204923631026711267111662303166858001080020800202671139118002110910800101001170502032206526704160000800102671226712267122671226712
80024267112000618000021280251600101600108001016314214923631026711267111662303166858001080020800202671139118002110910800101001830502052205626704160000800102671226712267122671226712