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

Test 1: uops

Code:

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

Issues: 4.002

Integer unit issues: 1.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 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)
63005298294033100320281002100220041000300030001528440001000200020002000100110002000
63004295824003100120021000100020001000300030001527040001000200020002000100110002000
63004295784003100120021000100020001000300030001527040001000200020002000100110002000
63005296194003100120021000100020001000300030001527040001000200020002000100110002000
63004295544003100120021000100020001000300030001527040001000200020002000100110002000
63004295484003100120021000100020001000300030001527040001000200020002000100110002000
63004295484003100120021000100020001000300030001527040001000200020002000100110002000
63004299964005100120041000100020001000300030001527040001000200020002000100110002000
63004299074003100120021000100020001000300030021527440001000200020002000100110002000
63004295784003100120021000100020001000300030001527040001000200020002000100110002000

Test 2: Latency 1->3 roundtrip

Chain cycles: 3

Code:

  ld2 { v0.8b, v1.8b }, [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)
7020512015690121501023001810001401323003210003319928294937729065908011430208100033000960216200063000950001100002000040100
7020412004290104501013000310000401043000710003319915194939429065678011430208100033000960216200063000950001100002000040100
7020412004290104501013000310000401043000710012319953694949629067418018230239100123003760216200063000950001100002000040100
7020412004290104501013000310000401043000710003319915194939429065678011430208100033000960216200063000950001100002000040100
7020412004290104501013000310000401043000710003319915194939429065678011430208100033000960216200063000950001100002000040100
7020412004290104501013000310000401043000710003319915194939429065678011430208100033000960216200063000950001100002000040100
7020412004290104501013000310000401043000710003319915194939429065678011430208100033000960216200063000950001100002000040100
7020412004290104501013000310000401043000710012319953694949629068628018130238100133003760216200063000950001100002000040100
7020412004290104501013000310000401043000710003319915194939429065678011430208100033000960216200063000950001100002000040100
7020412004290104501013000310000401043000710003319915194939429065678011430208100033000960216200063000950001100002000040100

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)
7002512015190031500123001810001400423003210003319938094965129095138002330028100033000960020200003000050001100002000040010
7002512008890029500183001010001400453003510000319921594961329091578001030020100003000060020200003000050001100002000040010
7002412004290014500113000310000400103000010000319921594961329091578001030020100003000060020200003000050001100002000040010
7002412004290014500113000310000400103000010000319921594961329091578001030020100003000060020200003000050001100002000040010
7002412004290014500113000310000400103000010000319921594961329091578001030020100003000060020200003000050001100002000040010
7002412004290014500113000310000400103000010000319921594961329091578001030020100003000060096200263003750007100002000040010
7002412005290014500113000310000400103000010000319921594961329091578001030020100003000060020200003000050001100002000040010
7002412004290014500113000310000400103000010000319921594961329091578001030020100003000060020200003000050001100002000040010
7002412004290014500113000310000400103000010000319921594961329091578001030020100003000060020200003000050001100002000040010
7002412004290014500113000310000400103000010000319921594961329091578001030020100003000060020200003000050001100002000040010

Test 3: Latency 2->3 roundtrip

Chain cycles: 3

Code:

  ld2 { v0.8b, v1.8b }, [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.2437

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)
7020512254590121501023001810001401323003210003326385096844829583068011430208100033000960216200063000950001100002000040100
7020412243790104501013000310000401043000710003326377296853729584788011430208100033000960216200063000950001100002000040100
7020412243790104501013000310000401043000710003326377296853729584788011430208100033000960216200063000950001100002000040100
7020412243790104501013000310000401043000710012326394196857529585898018230238100133003760216200063000950001100002000040100
7020412243790104501013000310000401043000710003326377296853729584788011430208100033000960216200063000950001100002000040100
7020412245190107501013000610000401043000710003326387796845929583478011430208100033000960216200063000950001100002000040100
7020412243790104501013000310000401043000710003326377296853729584788011430208100033000960216200063000950001100002000040100
7020412243790104501013000310000401043000710003326377296853729584788011430208100033000960216200063000950001100002000040100
7020412243790104501013000310000401043000710003326377296853729584788011430208100033000960216200063000950001100002000040100
7020412245890104501013000310000401043000710003326377296853729584788011430208100033000960216200063000950001100002000040100

