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

Test 1: uops

Code:

  ld2 { v0.2d, v1.2d }, [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)
640052982740331202820042004200060001529040002000200020004000120002000
640042965340051200420002000200060001529040002000200020004000120002000
640042960340051200420002000200060001529040002000200020004000120002000
640042964040051200420002000200060001529040002000200020004000120002000
640042996940051200420002000200060001529040002000200020004000120002000
640042964140051200420002000200060001529040002000200020004000120002000
640042960540051200420002000200060001529040002000200020004000120002000
640042960640051200420002000200060001529040002000200020004000120002000
640042982640051200420002000200060001529040002000200020004000120002000
640043030540051200420002000200060001529240002000200020004000120002000

Test 2: Latency 1->3 roundtrip

Chain cycles: 3

Code:

  ld2 { v0.2d, v1.2d }, [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.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)
80205120147901214010130018200023013030024200243209249213937030847978018930241200263003960218200065001540001200002000040100
80204120042901044010130003200003010330002200043208719213900430843328010930209200063000960218200065001540001200002000040100
80204120042901044010130003200003010330002200043208763213907630843828010930209200063000960218200065001540001200002000040100
80204120042901044010130003200003010330002200243209035213924230846238019130241200263003960218200065001540001200002000040100
80204120042901044010130003200003010330002200043208763213907630843828010930209200063000960218200065001540001200002000040100
80205120075901154010630007200023013330032200043208898213916630845128010930209200063000960218200065001540001200002000040100
80204120042901044010130003200003010330002200043208817213911230844348010930209200063000960218200065001540001200002000040100
80204120045901044010130003200003010330002200043210572214026430860888010930209200063000960218200065001540001200002000040100
80204120045901044010130003200003010330002200043208763213907630843828010930209200063000960218200065001540001200002000040100
80204120042901044010130003200003010330002200043208763213907630843828010930209200063000960218200065001540001200002000040100

1000 unrolls and 10 iterations

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

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)
80025120156900314001130018200023004030024200003208930213904230844188001030020200003000060020200005000040001200002000040010
80024120047900174001130006200003001030000200003208968213910830844638001030020200003000060020200005000040001200002000040010
80024120047900174001130006200003001030000200003208968213910830844638001030020200003000060020200005000040001200002000040010
80025120090900314001630013200023004330032200003210291213994230856418001030020200003000060020200005000040001200002000040010
80024120047900174001130006200003001030000200243209282213933430847508009930062200263004060020200005000040001200002000040010
80024120051900174001130006200003001030000200003208968213910830844638001030020200003000060020200005000040001200002000040010
80025120127900314001630013200023004030030200043209039213918430845348001930029200063000960020200005000040001200002000040010
80024120049900174001130006200003001030000200003209022213914030845078001030020200003000060020200005000040001200002000040010
80024120049900174001130006200003001030000200003209022213914030845078001030020200003000060020200005000040001200002000040010
80024120049900174001130006200003001030000200003209022213914030845078001030020200003000060020200005000040001200002000040010

Test 3: Latency 2->3 roundtrip

Chain cycles: 3

Code:

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

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)
80205120150901214010130018200023013030024200043208908213911630844868010930209200063000960218200065001540001200002000040100
80204120042901044010130003200003010330002200043208952213918830845368010930209200063000960218200065001540001200002000040100
80204120049901074010130006200003010330002200243209060213925830846428018930242200263004060218200065001540001200002000040100
80204120049901074010130006200003010330002200043208763213907630843828010930209200063000960218200065001540001200002000040100
80204120047901074010130006200003010330002200043208854213908430844428010930209200063000960218200065001540001200002000040100
80204120047901074010130006200003010330002200043208898213915630844928010930209200063000960218200065001540001200002000040100
80204120047901074010130006200003010330002200043208898213915630844928010930209200063000960218200065001540001200002000040100
80206120167901324011130017200043016330062200043208854213908430844428010930209200063000960284200265006640006200002000040100
80204120061901074010130006200003010330002200043208952213919230845448010930209200063000960218200065001540001200002000040100
80204120050901074010130006200003010330002200043208898213915630844928010930209200063000960218200065001540001200002000040100

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)
80025120148900314001130018200023004030024200043209066213920230845608001930029200063000960038200065001540001200002000040010
80024120055900174001130006200003001030000200003209022213914030845078001030020200003000060020200005000040001200002000040010
80024120050900174001130006200003001030000200003209076213917630845598001030020200003000060020200005000040001200002000040010
80024120049900174001130006200003001030000200003209022213914030845078001030020200003000060020200005000040001200002000040010
80024120049900174001130006200003001030000200003209022213914030845078001030020200003000060104200265006640006200002000040010
80024120049900174001130006200003001030000200003209022213914030845078001030020200003000060020200005000040001200002000040010
80024120049900174001130006200003001030000200003209022213914030845078001030020200003000060020200005000040001200002000040010
80024120049900174001130006200003001030000200003209022213914030845078001030020200003000060020200005000040001200002000040010
80024120049900174001130006200003001030000200003209022213914030845078001030020200003000060020200005000040001200002000040010
80024120049900174001130006200003001030000200003209022213914030845078001030020200003000060038200065001540001200002000040010

Test 4: throughput

Count: 8

Code:

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

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)
3202058029132026710116012816003810016003816001230048021012802283201242001600121600122001600123200241160000160000100
3202048015032013510116002616000810016001216001230048021012802223201242001600121600122001600123200241160000160000100
3202048015032013510116002616000810016001216001230048021012802223201242001600121600122001600123200241160000160000100
3202048015032013510116002616000810016001216001230048021012802223201242001600121600122001600123200241160000160000100
3202048015032013510116002616000810016001216001230048021012802223201242001600121600122001600123200241160000160000100
3202048015032013510116002616000810016001216001230048021012802223201242001600121600122001600123200241160000160000100
3202058020732020110116006216003810016005416001230051582613157223201242001600121600122001600123200241160000160000100
3202048015032013510116002616000810016001216001230048021012802223201242001600121600122001600123200241160000160000100
3202048017232013510116002616000810016001216001230048021012802223201242001600121600122001600123200241160000160000100
3202048015032013510116002616000810016001216001230048021012802223201242001600121600122001600123200241160000160000100

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)
3200258025032017711160128160038101600381600123048014612964443200342016001216001220160000320000116000016000010
3200248007132003511160024160000101600001600003055222413524363200102016000016000020160054320108116000016000010
3200248005832003511160024160000101600001600003048014012804083200102016000016000020160000320000116000016000010
3200248005832003511160024160000101600001600003048014012804083200102016000016000020160000320000116000016000010
3200248005832003511160024160000101600001600003048014012804083200102016000016000020160000320000116000016000010
3200248006532003511160024160000101600001600003048014012804083200102016000016000020160000320000116000016000010
3200248005832003511160024160000101600001600003048014012804083200102016000016000020160000320000116000016000010
3200248005832003511160024160000101600001600003048014012804083200102016000016000020160000320000116000016000010
3200248005832003511160024160000101600001600003048014012804083200102016000016000020160054320108116000016000010
3200248005832003511160024160000101600001600003048014012804083200102016000016000020160000320000116000016000010