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

Test 1: uops

Code:

  mvn x0, x0, 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)03mmu table walk instruction (07)l2 tlb miss instruction (0a)1e3a3f4c4d51schedule 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
1004203515110368100017352520002000100032570120352035157531842100010001000203542111001100006794674417812000100020362036203620362036
1004203515110368100017352520002000100032570120352035157531842100010001000203542111001100000794674417812000100020362036203620362036
1004203515110368100017352520002000100032570120352035157531842100010001000203542111001100000794674417812000100020362036203620362036
1004203515110368100017352520002000100032570120352035157531842100010001000203542111001100010794674417812000100020362036203620362036
1004203515110368100017352520002000100032570120352035157531842100010001000203542111001100000794674417812000100020362036203620362036
1004203515110368100017352520002000100032570020352035157531842100010001000203542111001100000794674417812000100020362036203620362036
100420351511031121000173525200020001000325700203520351575111842100010001000203542111001100000794674417812000100020362036203620362036
10042035151103200100017352520002000100032570120352035157531842100010001000203542111001100000794674417812000100020362036203620362036
10042035151103133100017352520002000100032570120352035157531842100010001000203542111001100000794674417812000100020362036203620362036
1004203515110368100017352520002000100032570120352035157531842100010001000203542111001100000794674417812000100020362036203620362036

Test 2: Latency 1->2

Code:

  mvn x0, x0, 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 data (08)181e1f3a3f4c4d51schedule 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 miss (a1)ld unit uop (a6)l1d cache writeback (a8)acc2branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204200351500000012610000198032520100201001010018534204916955200352003518429318700101001020010200200354211102011009910010100100000000710259111979120000101002003620036200362003620036
10204200351500000010310000198032520100201001010018534204916955200352003518429318700101001020010200200354211102011009910010100100000000710159111979120000101002003620036200362003620036
1020420035150000008210000198032520100201001010018534214916955200352003518429318700101001020010200200354211102011009910010100100000000710159111979120000101002003620036200362003620036
1020420035149000006110000198032520100201001010018534204916955200352003518429318700101001020010200200354211102011009910010100100000000710159111979120000101002003620036200362003620036
10204200351500000029610000198032520100201001010018534204916955200352003518429318700101001020010200200354211102011009910010100100000000710159111979120000101002003620036200812003620036
1020420035150000006110000198032520100201001010018534204916955200352003518429318700101001020010200200354211102011009910010100100000000710159111979120000101002003620036200362003620036
1020420035150000006110000198032520100201001010018534204916955200352003518429318700101001020010200200354211102011009910010100100000000710159111979120000101002003620036200362003620036
1020420035150000006110000198032520100201001010018534204916955200352003518429318700101001020010200200354211102011009910010100100000000710159111979120000101002003620036200362003620036
102042003515000000124100001980325201002010010100185342049169552003520035184293187001010010200102002003542111020110099100101001000007500710159111979120000101002003620036200362003620036
1020420035150000006110000198032520100201001010018534204916955200352003518429318700101001020010200200354211102011009910010100100000000710159111979120000101002003620036200362003620036

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)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)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
1002420035150000000000611000019743252001020010100101853104916955200352003518451318718100101002010020200354211100211091010010100000000661463641979220000100102003620036200362003620036
10024200351500000000001261000019743252001020010100101853104916955200352003518451318718100101002010020200354211100211091010010100000000640563561979220000100102003620036200362003620036
10024200351500000000001891000019743252001020010100101853104916955200352003518451318718100101002010020200354211100211091010010100000000640663651979220000100102003620036200362003620036
10024200351500000000001891000019743252001020010100101853104916955200352003518451318718100101002010020200354211100211091010010100000000640663651979220000100102003620036200692003620036
1002420035150000000000821000019743252001020010100101853104916955200352003518451318718100101002010020200354211100211091010010100000000640563561979220000100102003620036200362003620036
10024200351500000100002341000919743252001020010100101853104917001200812008018455318718100101002010020200354211100211091010010102300002662563651979220022100102008220081200802003620036
100242003515000000000012610000197432520010200101015718531049169552007920035184518187341015510188101882008142211002110910100101020000007529122871990520090100102021720264202622026420170
10024202621520011555404400260410036197891252012420121107361940004917180202622026018459211880010596108451085120217426110021109101001010001101004027268998101995320022100102021820299200812026720218
10024202631511110556604400243510036197771252010120122106231940134917182202162029218460231879910737108551070320263426110021109101001010000029930075271031041999820113100102026420175202652030620305
10024202631511100666725280308810054197951512014620146108841957574917183203062029718462301881210010110151102120306422110021109101001010000121395507697103861993020135100102035320310203102008120309

