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

LD2R (8B)

Test 1: uops

Code:

  ld2r { v0.8b, v1.8b }, [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): 3.000

Issues: 3.002

Integer unit issues: 0.001

Load/store unit issues: 1.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 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)
630052950930311202810022004100030001529030001000200010002000110002000
630042929030051200410002000100030001527430001000200010002000110002000
630042930330031200210002000100030001527430001000200010002000110002000
630042930130031200210002000100030001527430001000200010002000110002000
630042930530031200210002000100130381535830031001200210002000110002000
630042930930031200210002000100030001527430001000200010002000110002000
630042928630031200210002000100030001527430001000200010002000110002000
630042930530031200210002000100030001527430001000200010002000110002000
630042931130031200210002000100030001527430001000200010002000110002000
630042935430051200410002000100030061528630001000200010002000110002000

Test 2: Latency 1->3 roundtrip

Chain cycles: 3

Code:

  ld2r { v0.8b, v1.8b }, [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)
70205120230801204010130018100013013030027100143210433120947330859997017930244100153004560216100033000940001100002000040100
70204120049801074010130006100003010330002100033208790120889730844447010830208100033000960216100033000940001100002000040100
70204120042801044010130003100003010330002100033208790120889730844447010830208100033000960216100033000940001100002000040100
70204120042801044010130003100003010330002100033208790120889730844447010830208100033000960290100153004440006100002000040100
70204120072801074010130006100003010330002100033208790120889730844447010830208100033000960216100033000940001100002000040100
70205120075801144010630007100013013330032100033208790120889730844447010830208100033000960216100033000940001100002000040100
70204120049801044010130003100003010330002100133209429120911530850247017830242100153004560216100033000940001100002000040100
70204120044801044010130003100003010330002100033208790120889730844447010830208100033000960216100033000940001100002000040100
70204120042801044010130003100003010330002100033208790120889730844447010830208100033000960216100033000940001100002000040100
70204120042801044010130003100003010330002100033208790120889730844447010830208100033000960216100033000940001100002000040100

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)
70026120316800404001630022100023007030057111013274003122718530879627328632886113023008560036100033000940001100002000040010
70024120049800174001130006100003001030000100003208917120936530844707001030020100003000060020100003000040001100002000040010
70024120042800144001130003100003001030000100003208863120934330844187001030020100003000060020100003000040001100002000040010
70024120042800144001130003100003001030000100003208863120934330844187001030020100003000060020100003000040001100002000040010
70024120042800144001130003100003001030000100003208863120934330844187001030020100003000060020100003000040001100002000040010
70025120075800244001630007100013004330032100003209241120949230847827001030020100003000060020100003000040001100002000040010
70024120042800144001130003100003001030000100003208863120934330844187001030020100003000060020100003000040001100002000040010
70024120042800144001130003100003001030000100003208863120934330844187001030020100003000060020100003000040001100002000040010
70024120042800144001130003100003001030000100003208863120934330844187001030020100003000060020100003000040001100002000040010
70024120042800144001130003100003001030000100003208863120934330844187001030020100003000060020100003000040001100002000040010

Test 3: Latency 2->3 roundtrip

Chain cycles: 3

Code:

  ld2r { v0.8b, v1.8b }, [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)
