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

Test 1: uops

Code:

  neg x0, x0, 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)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
1004203516006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
10042035150012810001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
10042035150021010001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
100420351601926110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036

Test 2: Latency 1->2

Code:

  neg x0, x0, 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)0318191e1f3f4c4d51schedule 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)9fld unit uop (a6)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020420035150000061100001980325201002010010100185342149169552003520035184293187001010010200102002003542111020110099100101001000000710259111979120000101002003620036200362003620036
1020420035150005010189100001980325201002010010100185342049169552003520035184293187001010010200102002003542111020110099100101001000000710159111979120000101002003620036200362003620036
102042003515000417061100001980325201002010010100185342149169552003520035184293187001010010200102002003542111020110099100101001000000710159111979120000101002003620036200362003620036
1020420035150000061100001976125201002010010100185342049169552003520035184293187001010010200102002003542111020110099100101001000000710159111979120000101002003620036200362003620036
102042003515000519061100091980325201252014410100185342149169552003520035184293187001010010200102002003542111020110099100101001000000710159111979120000101002003620036200362003620036
1020420035150000061100001980325201002010010100185342149169552003520035184293187001010010200102002003542111020110099100101001000000710159111979120000101002003620036202242003620036
1020420035150000061100001980325201002010010100185342049169552003520035184293187001010010200102002003542111020110099100101001000000710159111979120000101002003620036200362003620036
10204200351500012061100001980325201002010010100185342149169552003520035184293187001010010200102002003542111020110099100101001000000710159111979120000101002003620036200362003620036
1020420035150000061100001980325201002010010100185342049169552003520035184293187001010010200102002003542111020110099100101001000000710159111979120000101002003620036200362003620036
1020420035150000061100001980325201002010010100185342149169552003520035184293187001010010200102002003542111020110099100101001000000710159111979120000101002003620036200362003620036

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 data (0b)18191e3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6b6d6emap 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)9fld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100242003515000003611000019743252001020010100101853104916955020035200351845131871810010100201002020035421110021109101001010010640463441979220000100102003620036200362003620036
100242003514900000611000019743252001020010100101853104916955020035200351845131871810010100201002020035421110021109101001010200640363431979220000100102003620036200362003620036
100242003515000000611000019743252001020010100101853104916955020035200351845131871810010100201002020035421110021109101001010000640363431979220000100102003620036200362003620036
100242003515000000611000019743252001020010100101853104916955020035200351845131871810010100201002020035421110021109101001010000640463431979220000100102003620036200362003620036
100242003515000000611000019743252001020010100101853104916955020035200351845131871810010100201002020035421110021109101001010000640487341979220000100102003620036200362003620036
100242003515000000611000019743252001020010100101853104916955020035200351845131871810010100201002020035421110021109101001010000640463441979220000100102003620036200362003620036
1002420035150000001031000019743252001020010100101853104916955020035200351845131871810010100201002020035421110021109101001010000640463441979220000100102003620036200362003620036
100242003515000000611000019743252001020010100101853104916955020035200351845131871810010100201002020035421110021109101001010000640463441979220000100102003620036200362003620036
100242003515000000611000019743252001020010100101853104916955020035200351845131871810010100201002020035421110021109101001010013640463431979220000100102003620036200362003620036
100242003515000000611000019743252001020010100101853104916955020035200351845131871810010100201002020035421110021109101001010000706463441979220000100102003620036200362003620036

Test 3: throughput

Count: 8

Code:

  neg x0, x8, lsl #17
  neg x1, x8, lsl #17
  neg x2, x8, lsl #17
  neg x3, x8, lsl #17
  neg x4, x8, lsl #17
  neg x5, x8, lsl #17
  neg x6, x8, lsl #17
  neg x7, x8, 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)09l2 tlb miss data (0b)18191e1f3a3f4c4d51schedule 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 access (a0)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80204267682010000012006938003126146281601821601828026216190649236522673226732166518166618026280376803762673239118020110099100801001000000000111512901626729160082801002673226733267332673326732
80204267322000000039600288003126146281601821601828026216190649236522673226732166517166618026280376803762673239118020110099100801001000000000111512901626729160082801002673326733267332673226733
8020426731200000001200288003126146281601821601828026216190649236522673126732166518166618026280376803762673239118020110099100801001000000000111512901626729160082801002673326733267332673326733
8020426731200000001500288003126146281601821601828026216190649236522673126732166517166618026280376803762673239118020110099100801001000000000111512901626729160082801002673326733267332673326733
802042673220000000900288003126146281601821601828026216190649236522673226732166518166618026280376803762673139118020110099100801001000000000111512901626729160082801002673326733267332673326733
8020426732200000001800288003126146281601821601828026216190649236522673226732166518166618026280376803762673239118020110099100801001000000000111512901626729160082801002673326733267332673326733
802042673120000000000288003126146281601821601828026216190649236522673226732166518166618026280376803762673239118020110099100801001000000000111512901626729160082801002673326733267332673326733
802042673220000000900288003126146281601821601828026216190649236522673226732166518166618026280376803762673239118020110099100801001000000000111512901626729160082801002673326733267332673326733
8020426732200000001800288003126146281601821601828026216190649236522673226732166518166618026280376803762673239118020110099100801001000000000111512901626729160082801002673326733267332673327082
8020427080203111768045280161980512251631721614841613708172818514049240042707727139166618168238151581692816812713876718020110099100801001004001243280111530006427030161357801002713927082271412719927137

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03191e1f3f4c4d51schedule 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)9fcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024267172000210618000021280251600101600108001016314204923688267112671116623316685800108002080020267113911800211091080010105020162217626704160000800102671226712267122671226712
8002426711200090618000021280251600101600108001016314204923631267112671116623316685800108002080020267113911800211091080010105020172261726704160000800102671226712267122671226712
80024267112000198108618000021280251600101600108001016314204922979267112671116623316685800108002080020267113911800211091080010105020622171726704160000800102671226712267122671226712
800242671120004290618000021280251600101600108001016314204923631267112671116623316685800108002080020267113911800211091080010105020172261726704160000800102671226712267122671226712
800242671119904410618000021280251600101600108001016314204923631267112671116623316685800108002080020267113911800211091080010105020172214626704160000800102671226712267122671226712
80024267112000207061800002128025160010160010800101631420492363126711267111662331668580010800208002026711391180021109108001010502082217726704160000800102671226712267122671226712
80024267112120270618000021280251600101600108001016314204923631267112671116623316685800108002080020267113911800211091080010105020172217626704160000800102671226712267122671226712
80024267112000360618000021280251600101600108001016314204923631267112671116623316685800108002080020267113911800211091080010105020172217626704160000800102671226712267122671226712
8002426711200030061800002128025160010160010800101631420492363126711267111662331668580010800208002026711391180021109108001010502062271726704160000800102671226712267122671226712
800242671120004260618000021280251600101600108001016314204923631267112671116623316685800108002080020267113911800211091080010105020622171726704160000800102671226712267122671226712