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

LSR (register, 32-bit)

Test 1: uops

Code:

  lsr w0, w0, w1
  mov x0, 1
  mov x1, 2

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 1.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)031e3f4d51schedule 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)cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1004103570618622510001000100016916110351035728386810001000200010354111100110000730241229371000100010361036103610361036
1004103580618622510001000100016916110351035728386810001000200010354111100110000730241229371000100010361036103610361036
1004103570618622510001000100016916110351035728386810001000200010354111100110000730241229371000100010361036103610361036
10041035801078622510001000100016916110351035728386810001000200010354111100110000730241239371000100010361036103610361036
1004103570618622510001000100016916110351035728386810001000200010354111100110000730241229371000100010361036103610361036
1004103570618622510001000100016916110351035728386810001000200010354111100110000730241229371000100010361036103610361036
1004103580618622510001000100016916110351035728386810001000200010354111100110000730241239371000100010361036103610361036
1004103580618622510001000100016916110351035728386810001000200010354111100110000730241229371000100010361036103610361036
1004103570618622510001000100016916110351035728386810001000200010354111100110000730241229371000100010361036103610361036
1004103580618622510001000100016916110351035728386810001000200010354111100110000730241229371000100010361036103610361036

Test 2: Latency 1->2

Code:

  lsr w0, w0, w1
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)031e1f3a3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6d6emap 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020410035750006198772510100101001010088664496955100351003585800387221010010200202001003541111020110099100101001000071013711994110000101001003610036100361003610036
10204100357500061987725101001010010434906584969551003510035858003872210100102002020010035411110201100991001010010001271013711994110000101001003610036100361003610036
1020410035750006198772510100101001010088664496955100351003585800387221010010200202001003541111020110099100101001000071013711994110000101001003610036100361003610036
1020410035760006198772510100101001010088664496955100351003585800387221010010200202001003541111020110099100101001000071013711994110000101001003610036100361003610036
1020410035750006198772510100101001010088664496955100351003585800387221010010200202001003541111020110099100101001000071013711994110000101001003610036100361003610036
1020410035750006198772510100101001010088664496955100351003585800387221010010200202001003541111020110099100101001000071013711994110000101001003610036100361003610036
10204100357500061987725101001010010100886644969551008210082858003872210100102002020010035411110201100991001010010002471013711994110000101001003610036100361003610036
1020410035760006198772510100101001010088664496955100351003585800387221010010200202001003541111020110099100101001000071013711994110000101001003610036100361003610036
1020410035750006198772510100101001010088664496955100351003585807387221010010200202001003541111020110099100101001000071013711994110000101001003610036100361003610036
1020410035750006198772510100101001010088664496955100351003585800387221010010200202001003541111020110099100101001000071013711994110000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03181e3f4d51schedule 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
10024100357513619863251001010010100108878404969551003510035860238740100101002020020100354111100211091010010100064034133994010000100101003610036100361003610036
100241003575015619863251001010010100108878404969551003510035860238740100101002020020100354111100211091010010100064034133994010000100101003610036100361003610036
100241003575015619863251001010010100108878404969551003510035860238740100121002020020100354111100211091010010100064034133994010000100101003610036100361003610036
100241003575001789863251001010010100108878404969551003510035860238740100101002020020100354111100211091010010100064034133994010000100101003610036100361003610036
10024100357501325369863251001010010100108878404969551003510035860238740100101002020020100354111100211091010010100064034133994010000100101003610036100811003610036
10024100357500619863251001010010100108878404969551003510035860238740100101002020020100354111100211091010010100064034133994010000100101003610036100361003610036
100241003575002139863251001010010100108878404969551003510035860238740100101002020020100354111100211091010010100064034132994010000100101003610036100361003610036
100241003575018619863251001010010100108878404969551003510035860238742100121002020020100354111100211091010010100064034133994010000100101003610036100361003610036
10024100357500619863251001010010100108878404969551003510035860238740100101002020020100354111100211091010010100064034133994010000100101003610036100361003610036
100241003575004419863251001010010100108878404969551003510035860238740100101002020020100354111100211091010010100064034133994010000100101003610036100361003610036

Test 3: Latency 1->3

