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

LDNP (signed offset, S)

Test 1: uops

Code:

  ldnp s0, s1, [x6, #0x10]
  mov x0, 1
  mov x1, 2
  mov x8, 0

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 2.000

Issues: 2.000

Integer unit issues: 0.001

Load/store unit issues: 2.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)schedule ldst uop (55)dispatch ldst uop (58)simd uops in schedulers (5a)dispatch uop (78)map ldst uop (7d)map ldst uop inputs (80)? int output thing (e9)? ldst retires (ed)
2005116420311203020001616420002000200012000
2004105120011200020001616420002000200012000
2004105120011200020001616420002000200012000
2004105120011200020001616420002000200012000
2004105120011200020001616420002000200012000
2004105120011200020001616420002000200012000
2004105120011200020001616420002000200012000
2004105120011200020001616420002000200012000
2004105120011200020001616420002000200012000
2004105120011200020001616420002000200012000

Test 2: Latency 1->3 roundtrip

Chain cycles: 3

Code:

  ldnp s0, s1, [x6, #0x10]
  fmov x0, d0
  eor x8, x8, x0
  eor x8, x8, x0
  add x6, x6, x8
  mov x0, 1
  mov x1, 2
  mov x8, 0

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 3 chain cycles): 7.0042

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)schedule simd uop (54)schedule ldst uop (55)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)ldst uops in schedulers (5b)dispatch uop (78)map int uop (7c)map ldst uop (7d)map simd uop (7e)map int uop inputs (7f)map ldst uop inputs (80)map simd uop inputs (81)? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)
6020610018770120401081000820004301611002620004266927617793901048498601103021220008100046022420008100044000120000040100
6020410004970102401011000120000301031000320004266917917794001048548601103021220008100046022420008100044000120000040100
6020410004270102401011000120000301031000320004266904417793101048493601103021220008100046022420008100044000120000040100
6020410004270102401011000120000301031000320004266904417793101048493601103021220008100046022420008100044000120000040100
6020410004270102401011000120000301031000320004266904417793101048493601103021220008100046022420008100044000120000040100
6020410004270102401011000120000301031000320004266923317794361048570601103021220008100046022420008100044000120000040100
6020410004070102401011000120000301031000320004266899017792741048471601103021220008100046022420008100044000120000040100
6020410004070102401011000120000301031000320004266899017792741048471601103021220008100046022420008100044000120000040100
6020410004070102401011000120000301031000320004266899017792741048471601103021220008100046022420008100044000120000040100
6020410004070102401011000120000301031000320024266934717795021048576601723024120028100156022420008100044000120000040100

1000 unrolls and 10 iterations

Result (median cycles for code, minus 3 chain cycles): 7.0040

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)schedule simd uop (54)schedule ldst uop (55)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)ldst uops in schedulers (5b)dispatch uop (78)map int uop (7c)map ldst uop (7d)map simd uop (7e)map int uop inputs (7f)map ldst uop inputs (80)map simd uop inputs (81)? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)
6002510027670019400111000620002300401001520004266927117793621049491600203003220008100046002020000100004000120000040010
6002410004270012400111000120000300101000020000266911417792661049434600103002020000100006002020000100004000120000040010
6002410004270012400111000120000300101000020000266911417792661049434600103002020000100006002020000100004000120000040010
6002410004270012400111000120000300101000020000266911417792661049434600103002020000100006010220028100154000820000040010
6002410005170012400111000120000300101000020000266911417792661049434600103002020000100006002020000100004000120000040010
6002410004270012400111000120000300101000020000266911417792661049434600103002020000100006002020000100004000120000040010
6002410004270012400111000120000300101000020000266911417792661049434600103002020000100006002020000100004000120000040010
6002410007070012400111000120000300101000020000266919517793201049467600103002020000100006002020000100004000120000040010
6002410004270012400111000120000300101000020000266911417792661049434600103002020000100006002020000100004000120000040010
6002410004270012400111000120000300101000020024266949117795381049586600823006120028100156002020000100004000120000040010

Test 3: Latency 2->3 roundtrip

Chain cycles: 3

