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, 2D)

Test 1: uops

Code:

  ld2 { v0.2d, v1.2d }, [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)
64005300685035100320282004100220042000300060001528550002000200030004000100120002000
64004294885003100120022000100020002000300060001527050002000200030004000100120002000
64004294875003100120022000100020002000300060001527050002000200030004000100120002000
64004294585003100120022000100020002000300060001527050002000200030004000100120002000
64004294595003100120022000100020002000300060001527050002000200030004000100120002000
64004294615003100120022000100020002000300060001527050002000200030004000100120002000
64004294855003100120022000100020002000300060001527050002000200030004000100120002000
64004295135003100120022000100020002000300060001527050002000200030004000100120002000
64004294915003100120022000100020002000300060001527050002000200030004000100120002000
64004295065003100120022000100020002000300060001527050002000200030004000100120002000

Test 2: Latency 1->3 roundtrip

Chain cycles: 3

Code:

  ld2 { v0.2d, v1.2d }, [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.0047

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)
802051201631001225010230018200024013230030200063199120189843029032959011830209200063000960218300095001550001200002000040100
802041200471001075010130006200004010430008200063199262189884429038089011830209200063000960218300095001550001200002000040100
802041200471001075010130006200004010430008200063199262189884429038089011830209200063000960272300365006050007200002000040100
802041200581001075010130006200004010430008200063199262189884429038089011830209200063000960218300095001550001200002000040100
802041200471001075010130006200004010430008200063199262189884429038089011830209200063000960218300095001550001200002000040100
802051200801001195010730010200024013530035200063199478189898829040169011830209200063000960218300095001550001200002000040100
802041200471001075010130006200004010430008200063199262189884429038089011830209200063000960218300095001550001200002000040100
802041200471001075010130006200004010430008200063199262189884429038089011830209200063000960272300365006050007200002000040100
802041200471001075010130006200004010430008200063199262189884429038089011830209200063000960218300095001550001200002000040100
802041200471001075010130006200004010430008200063199262189884429038089011830209200063000960218300095001550001200002000040100

1000 unrolls and 10 iterations

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

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)
800251201541000325001230018200024004230030200003199326189928229045479001030020200003000060020300005000050001200002000040010
800241200471000175001130006200004001030000200003199326189928229045479001030020200003000060092300365006050007200002000040010
800241200471000175001130006200004001030000200003199326189928229045479001030020200003000060020300005000050001200002000040010
800241200471000175001130006200004001030000200003199326189928229045479001030020200003000060020300005000050001200002000040010
800241200471000175001130006200004001030000200003199326189928229045479001030020200003000060020300005000050001200002000040010
800241200471000175001130006200004001030000200003199326189928229045479001030020200003000060020300005000050001200002000040010
800241200471000175001130006200004001030000200003199326189928229045479001030020200003000060092300365006050007200002000040010
800241201121000175001130006200004001030000200723205768190327829105499032630128200723010860020300005000050001200002000040010
800241200471000175001130006200004001030000200003199326189928229045479001030020200003000060020300005000050001200002000040010
800241200471000175001130006200004001030000200003199326189928229045479001030020200003000060020300005000050001200002000040010

Test 3: Latency 2->3 roundtrip

Chain cycles: 3

Code:

  ld2 { v0.2d, v1.2d }, [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.0068

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)
802051201871001225010230018200024013230030200063199780189904229040869011830209200063000960218300095001550001200002000040100
802041200681001045010130003200004010430008200063199829189918029042709011830209200063000960218300095001550001200002000040100
802041200681001045010130003200004010430008200063199829189918029042709011830209200063000960218300095001550001200002000040100
802041200681001045010130003200004010430008200063199829189918029042709011830209200063000960218300095001550001200002000040100
802041200681001045010130003200004010430008200223200213189933629045119019030238200243003660218300095001550001200002000040100
802041200681001045010130003200004010430008200063199829189918029042709011830209200063000960218300095001550001200002000040100
802041200681001045010130003200004010430008200063199829189918029042709011830209200063000960218300095001550001200002000040100
802041200681001045010130003200004010430008200063199829189918029042709011830209200063000960218300095001550001200002000040100
802041200681001045010130003200004010430008200063199829189918029042709011830209200063000960218300095001550001200002000040100
802041200681001045010130003200004010430008200243200267189940229045969019430236200243003660218300095001550001200002000040100