Test 3: throughput

Count: 8

Code:

  mvn x0, x8, asr #17
  mvn x1, x8, asr #17
  mvn x2, x8, asr #17
  mvn x3, x8, asr #17
  mvn x4, x8, asr #17
  mvn x5, x8, asr #17
  mvn x6, x8, asr #17
  mvn x7, x8, 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)18191e1f3a3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)6067696a6d6emap 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)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802042676820000000002880031261462816018216018280262161906104923652267322673216651816661802628037680376267323911802011009910080100100000000011151291160026729160082801002673326733267332673326733
802042673220000000005180031261462816018216018280262161906104923652267322673216651816661802628037680376267323911802011009910080100100000040011151290160026729160082801002673326732267332673326733
802042673220000000002880031261462816018216018280262161906004923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
802042673220000000002880031261462816018216018280262161906104923652267322673216651816661802628037680376267323911802011009910080100100000000011151280160026729160082801002673326733267332673326733
8020426731200000000013380031261462816018216018280262161906104923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
802042673220000000002880031261462816018216018280262161906004923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
802042673220000000002880031261462816018216018280262161906104923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
802042673220000000002880031261462816018216018280262161906104923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026728160082801002673326733267332673326733
802042673220000000002880031261462816018216018280262161906004923652267322673216651716661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
802042673220000000007080031261462816018216018280262161906104923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733

1000 unrolls and 10 iterations

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

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)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)accdcfd5map dispatch bubble (d6)dbddfetch restart (de)e0? int output thing (e9)eb? int retires (ef)f5f6f7f8fd
8002426734200001458000021280251600101600108001016314214923631267112671116623316685800108002080020267113911800211091080010100005020422423267041600000800102671226712267122671226712
800242671120000618000021280251600101600108001016314204923631267112671116623316685800108002080020267113911800211091080010100005020322432267041600000800102671226712267122671226712
800242671120000618000021280251600101600108001016314204923631267112676916625316685800108002080020267113911800211091080010100005020222434267041600000800102671226712267122671226712
800242671120000618000021280251600101600108001016314204923631267112671116623316685800108002080020267113911800211091080010100005020322433267041600000800102671226712267122671226712
800242671120000618000021280251600101600108001016314214923631267112671116623316685800108002080020267113911800211091080010100005020322332267041600000800102671226712267122671226712
800242671120000618000021280251600101600108001016314214923631267112671116623316685800108002080020267113911800211091080010100005020322433267041600000800102671226712267122671226712
800242671120000618000021280251600101600108001016314204923631267112671116623316685800108002080020267113911800211091080010100305020222332267041600000800102671226712267122671226712
800242671120000618000021280251600101600108001016314214923631267112671116623316685800108002080020267113911800211091080010100005020322333267041600000800102671226712267122671226712
800242671120000618000021280251600101600108001016314204923631267112671116623316685800108002080020267113911800211091080010100005020322332267041600000800102671226712267122671226712
800242671120000618000021280251600101600108001016314214923631267112671116623316685800108002080020267113911800211091080010100005020322433267041600000800102671226712267122671226712