Code:

  ldnp s0, s1, [x6, #0x10]
  fmov x1, d1
  eor x8, x8, x1
  eor x8, x8, x1
  add x6, x6, x8
  mov x0, 1
  mov x1, 2
  mov x8, 0

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 3 chain cycles): 7.0042

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)schedule simd uop (54)schedule ldst uop (55)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)ldst uops in schedulers (5b)dispatch uop (78)map int uop (7c)map ldst uop (7d)map simd uop (7e)map int uop inputs (7f)map ldst uop inputs (80)map simd uop inputs (81)? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)
6020510015570109401011000620002301301001520004266919017793721048510601103021220008100046022420008100044000120000040100
60205100091701154010810005200023013410014203062260505147875984406859371339672100080386022420008100044000120000040100
6020410004270102401011000120000301031000320004266904417793101048493601103021220008100046022420008100044000120000040100
6020410004270102401011000120000301031000320004266963817797061048735601103021220008100046047220088100474003520000040100
6020410004270102401011000120000301031000320004266904417793101048493601103021220008100046022420008100044000120000040100
6020410004270102401011000120000301031000320004266904417793101048493601103021220008100046022420008100044000120000040100
6020410116370166401371001320016302311004720004266928717794721048592601103021220008100046022420008100044000120000040100
6020510007770113401081000320002301341001420004266904417793101048493601103021220008100046022420008100044000120000040100
6020410043870168401391001320016302311004720004266904417793101048493601103021220008100046022420008100044000120000040100
6020410004270102401011000120000301031000320004266904417793101048493601103021220008100046022420008100044000120000040100

1000 unrolls and 10 iterations

Result (median cycles for code, minus 3 chain cycles): 7.0040

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)schedule simd uop (54)schedule ldst uop (55)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)ldst uops in schedulers (5b)dispatch uop (78)map int uop (7c)map ldst uop (7d)map simd uop (7e)map int uop inputs (7f)map ldst uop inputs (80)map simd uop inputs (81)? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)
6002510014970019400111000620002300401001520004266962217795961049634600203003220008100046002020000100004000120000040010
6002410004270012400111000120000300101000020000266911417792661049434600103002020000100006002020000100004000120000040010
6002410004270012400111000120000300101000020000266911417792661049434600103002020000100006002020000100004000120000040010
6002410004270012400111000120000300101000020000266911417792661049434600103002020000100006002020000100004000120000040010
6002410004270012400111000120000300101000020000266911417792661049434600103002020000100006002020000100004000120000040010
6002410004270012400111000120000300101000020000266911417792661049434600103002020000100006002020000100004000120000040010
6002410004270012400111000120000300101000020000266911417792661049434600103002020000100006002020000100004000120000040010
6002410004270012400111000120000300101000020024267119817806801050282600823006520028100156002020000100004000120000040010
6002410004270012400111000120000300101000020000267127417807061050314600103002020000100006002020000100004000120000040010
6002410004270012400111000120000300101000020000267073417803461050094600103002020000100006002020000100004000120000040010

Test 4: throughput

Count: 8

Code:

  ldnp s0, s1, [x6, #0x10]
  ldnp s0, s1, [x6, #0x10]
  ldnp s0, s1, [x6, #0x10]
  ldnp s0, s1, [x6, #0x10]
  ldnp s0, s1, [x6, #0x10]
  ldnp s0, s1, [x6, #0x10]
  ldnp s0, s1, [x6, #0x10]
  ldnp s0, s1, [x6, #0x10]
  mov x7, x6
  mov x8, x6
  mov x9, x6
  mov x10, x6
  mov x11, x6
  mov x12, x6
  mov x13, x6

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)schedule simd uop (54)schedule ldst uop (55)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)dispatch uop (78)map int uop (7c)map ldst uop (7d)map int uop inputs (7f)map ldst uop inputs (80)map simd uop inputs (81)? int output thing (e9)? ldst retires (ed)? simd retires (ee)? int retires (ef)
1602058016916013710101600361000160008300512260160108200160012200160068011600000100
16020480112160101101016000010001600083001280012160108200160012200160012011600000100
16020480045160101101016000010001600083001280012160108200160012200160012011600000100
16020480048160101101016000010001600083001280012160108200160012200160012011600000100
1602048004516010110101600001000160008300128017416010820016001220223158736167100271500168612450
16020480107160101101016000010001600083001280028160108200160012200160012011600000100
1602048014616010110101600001000160008300960114160108200160012200160012011600000100
1602048007316010110101600001000160008300960068160108200160012200160012011600000100
16020480045160101101016000010001600083001280012160108200160012200160012011600000100
16020480045160101101016000010001600083001280012160108200160012200160012011600000100

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)schedule ldst uop (55)dispatch int uop (56)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)dispatch uop (78)map int uop (7c)map ldst uop (7d)map int uop inputs (7f)map ldst uop inputs (80)? int output thing (e9)? ldst retires (ed)? int retires (ef)
160025801801600451116003410160000306401641600102016000020160000116000010
1600248005116001111160000101600003012801641600102016000020160000116000010
1600248005116001111160000101600003012801641600102016000020160000116000010
1600248005116001111160000101600003012801641600102016000020160000116000010
1600248005116001111160000101600003012801641600102016000020160000116000010
1600258034916004111160030101600003012802721600102016000020160000116000010
1600248005116001111160000101600003012801641600102016000020160000116000010
1600248005116001111160000101600003012801641600102016000020160000116000010
1600248005416001111160000101600003012801641600102016000020160000116000010
1600248022616001111160000101600003012801641600102016000020160000116000010