1000 unrolls and 10 iterations

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

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)
800251201551000325001230018200024004230030200063199383189928829045709002830029200063000960020300005000050001200002000040010
800241200511000175001130006200004001030000200003199434189934629046359001030020200003000060092300365006050007200002000040010
800241200741000205001130009200004001430008200003199488189937829046799001030020200003000060020300005000050001200002000040010
800241200531000175001130006200004001030000200003199488189937829046799001030020200003000060020300005000050001200002000040010
800241200531000175001130006200004001030000200003199488189937829046799001030020200003000060020300005000050001200002000040010
800241200531000175001130006200004001030000200003199488189937829046799001030020200003000060020300005000050001200002000040010
800241200531000175001130006200004001030000200243199821189962829050389010430056200243003660020300005000050001200002000040010
800241200531000175001130006200004001030000200003199488189937829046799001030020200003000060020300005000050001200002000040010
800241200531000175001130006200004001030000200003199488189937829046799001030020200003000060020300005000050001200002000040010
800241200531000175001130006200004001030000200003199488189937829046799001030020200003000060020300005000050001200002000040010

Test 4: throughput

Count: 8

Code:

  ld2 { v0.2d, v1.2d }, [x6], x8
  ld2 { v0.2d, v1.2d }, [x6], x8
  ld2 { v0.2d, v1.2d }, [x6], x8
  ld2 { v0.2d, v1.2d }, [x6], x8
  ld2 { v0.2d, v1.2d }, [x6], x8
  ld2 { v0.2d, v1.2d }, [x6], x8
  ld2 { v0.2d, v1.2d }, [x6], x8
  ld2 { v0.2d, v1.2d }, [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)
3202051002014002878012116012816003880122160038160012240318480292128047440013020016001216001220024001832002480005160000160000100
3202041001044001398010516002616000880106160012160012240318480218128023040013020016001216001220024001832002480005160000160000100
3202041000984001398010516002616000880106160012160012240318480216128023040013020016001216001220024001832002480005160000160000100
3202041000984001398010516002616000880106160012160012240318480216128023040013020016001216001220024001832002480005160000160000100
3202041000984001398010516002616000880106160012160050240375480444128060040022520016005016005020024001832002480005160000160000100
3202041000984001398010516002616000880106160012160012240318480218128023040013020016001216001220024001832002480005160000160000100
3202041000984001398010516002616000880106160012160012240318480218128023040013020016001216001220024001532002080004160000160000100
3202041000984001398010516002616000880106160012160012240318480218128023040013020016001216001220024001832002480005160000160000100
3202041000984001398010516002616000880106160012160012240318480216128023040013020016001216001220024001832002480005160000160000100
3202041000984001398010516002616000880106160012160012240318480218128023040013020016001216001220024001832002480005160000160000100

1000 unrolls and 10 iterations

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

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)
3200251003064001978003116012816003880032160038160012240048480312128079640004020160012160012202400003200008000116000016000010
3200241000634000678001516004416000880016160012160000240030480248128066640001020160000160000202400003200008000116000016000010
3200241000554000498001116003816000080010160000160000240030480248128066440001020160000160000202400003200008000116000016000010
3200241000544000498001116003816000080010160000160000240030480248128066440001020160000160000202400003200008000116000016000010
3200241000544000498001116003816000080010160000160000240030480242128066440001020160000160000202400003200008000116000016000010
3200241000544000498001116003816000080010160000160000240030489816129037640001020160000160000202400003200008000116000016000010
3200241000594000498001116003816000080010160000160000240030480248128066440001020160000160000202400003200008000116000016000010
3200241000534000498001116003816000080010160000160000240030480248128066440001020160000160000202400783201048002516000016000010
3200241000544000498001116003816000080010160000160000240030480248128066440001020160000160000202400003200008000116000016000010
3200241000544000498001116003816000080010160000160000240030480242128066440001020160000160000202400003200008000116000016000010