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

Test 1: uops

Code:

  mvn x0, x0, 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)031e1f3f4c4d51schedule 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
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735452000200010003257020352035157531842100010001000203542111001100050731671117812000100020362036203620362036
100420351518058110001735252000200010003257020352035157531842100010001000203542111001100000731671117812022100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515606110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203516006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036
1004203515006110001735252000200010003257020352035157531842100010001000203542111001100000731671117812000100020362036203620362036

Test 2: Latency 1->2

Code:

  mvn x0, x0, 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)03l2 tlb miss data (0b)181e3f4c4d51schedule 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020420035150000611000019803252010020100101001853420491695502003520035184293187001010010200102002003542111020110099100101001000105710159111979120000101002003620036200362003620036
10204200351500006110000198032520100201001010018534204916955020035200351842931870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036
10204200351500006110000198032520100201001010018534214916955020035200351842931870010100102001020020035421110201100991001010010003710159111979120000101002003620036200362003620036
10204200351500008410000198032520100201001010018534214916955020035200351842931870010100102001020020035421110201100991001010010023710159111979120000101002003620036200362003620036
102042003515000061100001980325201002010010100185342049169550200352003518429318700101001020010200200354211102011009910010100100215710159111979120000101002003620036200362003620036
10204200351500006110000198032520100201001010018534204916955020035200351842931870010100102001020020035421110201100991001010010050710159111979120000101002003620036200362003620036
1020420035150000611000019803252010020100101001853420491695502003520035184293187001010010200102002003542111020210099100101001001105710159111979120000101002003620036200362003620036
102042003515000061100001980325201002010010100185342149169553200352003518429318700101001020010200200354211102011009910010100100530710159111979120000101002003620036200362003620036
10204200351500006110000198032520100201001010018534214916955020035200351842931870010100102001020020035421110201100991001010010000710159111979120000101002003620036200362003620036
10204200351500006110000198032520100201001010018534204916955020035200351842931870010100102001020020035421110201100991001010010003710159111979120000101002003620036200362003620036

1000 unrolls and 10 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
1002420035150061100001974325200102001010010185310149169552003520035184513187181001010020100202003542111002110910100101000640263221979220000100102003620036200362003620036
1002420035150061100091974325200102001010010185310149169552003520035184513187181001010020100202003542111002110910100101040640263221979220000100102003620036200362003620036
1002420035150061100001974325200102001010010185310149169552003520035184513187181001010020100202003542111002110910100101000640259221979220000100102003620036200362003620036
1002420035150061100001974325200102001010010185310149169552003520035184513187181001010020100202003542111002110910100101000640263221987420000100102003620036200362003620036
1002420035150061100001974325200102001010010185310149169552003520035184513187181001010020100202003542111002110910100101000640263221979220000100102003620036200362003620036
1002420035150061100001974325200102001010010185310149169552003520035184513187181001010020100202003542111002110910100101000640263221979220000100102003620036200362003620036
10024200351500943100001974325200102001010010185310149169552003520035184513187181001010020100202003542111002110910100101010642263221979220000100102003620036200362003620036
1002420035150061100001974325200102001010010185310149169552003520035184513187181001010020100202003542111002110910100101000640263221979220000100102003620036200362003620036
10024200351500103100001974325200102001010010185310198169552003520035184513187181001010020100202003542111002110910100101000640263221979220000100102003620036200362003620036
1002420035150061100001974325200102001010010185310149169552003520035184513187181001010020100202003542111002110910100101000640263221979220000100102003620036200362003620036

Test 3: throughput

Count: 8

Code:

  mvn x0, x8, lsr #17
  mvn x1, x8, lsr #17
  mvn x2, x8, lsr #17
  mvn x3, x8, lsr #17
  mvn x4, x8, lsr #17
  mvn x5, x8, lsr #17
  mvn x6, x8, lsr #17
  mvn x7, x8, 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 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)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)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802042673220100000000288003126146281601821601828026216190604923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
802042673220100000000288003126146281601821601828026216190614923652267322673216651816661802628037680376267323911802011009910080100100000100011151290160026729160082801002673326733267332673326733
802042673220000001000288003126146281601821601828026216190614923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
802042673220000000000288003126146281601821601828026216190614923652267322673216651716661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
802042673220000000000288003126146281601821601828026216190614923652267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
802042673220100000000468003126146281601821601828026216190614923651267322673216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326733
802042673220000000000288003126146281601821601828026216190604923652267322673216651816661802628037680376267323911802011009910080100100020003011151290160026729160082801002673326733267332673326732
80204267322000000000041148003126146281601821601828026216190604923652267322678216651816661802628037680376267323911802011009910080100100000000011151290160026729160082801002673326733267332673326732
802042673220100000000288003126146281601821601828026216190614923652267322673216651816661802628037680376267323911802011009910080100100230344368011152720640027033161371801002708227089271402707927129
80204270802040016692461601610805142442617516147516131081314186006049240622713527089166627016802815188190581896271523971802011009910080100100200324481411151202462226731160000801002674526745267452674526745

1000 unrolls and 10 iterations

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

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)9fld unit uop (a6)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024267342000061800002128025160010160010800101631420492363126711267111662331668580010800208002026711391180021109108001010030050206226526704160000800102671226712267122671226712
80024267112000061800002128025160010160010800101631420492363126711267111662331668580010800208002026711391180021109108001010000050205224526704160000800102671226712267122671226712
80024267112000061800002128025160010160010800101631421492363126711267111662331668580010800208002026711391180021109108001010000350207226726704160000800102671226712267122671226712
80024267112000061800002128025160010160010800101631421492363126711267111662331668580010800208002026711391180021109108001010000050204225426704160000800102671226712267122671226712
80024267112000061800002128025160010160010800101631420492363126711267111662331668580010800208002026711391180021109108001010010050205226626704160000800102671226712267122671226712
800242671120000103800002128025160010160010800101631421492363126711267111662331668580010800208002026711391180021109108001010010050204224426704160000800102671226712267122671226712
80024267112070061800002128025160010160010800101631420492363126711267111662331668580010800208002026711391180021109108001010000050205225526704160000800102671226712267122671226712
800242671120000726800002128025160010160010800101631421492363126711267111662331668580010800208002026711391180021109108001010020050205226726704160000800102671226712267122671226712
80024267112000061800002128025160010160010800101631421492363126711267111662331668580010800208002026711391180021109108001010000050205225526704160000800102671226712267122671226712
80024267112000061800002128025160010160010800101631420492363126711267111662331668580010800208002026711391180021109108001010000050204224426704160000800102671226712267122671226712