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

LD2 (multiple, post-index, 16B)

Test 1: uops

Code:

  ld2 { v0.16b, v1.16b }, [x6], x8
  nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop ; nop
  mov x0, 1
  mov x1, 2
  mov x8, 0

(no loop instructions)

1000 unrolls and 1 iteration

Retires (minus 60 nops): 4.000

Issues: 5.002

Integer unit issues: 1.001

Load/store unit issues: 2.000

SIMD/FP unit issues: 2.002

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 ldst uop (7d)map simd uop (7e)map ldst uop inputs (80)map simd uop inputs (81)? int output thing (e9)? ldst retires (ed)? simd retires (ee)
64005297665035100320282004100220042000300060001527050002000200030004000100120002000
64004295125003100120022000100020002000300060001527050002000200030004000100120002000
64004295225003100120022000100020002000300060001527050002000200030004000100120002000
64004295265003100120022000100020002000300060001527050002000200030004000100120002000
64004295535003100120022000100020002000300060001527050002000200030004000100120002000
64004295125003100120022000100020002000300060001528550002000200030004000100120002000
64005301765010100220062002100120022000300060001527250002000200030004000100120002000
64004297735005100120042000100020002000300060001527450002000200030004000100120002000
64004294805003100120022000100020002000300060001527450002000200030004000100120002000
64004294685003100120022000100020002000300060001527450002000200030004000100120002000

Test 2: Latency 1->3 roundtrip

Chain cycles: 3

Code:

  ld2 { v0.16b, v1.16b }, [x6], x8
  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): 9.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)
802051201471001225010230018200024013230030200063199261189873029036599011830209200063000960218300095001550001200002000040100
802041200421001045010130003200004010430008200063199127189876429036989011830209200063000960218300095001550001200002000040100
802041200421001045010130003200004010430008200063199127189876429036989011830209200063000960218300095001550001200002000040100
802041200421001045010130003200004010430008200063199127189876429036989011830209200063000960218300095001550001200002000040100
802051201341001195010730010200024013530035200063199127189876429036989011830209200063000960218300095001550001200002000040100
802041200421001045010130003200004010430008200063199127189876429036989011830209200063000960218300095001550001200002000040100
802041200421001045010130003200004010430008200063199127189876429036989011830209200063000960218300095001550001200002000040100
802041200421001045010130003200004010430008200063199127189876429036989011830209200063000960218300095001550001200002000040100
802041200421001045010130003200004010430008200063199127189876429036989011830209200063000960272300365006050007200002000040100
802041200421001045010130003200004010430008200063199127189876429036989011830209200063000960218300095001550001200002000040100

1000 unrolls and 10 iterations

Result (median cycles for code, minus 3 chain cycles): 9.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)
800251201511000325001230018200024004230030200003199056189912229043269001030020200003000060020300005000050001200002000040010
800241200401000145001130003200004001030000200003199137189917029043939001030020200003000060020300005000050001200002000040010
800241200401000145001130003200004001030000200003199137189917029043939001030020200003000060038300095001550001200002000040010
800241200491000175001130006200004001430008200003199191189920229044379001030020200003000060020300005000050001200002000040010
800241200421000145001130003200004001030000200003199191189920229044379001030020200003000060020300005000050001200002000040010
800241200421000145001130003200004001030000200003199191189920229044379001030020200003000060020300005000050001200002000040010
800241200421000145001130003200004001030000200003199191189920229044379001030020200003000060020300005000050001200002000040010
800251200751000265001730007200024004530035200003199137189905629042529001030020200003000060020300005000050001200002000040010
800241200421000145001130003200004001030000200003199191189920229044379001030020200003000060020300005000050001200002000040010
800241200421000145001130003200004001030000200003199191189920229044379001030020200003000060020300005000050001200002000040010

Test 3: Latency 2->3 roundtrip

Chain cycles: 3

Code:

  ld2 { v0.16b, v1.16b }, [x6], x8
  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): 9.0066

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)
802051201731001225010230018200024013230030200243200017189892429039879019430236200243003660218300095001550001200002000040100
802041200661001045010130003200004010430008200063199775189914829042269011830209200063000960218300095001550001200002000040100
802041200661001045010130003200004010430008200063199775189914829042269011830209200063000960218300095001550001200002000040100
802041200661001045010130003200004010430008200063199775189914829042269011830209200063000960218300095001550001200002000040100
802041200661001045010130003200004010430008200063199775189914829042269011830209200063000960218300095001550001200002000040100
802041200661001045010130003200004010430008200243202103190062029063449019430239200243003760218300095001550001200002000040100
802041200661001045010130003200004010430008200063199775189914829042269011830209200063000960218300095001550001200002000040100
802041200661001045010130003200004010430008200063199775189914829042269011830209200063000960218300095001550001200002000040100
802041200661001045010130003200004010430008200063199775189914829042269011830209200063000960218300095001550001200002000040100
802041200661001045010130003200004010430008200063199775189914829042269011830209200063000960218300095001550001200002000040100

