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

SADALP (vector, 2S)

Test 1: uops

Code:

  sadalp v0.2s, v1.4h
  movi v0.16b, 1
  movi v1.16b, 2

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 0.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 1.000

retire uop (01)cycle (02)0318191e3f4e51schedule uop (52)schedule simd uop (54)dispatch simd uop (57)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map simd uop (7e)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst simd alu (9a)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
10043037220006125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372200126125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037220006125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037230096125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037220036125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037230006125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037230006125482510001000100039831303018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037230006125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
10043037220096125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372200516125482510001000100039831303018303730372415328951000100020003037303711100110000073216222630100030383038303830383038

Test 2: Latency 1->1

Code:

  sadalp v0.2s, v1.4h
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03mmu table walk data (08)1e3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)simd prf full (72)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)l1d tlb miss (a1)st unit uop (a7)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
102043003722500612954825101001001000010010000500427731303001830037300372826503287451010020010000200200003003730037111020110099100100100001002200007101161129634100001003003830038300383003830038
102043008522400612954825101001001000010010000500427731303001830037300372826503287451010020010000200200003003730037111020110099100100100001000000067101161129634100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731303001830037300372826503287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731303001830037300372826503287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731303001830037300372826503287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038
102043003722500912954825101001001000010010000500427731303001830037300372826503287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038
102043008422500612954825101001001000010010000500427731313001830037300372826503287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731303001830037300372826503287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731313001830037300372826503287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731313001830037300372826503287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03mmu table walk data (08)191e1f3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)696d6emap stall dispatch (70)simd prf full (72)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)ld unit uop (a6)l1d cache writeback (a8)branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002430037224000061295482510010101000010100005042773133001830037300372828703287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225000061295482510010101000010100005042773133001830037300372828703287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225000061295482510010101000010100005042773133001830037300372828703287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225000061295482510010101000010100005042773133001830037300372828703287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225000061295482510010101000010100005042773133001830037300372828703287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225009061295482510010101000010100005042773133001830037300372828703287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225000061295482510010101000010100005042773133001830037300372828703287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225000061295482510010101000010100005042773133001830037300372828703287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225000061295482510010101000010100005042773133001830037300372828703287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225000061295482510010101000010100005042773133001830037300372828703287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  sadalp v0.2s, v0.4h
  movi v0.16b, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03mmu table walk instruction (07)l2 tlb miss instruction (0a)l2 tlb miss data (0b)3a3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)simd prf full (72)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
102043003722511006129547251010010010000100100005004277160130018300373003728271072874110100200100082002001630037300371110201100991001001000010000001117171161129649100001003003830038300383003830038
102043003722511006129547251010010010000100100005004277160030018300373003728271062874110100200100082002001630037300371110201100991001001000010000001117171161129649100001003003830038300383003830038
102043003722511006129547251010010010000100100005004277160130018300373003728271072874110100200100082002001630037300371110201100991001001000010000001117181161129648100001003003830038300383003830038
102043003722511006129547251010010010000100100005004277160030018300373003728271072874010100200100082002001630037300371110201100991001001000010000001117181161129648100001003003830038300383003830038
102043003722511006129547251010010010000100100005004277160030018300373003728271062874110100200100082002001630037300371110201100991001001000010000001117171161129648100001003003830038300383003830038
102043003722511006129547251010010010000100100005004277160030018300373003728271072874110100200100082002001630037300371110201100991001001000010000001117181161129648100001003003830038300383003830038
102043003722511006129547251010010010000100100005004277160030018300373003728271072874010100200100082002001630037300371110201100991001001000010000001117171161129649100001003003830038300383003830038
102043003722411008229547251010010010000100100005004277160030018300373003728271072874110100200100082002001630037300371110201100991001001000010000031117224244429629100001003003830038300383003830038
102043003722500019729547251010010010000100100005004277160030018300373003728252062873310100200100002002000030037300371110201100991001001000010000001117224244429629100001003003830038300383003830038
102043003722500019729547251010010010000100100005004277160130018300373003728252062873310100200100002002000030037300371110201100991001001000010000001117224244429629100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03mmu table walk data (08)1e3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fld unit uop (a6)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002430037224006129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640240222962910000103003830038300383003830038
100243003722504476129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722504446129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722505106129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
1002430037225006129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722503936129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722504026129547251001010100001010000504277160130064300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722504296129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722504566129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100001640216222962910000103003830038300383003830038
100243003722503816129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  sadalp v0.2s, v8.4h
  movi v1.16b, 0
  sadalp v1.2s, v8.4h
  movi v2.16b, 0
  sadalp v2.2s, v8.4h
  movi v3.16b, 0
  sadalp v3.2s, v8.4h
  movi v4.16b, 0
  sadalp v4.2s, v8.4h
  movi v5.16b, 0
  sadalp v5.2s, v8.4h
  movi v6.16b, 0
  sadalp v6.2s, v8.4h
  movi v7.16b, 0
  sadalp v7.2s, v8.4h
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)031e3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)696d6emap rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
16020420089150395625801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
1602042006515002925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
1602042006515002925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
160204200651502012925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
16020420065150722925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
16020420065150212925801161008001610080028500640196200452006520065612801282008013320016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
160204200651511850425801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
16020420065150182925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
1602042006515102925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066
160204200651504442925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901600200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l2 tlb miss instruction (0a)1e1f3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)5f6061696d6emap rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fld unit uop (a6)l1d cache writeback (a8)accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaec? simd retires (ee)? int retires (ef)f5f6f7f8fd
160024200801501204045278001010800001080000506400001002003220051200513228001020800002016000020051200511116002110910101600001000010043352192521120920048201160000102005220052200522005220052
160024200511500150452780010108000010800005064000010102003220051200513228001020800002016000020051200511116002110910101600001000010043311192521119920048201160000102005220052200522005220052
16002420051150000452780010108000010800005064000000020032200512005132280010208000020160000200512005111160021109101016000010000100401311192521181920048201160000102005220134200522005220052
160024200511500003701278001010800001080000506400001002003220051200513228001020800002016000020051200511116002110910101600001000010043392193442291620057201160000102005220052200522005220052
16002420051150000452780010108000010800005064000010102003220051200513228001020800002016000020051200511116002110910101600001000010031131182521191920048201160000102005220052200522005220052
16002420051150054045278001010800001080000506400001002003220051200513228001020800002016000020051200511116002110910101600001000010033311192521191920048201160000102005220052200522005220052
16002420051150027045278001010800001080000506400001002004120060200603228001020800002016000020051200511116002110910101600001000010031131292521191920048201160000102005220052200522005220052
16002420051150021045278001010800001080000506400001002003220051200513228001020800002016000020051200511116002110910101600001000010033191173421119920048201160000102005220052200522005220052
1600242005115002104527800101080000108000050640000100200322005120051322800102080000201602682006020060111600211091010160000100001004616221934422202020057402160000102006120061200612006120061
1600242006015007504527800101080000108000050640000101020032200512005132280010208000020160000200602006011160021109101016000010000100431322193442271920057402160000102006120061200612006120061