Code:

  lsr w0, w1, w0
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3a3f4d51schedule 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)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204100357500000006198772510100101001010088664049695510035100358580387221010010200202001003541111020110099100101001000000000071013711994110000101001003610036100361003610036
10204100357500000006198772510100101001010088664049695510035100358580387221010010200202001003541111020110099100101001000000000071013711994110000101001003610036100361003610036
10204100357500000006198772510100101001010088664049695510035100358580387221010010200202001003541111020110099100101001000000030071013711997610000101001003610036100361003610036
102041003575000000061987725101001010010100886640496955100351003585803872210100102002020010035411110201100991001010010000027000071013711994110000101001003610036100361003610036
10204100357500000006198772510100101001010088664049695510035100358580387221010010200202001003541111020110099100101001000000030071013711994110000101001003610036100361003610036
10204100357500000006198772510100101001010088664049695510035100358580387221010010200202001003541111020110099100101001000000030071013711994110000101001003610036100361003610036
10204100357500000006198772510100101001010088664049695510035100358580387221010010200202001003541111020110099100101001000004000071013711994110000101001003610036100361003610036
10204100357500000006198772510100101001010088664049695510035100358580387221010010200202001003541111020110099100101001000005000071013711994110000101001003610036100361003610036
10204100357500000006198772510100101001010088664049695510035100358580387221010010200202001003541111020110099100101001000000000071013711994110000101001003610036100361003610036
10204100357500000006198772510100101001010088664049695510035100358580387221010010200202001003541111020110099100101001000000030071013711994110000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)031e3f4d51schedule 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)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100241007675195103986325100101001010010887841496955100351003586023874010010100202002010035411110021109101001010000064034122994010000100101003610036100361003610036
100241003575061986325100101001010010907821496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887841496955100351003586023874010010100202002010035411110021109101001010020064024122994010000100101003610036100361003610036
1002410035750185986325100101001010010887841496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036
100241003575661986325100101001010010887841496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036
10024100357620761986325100101001010010887841496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887841496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887841496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887841496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036
1002410035750194986325100101001010010887841496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036

Test 4: throughput

Count: 8

Code:

  lsr w0, w8, w9
  lsr w1, w8, w9
  lsr w2, w8, w9
  lsr w3, w8, w9
  lsr w4, w8, w9
  lsr w5, w8, w9
  lsr w6, w8, w9
  lsr w7, w8, w9
  mov x8, 9
  mov x9, 10

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03191e3f51schedule 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
80204134041010035258010080100801004005001491030613386133863323333418010080200160200133863911802011009910080100100005110319111338380000801001338713387133871338713387
80204133861000035258010080100801004005000491030613386133863323333418010080200160200133863911802011009910080100100005110119111338380000801001338713387133871338713387
80204133861000035258010080100801004005001491030613386133863323333418010080200160200133863911802011009910080100100005110119111338380000801001338713387133871338713387
80204133861000035258010080100801004005000491030613386133863323333418010080200160200133863911802011009910080100100065110119111338380000801001338713387133871338713387
80204133861000035258010080100801004005000491030613386133863323333418010080200160200133863911802011009910080100100005110119111338380000801001338713387133871338713387
80204133861000035258010080100801004005001491030613386133863323333418010080200160200133863911802011009910080100100105110119111338380000801001338713387133871338713387
80204133861000035258010080100801004005001491030613386133863323333418010080200160200133863911802011009910080100100105110119111338380000801001338713387133871338713387
80204133861000035258010080100801004005000491030613386133863323333418010080200160200133863911802011009910080100100005110119111338380000801001338713387133871338713387
80204133861010035258010080100801004005000491030613386133863323333418010080200160200133863911802011009910080100100035110119111338380000801001338713387133871338713387
80204133861010035258010080100801004005000491030613386133863323333418010080200160200133863911802011009910080100100705110119111338380000801001338713387133871338713387

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)6061696a6d6emap 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)acc3cfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024133761000352580010800108001040005015491029113371133733330033348800108002016002013371391180021109108001010000502253519551336880000800101337213372133721337213372
80024133711000352580010800108001040005015491029113371133713330033348800108002016002013371391180021109108001010000502153419551336880000800101337213372133721337213372
80024133711006352580010800108001040005015491029113371133713330033348800108002016002013371391180021109108001010000502153619661336880000800101337213372133721337213372
80024133711000352580010800108001040005015491029113371133713330033348800108002016002013371391180021109108001010000502253519661336880000800101337213372133721337213372
80024133711000352580010800108001040005015491029113371133713330033348800108002016002013371391180021109108001010000502154619551336880000800101337213372133721337213372
80024133711000352580010800108001040005005491029113371133733330033348800108002016002013371391180021109108001010000502154519651336880000800101337213372133721337213372
80024133711000352580010800108001040005010491029113371133713330033348800108002016002013371391180021109108001010000502100519541336880000800101337213372133721337213372
8002413371100252352580010800108001040005010491029113371133713330033348800108002016002013371391180021109108001010000502250519561336880000800101337213372133721337213372
80024133711000352580010800108001040005010491029113371133713330033348800108002016002013371391180021109108001010000502150619641336880000800101337213372133721337213372
80024133711000352580010800108001040005005491029113371133713330033348800108002016002013371391180021109108001010000502254619551336880000800101337213372133721337213372