70205120145801204010130018100013013030027100033208854120880830844797010830208100033000960216100033000940001100002000040100
70204120047801074010130006100003010330002100033208925120894730845697010830208100033000960216100033000940001100002000040100
70204120047801074010130006100003010330002100033208925120894730845697010830208100033000960216100033000940001100002000040100
70204120047801074010130006100003010330002100033208925120894730845697010830208100033000960284100153004340006100002000040100
70204120047801074010130006100003010330002100033208925120894730845697010830208100033000960216100033000940001100002000040100
70204120047801074010130006100003010330002100033208925120894730845697010830208100033000960216100033000940001100002000040100
70204120047801074010130006100003010330002100033208925120894730845697010830208100033000960216100033000940001100002000040100
70204120047801074010130006100003010330002100033209033120899030846737010830208100033000960216100033000940001100002000040100
70204120047801074010130006100003010330002100033209033120898730846737010830208100033000960286100153004640006100002000040100
70204120047801074010130006100003010330002100143209244120904330848797017830240100153004560216100033000940001100002000040100

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)
70025120155800304001130018100013004030027100033209069120946230846197001830028100033000960020100003000040001100002000040010
70024120049800174001130006100003001030000100003209052120941330845937001030020100003000060036100033000940001100002000040010
70024120047800174001130006100003001030000100003208998120939330845437001030020100003000060020100003000040001100002000040010
70024120051800174001130006100003001330002100003209042120935330845727001030020100003000060020100003000040001100002000040010
70024120049800174001130006100003001030000100003209052120941330845937001030020100003000060020100003000040001100002000040010
70024120051800174001130006100003001030000100143211262121031330867227008930063100153004660020100003000040001100002000040010
70024120049800174001130006100003001030000100003209052120941330845937001030020100003000060020100003000040001100002000040010
70024120049800174001130006100003001030000100003209052120941330845937001030020100003000060020100003000040001100002000040010
70024120050800174001130006100003001030000100233212400121067430879087015930092100243007260308100483014040033100002000040010
70024120049800174001130006100003001030000100003209052120941330845937001030020100003000060020100003000040001100002000040010

Test 4: throughput

Count: 8

Code:

  ld2r { v0.8b, v1.8b }, [x6]
  ld2r { v0.8b, v1.8b }, [x6]
  ld2r { v0.8b, v1.8b }, [x6]
  ld2r { v0.8b, v1.8b }, [x6]
  ld2r { v0.8b, v1.8b }, [x6]
  ld2r { v0.8b, v1.8b }, [x6]
  ld2r { v0.8b, v1.8b }, [x6]
  ld2r { v0.8b, v1.8b }, [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.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)
2402058017824019310116007280020100160034800063002400359861302401142008000716001320080007160013180000160000100
24020480056240125101160020800041001600088000630024003516004902401142008000716001320080007160013180000160000100
24020480056240125101160020800041001600088000630024003516004902401142008000716001320080007160013180000160000100
24020480056240125101160020800041001600088000630024003516004902401142008000716001320080007160013180000160000100
24020480056240125101160020800041001600088000630024003516004902401142008000716001320080037160071180000160000100
24020480056240125101160020800041001600088000630024005216004902401142008000716001320080007160013180000160000100
24020480056240125101160020800041001600088000630024007516004902401142008000716001320080007160013180000160000100
24020480056240125101160020800041001600088000630024003516004902401142008000716001320080007160013180000160000100
24020480056240125101160020800041001600088000630024003516004902401142008000716001320080007160013180000160000100
24020480056240125101160020800041001600088000630024003516004902401142008000716001320080007160013180000160000100

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)
24002580166240106111600748002110160036800063024003510885102400242080007160013208000016000018000016000010
24002480071240031111600208000010160000800003024024816005382400102080000160000208000016000018000016000010
24002480056240031111600208000010160000800003024001716004442400102080000160000208000016000018000016000010
24002480056240031111600208000010160000800003024001716004442400102080000160000208000016000018000016000010
24002480056240031111600208000010160000800003024001716004442400102080000160000208000016000018000016000010
24002480056240031111600208000010160000800003024001716004442400102080000160000208000016000018000016000010
24002580092240100111600588003110160064800003024020316004442400102080000160000208002916005718000016000010
24002480056240031111600208000010160000800003024001716004442400102080000160000208000016000018000016000010
24002480056240031111600208000010160000800003024001716004442400102080000160000208000016000018000016000010
24002480056240031111600208000010160000800003024001716004442400102080000160000208000016000018000016000010