Test 5: throughput

Count: 16

Code:

  sadalp v0.2s, v16.4h
  sadalp v1.2s, v16.4h
  sadalp v2.2s, v16.4h
  sadalp v3.2s, v16.4h
  sadalp v4.2s, v16.4h
  sadalp v5.2s, v16.4h
  sadalp v6.2s, v16.4h
  sadalp v7.2s, v16.4h
  sadalp v8.2s, v16.4h
  sadalp v9.2s, v16.4h
  sadalp v10.2s, v16.4h
  sadalp v11.2s, v16.4h
  sadalp v12.2s, v16.4h
  sadalp v13.2s, v16.4h
  sadalp v14.2s, v16.4h
  sadalp v15.2s, v16.4h
  movi v16.16b, 17

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)031e373f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)l1d cache writeback (a8)branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1602044005930021173125160109100160008100160020500239915904002940039400391997762000016012020016003220032006440039400401116020110099100100160000100001111011801600400371600001004005040040400504005040050
1602044004930015141125160108100160018100160020500243899704002140049400391997762000016012020016003220032006440039400401116020110099100100160000100001111011801600400371600001004004040041400504004040041
1602044004030039083725160109100160008100160020500239921404002040040400391997761999116037920016003220032006440039400401116020110099100100160000100001111011801600401001600001004004040049400404004040050
160204400403001513025160108100160017100160020500239915904008140039400401997761999916012020016003220032006440040400491116020110099100100160000100001111011801600400521600001004004040041400414004040040
1602044004930039173025160117100160009100160020500132012904002940049400401997761999016012020016003220032006440048400401116020110099100100160000100001111011801600400451600001004005040050400404004040050
1602044004930027173025160118100160018100160020500239915904002040039400391997762000016012020016003220032006440040400401116020110099100100160000100001111011801600400461600001004004040041400404005040050
160204400393002403125160108100160008100160020500128013204003040039400391997761999016012020016003220032006440040400401116020110099100100160000100001111011801600400461600001004004140041400404005040041
160204400403003003125160108100160017100160020500128013204002140049400391997761999116012020016003220032006440049400481116020110099100100160000100001111011801600400451600001004004040041400414004040041
160204400393003614025160108100160008100160020500132012904002940039400401997761999916012020016003220032006440049400391116020110099100100160000100001111011801600400371600001004004040041400504004040050
1602044004930036173125160117100160008100160020500243899704002140049400401997761999016012020016003220032006440048400391116020110099100100160000100001111011801600400361600001004004140050400404004140041

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l2 tlb miss data (0b)1e373f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)5f6061696b6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9facc2cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
160024400513000601746251600101016000010160000502398999115400290400484006019996320019160010201600002032000040048400391116002110910101600001000100228312816211222240037206160000104004940052400494005040049
160024400483000241755251600101016000010160000502398999115400200400394004719996320019160010201600002032000040039400481116002110910101600001000100228411116211171040046206160000104004940040400404004040040
16002440039300024055251600101016000010160000501280000115400200400514004619996320020160010201600002032000040039400391116002110910101600001000100228411716211171740045206160000104004040049400404004940052
160024400393000264195825160029101600001016000050128000011540029340048400631999632001916001020160000203208444004840051111600211091010160000100010024115215164221222400484018160000104004040040400404004040040
16002440039300024055251600271016000010160000502398999115400290400394004419996320028160010201600002032000040048400481116002110910101600001000100228411116211191140045206160000104004040049400404004940040
16002440039300027046251600291016000010160000502398999115400290400484007319996320031160010201600002032000040051400481116002110910101600001000100228411616211211640036206160000104005240049400404004940040
160024400393000241755251600271016001710160000501280000115400290400514004719993320019160010201600002032000040048400391116002110910101600001000100228411616211111640048209160000104004040049400404004040040
160024400483000271988251600101016000110160000502398999115400290400394004219996320019160010201600002032000040048400391116002110910101600001000100228411616211161640045206160000104005240040400404004940052
16002440039299030046251600271016000110160000502678553115400200400514005719996320019160010201600002032000040039400481116002110910101600001000100228411016211161040045206160000104004040040400494004040050
1600244004829903317625251600101016000010160000502678553115400200400514004219996320028160010201600002032000040051400481116002110910101600001000100228412116211111640036209160000104004940052400494004040049