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, 16B)

Test 1: uops

Code:

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

Integer unit issues: 0.001

Load/store unit issues: 2.000

SIMD/FP unit issues: 2.004

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)schedule simd uop (54)schedule ldst uop (55)dispatch simd uop (57)dispatch ldst uop (58)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)
640053060340331202820042004200060001528940002000200020004000120002000
640043125940051200420002000200060001529040002000200020004000120002000
640042951040051200420002000200060001528540002000200020004000120002000
640042948440051200420002000200060001528540002000200020004000120002000
640042949640051200420002000200060001528540002000200020004000120002000
640042951540051200420002000200060001528540002000200020004000120002000
640042949540051200420002000200060001528540002000200020004000120002000
640042950440051200420002000200060001528540002000200020004000120002000
640042951440051200420002000200060001528540002000200020004000120002000
640042950840051200420002000200060001528540002000200020004000120002000

Test 2: Latency 1->3 roundtrip

Chain cycles: 3

Code:

  ld2 { v0.16b, v1.16b }, [x6]
  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.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)
80205120158901214010130018200023013030024200043208952213918830845368010930209200063000960218200065001540001200002000040100
80204120042901044010130003200003010330002200043208719213900430843328010930209200063000960218200065001540001200002000040100
80204120042901044010130003200003010330002200043208763213907630843828010930209200063000960218200065001540001200002000040100
80204120042901044010130003200003010330002200043208763213907630843828010930209200063000960218200065001540001200002000040100
80204120042901044010130003200003010330002200243209057213925430846388018930242200263004060218200065001540001200002000040100
80204120042901044010130003200003010330002200043208763213907630843828010930209200063000960218200065001540001200002000040100
80204120130901074010130006200003010330002200043209357213945830849268010930209200063000960218200065001540001200002000040100
80204120042901044010130003200003010330002200043208925213918430845388010930209200063000960218200065001540001200002000040100
80204120042901044010130003200003010330002200043208871213914830844868010930209200063000960218200065001540001200002000040100
80205120134901154010630007200023013330032200243209031213924030846188018930242200263004060218200065001540001200002000040100

1000 unrolls and 10 iterations

Result (median cycles for code, minus 3 chain cycles): 9.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)
80025120515900314001130018200023004030024200003208930213904230844188001030020200003000060020200005000040001200002000040010
80024120047900174001130006200003001030000200003208779213899630843098001030020200003000060020200005000040001200002000040010
80024120040900144001130003200003001030000200003208779213899630843098001030020200003000060104200265006640006200002000040010
80024120048900174001130006200003001330002200003208741213893030842648001030020200003000060020200005000040001200002000040010
80024120040900144001130003200003001030000200003208779213899630843098001030020200003000060020200005000040001200002000040010
80024120042900144001130003200003001030000200003208860213905030843878001030020200003000060020200005000040001200002000040010
80024120040900144001130003200003001030000200003208779213899630843098001030020200003000060020200005000040001200002000040010
80025120110900254001630007200023004330032200003208833213902830843538001030020200003000060020200005000040001200002000040010
80024120040900144001130003200003001030000200003208779213899630843098001030020200003000060020200005000040001200002000040010
80024120040900144001130003200003001030000200003208779213899630843098001030020200003000060020200005000040001200002000040010

Test 3: Latency 2->3 roundtrip

Chain cycles: 3

Code:

  ld2 { v0.16b, v1.16b }, [x6]
  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.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)
80206120188901324010630022200043016030054200043208941213914430845258010930209200063000960218200065001540001200002000040100
80204120047901074010130006200003010330002200043208898213915630844928010930209200063000960218200065001540001200002000040100
80204120047901074010130006200003010330002200043208898213915630844928010930209200063000960218200065001540001200002000040100
80204120047901074010130006200003010330002200043208898213915630844928010930209200063000960284200305007440005200002000040100
80204120050901074010130006200003010330002200043208898213915630844928010930209200063000960218200065001540001200002000040100
80204120047901074010130006200003010330002200043208898213915630844928010930209200063000960218200065001540001200002000040100
80204120047901074010130006200003010330002200043208898213915630844928010930209200063000960218200065001540001200002000040100
80204120047901074010130006200003010330002200043208898213915630844928010930209200063000960218200065001540001200002000040100
80204120047901074010130006200003010330002200043208898213915630844928010930209200063000960284200265006640006200002000040100
80204120047901074010130006200003010330002200043208898213915630844928010930209200063000960218200065001540001200002000040100

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)
80025120189900314001130018200023004030024200043208758213897430842918001930029200063000960020200005000040001200002000040010
80024120040900144001130003200003001030000200243209093213922230845948009930062200263004060020200005000040001200002000040010
80025120073900254001630007200023004330032200003208806213901230843318001030020200003000060020200005000040001200002000040010
80024120042900144001130003200003001030000200003208779213899630843098001030020200003000060020200005000040001200002000040010
80024120040900144001130003200003001030000200003208779213899630843098001030020200003000060020200005000040001200002000040010
80024120040900144001130003200003001030000200003208779213899630843098001030020200003000060104200265006640006200002000040010
80024120058900144001130003200003001030000200003208779213899630843098001030020200003000060020200005000040001200002000040010
80024120044900144001130003200003001030000200003208779213899630843098001030020200003000060020200005000040001200002000040010
80024120042900144001130003200003001030000200003209103213921230846218001030020200003000060086200205005140009200002000040010
80024120040900144001130003200003001030000200003208779213899630843098001030020200003000060020200005000040001200002000040010

Test 4: throughput

Count: 8

Code:

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

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)
3202058026332026710116012816003810016003816001230048027212820963201242001600121600122001600123200241160000160000100
3202048017132015310116004416000810016001216001230048027212820923201242001600121600122001600123200241160000160000100
3202048016032015310116004416000810016001216001230048026812820923201242001600121600122001600123200241160000160000100
3202058021832021310116007416003810016005416001230048026812820923201242001600121600122001600123200241160000160000100
3202048016032015310116004416000810016001216001230048026812820923201242001600121600122001600123200241160000160000100
3202048016032015310116004416000810016001216001230048026812820923201242001600121600122001600123200241160000160000100
3202048016032015310116004416000810016001216001230048026812820923201242001600121600122001600123200241160000160000100
3202048016032015310116004416000810016001216001230049473012964263201242001600121600122001600123200241160000160000100
3202048016032015310116004416000810016001216001230048026812820923201242001600121600122001600123200241160000160000100
3202048016032015310116004416000810016001216001230049149012933043201242001600121600122001600123200241160000160000100

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 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)
3200258050932017511160126160038101600381600003067101014711763200102016000016000020160000320000116000016000010
3200258011632010911160060160038101600541600003048014012804083200102016000016000020160000320000116000016000010
3200248005832003511160024160000101600001600003048014012804083200102016000016000020160000320000116000016000010
3200248006232003511160024160000101600001600003053612813363883200102016000016000020160000320000116000016000010
35601919600035295819301160188173469192731601161600003059712214134323200102016000016000020160000320000116000016000010
3200248006132003711160026160000101600001600003057413013743983200102016000016000020160000320000116000016000010
3200248005832003511160024160000101600001600003048014012804083200102016000016000020160000320000116000016000010
3200248005832003511160024160000101600001600003048014012804083200102016000016000020160000320000116000016000010
3200248005832003511160024160000101600001600003048014012804083200102016000016000020160000320000116000016000010
3200248005832003511160024160000101600001600003048014012804083200102016000016000020160000320000116000016000010