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

MVN (register, asr, 32-bit)

Test 1: uops

Code:

  mvn w0, w0, asr #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)03l2 tlb miss data (0b)181e3f4c4d51schedule 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
1004203515000611000173525200020001000325701203520351575318421000100010002035421110011000024731671117812000100020362036203620362036
100420351500061100017352520002000100032570020352035157531842100010001000203542111001100003731671117812000100020362036203620362036
100420351500061100017352520002000100032570020352035157531842100010001000203542111001100009731671117812000100020362036203620362036
100420351500061100017352520002000100032570020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515000611000173525200020001000325701203520351575318421000100010002035421110011000012731671117812000100020362036203620362036
10042035150027611000173525200020001000325700203520351575318421000100010002035421110011000015731671117812000100020362036203620362036
100420351600061100017352520002000100032570020352035157531842100010001000203542111001100003731671117812000100020362036203620362036
100420351500061100017352520002000100032570120352035157531842100010001000203542111001100010731671117812000100020362036203620362036
100420351500132611000173525200020001000325701203520351575318421000100010002035421110011000033731671117812000100020362036203620362036
100420351500061100017352520002000100032570120352035157531842100010001000203542111001100000731671117812000100020362036203620362036

Test 2: Latency 1->2

Code:

  mvn w0, w0, asr #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)03mmu table walk instruction (07)l2 tlb miss instruction (0a)l2 tlb miss data (0b)191e1f3f4c4d51schedule 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)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020420035150110000611000019803252010020100101111849851491695520035200351847771873510111102321023220035421110201100991001010010003111719134111984820000101002003620036200362003620036
1020420035150110000611000019803252010020100101111849850491695520035200351847771873510111102321023220035421110201100991001010010000111720116111984820000101002003620036200362003620036
1020420035150110000611000019803252010020100101001853420491695520035200351842931870010100102001020020035421110201100991001010010021783000710259221979120000101002016420036200362003620036
10204200351500000120611000019803252010020100101001853421491695520035200351842931870010100102001020020035421110201100991001010010000000710259221979120000101002003620036200362003620036
1020420035150000000611000019803252010020100101001853421491695520035200351842931870010100102001020020035421110201100991001010010000000710259221979120000101002003620036200362003620081
1020420035150000000611000019803252010020100101001853421491695520035200351842931870010100102001020020035421110201100991001010010000000710259221979120000101002003620036200362003620036
1020420035150000000611000019803252010020100101001853421491695520035200351842931870010100102001020020035421110201100991001010010000000710259221979120000101002003620036200362003620036
10204200351500000001891000019803252010020100101001853420491695520035200351842931870010100102001020020035421110201100991001010010000000710259221979120000101002003620036200362003620036
1020420035150000060611000019803252010020100101001853420491700120035200841842931870010100102001020020035421110201100991001010010000000710259221979120000101002003620036200362003620036
1020420035150000000611000019803252010020100101001853420491695520035200351842931870010100102001020020035421110201100991001010010000000710259221979120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

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)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100242003515000000000082100001974325200102001010010185310149169552003520035184513187181001010020100202003542111002110910100101000000150640363441979220000100102003620036200362003620036
1002420035150000000000105210000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000000640363341979220000100102003620036200362003620036
10024200351500000000008210000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000000640463431979220000100102003620036200362003620036
100242003515000000000014510000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000000640363341979220000100102003620036200362003620036
10024200351500000000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100001030640463341979220000100102003620036200362003620036
10024200351500000000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000004640463441979220000100102003620036200362003620036
100242003515000000000058010000197432520010200101015618531014916955200352003518451318718100101002010020200354211100211091010010100001030640363341979220000100102003620036200362003620036
100242003515000000000027710000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000000640463341979220000100102003620036200362003620036
10024200351500000000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000000640363441979220000100102003620036200362003620036
10024200351500000000006110000197432520010200101001018531014916955200352003518451318718100101002010020200354211100211091010010100000000640363431979220000100102003620036200362003620036

Test 3: throughput

Count: 8

Code:

  mvn w0, w8, asr #17
  mvn w1, w8, asr #17
  mvn w2, w8, asr #17
  mvn w3, w8, asr #17
  mvn w4, w8, asr #17
  mvn w5, w8, asr #17
  mvn w6, w8, asr #17
  mvn w7, w8, asr #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)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
80204267682010000004508003126146281601821601828026216190604923652267322673216651816661802628037680376267323911802011009910080100100000000011151291160026729160082801002673326733267332673326733
8020426732201000000728003126146281601821601828026216190604923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673226733267332673326733
8020426732200110000498003126146281601821601828026216190614923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026728160082801002673326733267332673326733
8020426731200000000548003126146281601821601828026216190614923652267322673216651816661802628037680376267323911802011009910080100100000000011151280160026729160082801002673326733267332673326788
802042673220010003003978003126146281601821601828026216190604923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673226733267332673326732
8020426732200000000288003126146281601821601828026216190604923652267312673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
8020426732200000000288003126146281601821601828026216190614923652267322673216651716661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
8020426732200000000288003126146281601821601828026216190614923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673226733267332673226733
8020426732200000000498003126146281601821601828026216190604923652267322673116653816661802628037680376267323911802011009910080100100000000011151540160126729160082801002673326733268472685026733
80204267882000100006718011620839761601821601828026216530104923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3a3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6b6d6emap 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)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8002426734200001708000021280251600101600108001016314214923631026711267111662331668580010800208002026711391180021109108001010300050206224226704160000800102671226712267122671226712
8002426711200004138000021280251600101600108001016314204923631026711267111662331668580010800208002026711391180021109108001010000050204224226704160000800102671226712267122671226712
8002426711200004908000021280251600101600108001016314204923631026711267111662331668580010800208002026711391180021109108001010000050202224426704160178800102671226712267122671226712
8002426711200005108000021280251600101600108001016314214923631026711267111662331668580010800208002026711391180021109108001010000050204224226704160000800102671226712267122671226712
8002426711200005278000021280251600101600108001016314214923631026711267111662331668580010800208002026711391180021109108001010000050202222426704160000800102671226712267122671226712
800242671120000828000021280251600101600108001016314204923631326711267111662331668580010800208002026711391180021109108001010000050202222426704160000800102671226712267122671226712
8002426711200021248000021280251600101600108001016314204923631026711267111662331668580010800208002026711391180021109108001010000050202222326704160000800102671226712267122676926712
8002426711200021458000021280251600101600108001016314204923631026711267111662331668580010800208002026711391180021109108001010000050202223526704160000800102671226712267122671226712
800242671120000618000021280251600101600108001016314204923631026711267111662331668580010800208002026711391180021109108001010000050204224226704160000800102671226712267122671226712
800242671120000618000021280251600101600108001016314204923631026711267111662331668580010800208002026711391180021109108001010000050204222426704160000800102671226712267122671226712