1000 unrolls and 10 iterations

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

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)
800251201551000325001230018200024004230030200063199428189931229046049002830029200063000960020300005000050001200002000040010
800241200441000145001130003200004001030000200003199245189923429044819001030020200003000060020300005000050001200002000040010
800241200441000145001130003200004001030000200003199245189923429044819001030020200003000060020300005000050001200002000040010
800251200841000295001730010200024004530035200003199245189923429044819001030020200003000060020300005000050001200002000040010
800241200441000145001130003200004001030000200003199245189923429044819001030020200003000060020300005000050001200002000040010
800241200441000145001130003200004001030000200003199245189923429044819001030020200003000060020300005000050001200002000040010
800241200441000145001130003200004001030000200003199245189923429044819001030020200003000060020300005000050001200002000040010
800241200441000145001130003200004001030000200003199245189923429044819001030020200003000060092300365006050007200002000040010
800241200681000145001130003200004001030000200003199245189923429044819001030020200003000060020300005000050001200002000040010
800241200441000145001130003200004001030000200003199245189923429044819001030020200003000060020300005000050001200002000040010

Test 4: throughput

Count: 8

Code:

  ld2 { v0.16b, v1.16b }, [x6], x8
  ld2 { v0.16b, v1.16b }, [x6], x8
  ld2 { v0.16b, v1.16b }, [x6], x8
  ld2 { v0.16b, v1.16b }, [x6], x8
  ld2 { v0.16b, v1.16b }, [x6], x8
  ld2 { v0.16b, v1.16b }, [x6], x8
  ld2 { v0.16b, v1.16b }, [x6], x8
  ld2 { v0.16b, v1.16b }, [x6], x8
  mov x7, x6
  mov x8, x6
  mov x9, x6
  mov x10, x6
  mov x11, x6
  mov x12, x6
  mov x13, x6
  mov x8, 0

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

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)
3202051002194002878012116012816003880122160038160012240318480284128056440013020016001216001220024001832002480005160000160000100
3202041001004001438010516003016000880106160012160012240318480184128031440013020016001216001220024001832002480005160000160000100
3202041001004001438010516003016000880106160012160012240318480184128031440013020016001216001220024001832002480005160000160000100
3202041001004001438010516003016000880106160012160052240378480570128113840023020016005216005220024001532002080004160000160000100
3202051001574002478012516008416003880126160052160012240318480184128031440013020016001216001220024001832002480005160000160000100
3202041001004001438010516003016000880106160012160012240318480184128031440013020016001216001220024001832002480005160000160000100
3202041001004001438010516003016000880106160012160012240318480184128031440013020016001216001220024001832002480005160000160000100
3202041001004001438010516003016000880106160012160012240318480184128031440013020016001216001220024001832002480005160000160000100
3202041001004001438010516003016000880106160012160012240318488604128885040013020016001216001220024001832002480005160000160000100
3202041001004001438010516003016000880106160012160012240318480184128031440013020016001216001220024001832002480005160000160000100

1000 unrolls and 10 iterations

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

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)
3200251001624001978003116012816003880032160038160010240045480278128072840003520160010160010202400003200008000116000016000010
3200241000564000358001116002416000080010160000160000240030482016128227840001020160000160000202400003200008000116000016000010
3200251001054001458003516007216003880036160052160000240030480440128071040001020160000160000202400003200008000116000016000010
3200241000454000358001116002416000080010160000160000240030480148128041840001020160000160000202400003200008000116000016000010
3200241000454000358001116002416000080010160000160000240030480148128041840001020160000160000202400783201048002516000016000010
3200241000464000358001116002416000080010160000160000240030480148128041840001020160000160000202400003200008000116000016000010
3200241000464000358001116002416000080010160000160000240030480148128041840001020160000160000202400003200008000116000016000010
3200241000464000358001116002416000080010160000160000240030480148128041840001020160000160000202400003200008000116000016000010
3200241000464000358001116002416000080010160000160000240030480148128041840001020160000160000202400003200008000116000016000010
3200241000484000358001116002416000080010160000160000240030480148128041840001020160000160000202400003200008000116000016000010