1000 unrolls and 10 iterations

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

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)
7002512312490031500123001810001400423003110003327836297305029722568002430028100033000960020200003000050001100002000040010
7002412291590017500113000610000400103000010000327677497259129707998001030020100003000060020200003000050001100002000040010
7002412291590017500113000610000400103000010012328475297708529782758009230059100123003760020200003000050001100002000040010
7002412291590017500113000610000400103000010000327677497259129707998001030020100003000060020200003000050001100002000040010
7002412291590017500113000610000400103000010000327677497259129707998001030020100003000060020200003000050001100002000040010
7002412291590017500113000610000400103000010000327923197341129731418001030020100003000060020200003000050001100002000040010
7002412291590017500113000610000400103000010000327677497259129707998001030020100003000060020200003000050001100002000040010
7002512307390027500163001010001400453003410000327677497259129707998001030020100003000060020200003000050001100002000040010
7002412291590017500113000610000400103000010000327677497259129707998001030020100003000060020200003000050001100002000040010
7002412291590017500113000610000400103000010000327677497259129707998001030020100003000060020200003000050001100002000040010

Test 4: throughput

Count: 8

Code:

  ld2 { v0.8b, v1.8b }, [x6], x8
  ld2 { v0.8b, v1.8b }, [x6], x8
  ld2 { v0.8b, v1.8b }, [x6], x8
  ld2 { v0.8b, v1.8b }, [x6], x8
  ld2 { v0.8b, v1.8b }, [x6], x8
  ld2 { v0.8b, v1.8b }, [x6], x8
  ld2 { v0.8b, v1.8b }, [x6], x8
  ld2 { v0.8b, v1.8b }, [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.0012

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)
24020680244320368801521601658005180153160097800083530803527321255795320127200800081600142001600121600128000680000160000100
24020480095320136801061600258000580107160010800073332733329401274181320124200800071600132001600161600168000680000160000100
24020480095320134801051600258000480107160010800073313443310221266390320124200800071600132001600161600168000680000160000100
24020480095320136801061600258000580107160010800073313253309901282022320124200800071600132001600141600138000680000160000100
24020480095320137801061600268000580108160012800073368393365001287645320124200800071600132001600141600138000580000160000100
24020480095320137801061600268000580108160012800073356943353611273541320124200800071600132001600141600138000680000160000100
24020480095320136801061600258000580107160010800063352523349281274405320120200800061600102001600141600138000580000160000100
24020580136320254801361600838003580138160071800073366313364881293080320124200800071600132001600141600138000580000160000100
24020480094320129801041600228000380106160008800073366313363061280797320124200800071600132001600161600168000680000160000100
24020480095320132801051600238000480107160009800073368563365221283771320124200800071600132001600161600168000680000160000100

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)
24002580173320165800331601108002280035160040800093920223919951376540320042208000916001820160018160018800078000016000010
24002480056320041800111600308000080010160000800003311613311381572053320010208000016000020160000160000800018000016000010
24002480056320041800111600308000080010160000800003453013452791572129320010208000016000020160074160074800358000016000010
24002480056320041800111600308000080010160000800003407893407681568565320010208000016000020160000160000800018000016000010
24002480056320041800111600308000080010160000800003368253368031562462320010208000016000020160000160000800018000016000010
24002480056320041800111600308000080010160000800003399853399641571613320010208000016000020160000160000800018000016000010
24002480056320041800111600308000080010160000800003389343389111576705320010208000016000020160000160000800018000016000010
24002480056320041800111600308000080010160000800003491603491381573567320010208000016000020160000160000800018000016000010
24002480056320041800111600308000080010160000800003474833474611573827320010208000016000020160000160000800018000016000010
24002480056320041800111600308000080010160000800003376493376271576757320010208000016000020160074160073800348000016000010