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, 4S)

Test 1: uops

Code:

  sadalp v0.4s, v1.8h
  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)03mmu table walk instruction (07)1e3f4e51schedule 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
100430372200612548251000100010003983130301830373037241532895100010002000303730371110011000073216222630100030383038303830383038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000073216222630100030383038303830383038
100430372309612548251000100010003983130301830373037241532895100010002000303730371110011000073216222630100030383038303830383038
100430372200612548251000100010003983130301830373037241532895100010002000303730371110011000073216222630100030383038303830383038
1004303723057612548251000100010003983130301830373037241532895100010002000303730371110011000073216222630100030383038303830383038
100430372200612548251000100010003983130301830373037241532895100010002000303730371110011000073216222630100030383038303830383038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000073216222630100030383038303830383038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000073216222630100030383038303830383038
1004303722063612548251000100010003983130301830373037241532895100010002000303730371110011000073216222630100030383038303830383038
1004303723018612548251000100010003983130301830373037241532895100010002000303730371110011000073216222630100030383038303830383038

Test 2: Latency 1->1

Code:

  sadalp v0.4s, v1.8h
  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)031e3a3f4e51schedule 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)st unit uop (a7)l1d cache writeback (a8)a9accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
102043003722400612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071021622296340100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071021622296340100001003003830038300383003830038
102043003722500612953925101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010020000071021622296340100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071021622296340100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071021622296340100001003003830038300383003830038
10204300372250020192954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071021623296340100001003003830038300383003830038
102043003722500612954825101001001000010010149500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071021622296340100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000171021622296340100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071021622296340100001003003830038300383003830038
102043003722500612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000071021622296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)031e3f4e51schedule 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)a9acbranch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002430037225061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000294806402162229630010000103003830038300383003830038
1002430037225061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037225061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
1002430037224061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001020006402162229630010000103003830038300383003830038
1002430037224094295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  sadalp v0.4s, v0.8h
  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)0309181e3a3f4e51schedule 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)696b6d6emap 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 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
10204300372240000762295472510100100100001001000050042771603001803003730037282520628733101002001000020020000300373003711102011009910010010000100001117222242229629100001003003830038300383003830038
1020430037224000197295472510100100100001001000050042771603001803003730037282520628733101002001000020020000300373003711102011009910010010000100031117222242229629100001003003830038300383003830038
1020430037225000197295472510100100100001001000050042771603001803003730037282520628733101002001000020020000300373003711102011009910010010000100001117222242229629100001003003830038300383003830038
1020430037225000197295472510100100100001001000050042771603001803003730037282520628733101002001000020020000300373003711102011009910010010000100001117222242229629100001003003830038300383003830038
1020430037225000197295472510100100100001001000050042771603001803003730037282520628733101002001000020020000300373003711102011009910010010000100001117222242229629100001003003830038300383003830038
1020430037225000197295472510100100100001001000050042771603001803003730037282520628733101002001000020020000300373003711102011009910010010000100101117222242229629100001003003830038300383003830038
1020430037225000197295472510100100100071001000050042771603001803003730037282520628733101002001000020020000300373003711102011009910010010000100001117222242229629100001003003830038300383003830038
1020430037225000197295472510100100100001001000050042771603001803003730037282520628733101002001000020020000300373003711102011009910010010000100001117222242229629100001003003830038300383003830038
1020430037225000197295472510100100100001001000050042771603001803003730037282520628733101002001000020020000300373003711102011009910010010000100001117222242229629100001003003830038300383003830038
1020430037224000197295472510100100100001001000050042771603001803003730037282520628733101002001000020020000300373003711102011009910010010000100001117222242229629100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)031e3f4e51schedule 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 miss (a1)st unit uop (a7)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
10024300372252710329547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640316332962910000103003830038300383003830038
1002430037225021729547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640316332962910000103003830038300383003830038
1002430037225010329547441001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640316332962910000103003830038300383003830038
10024300372251832929547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640316332962910000103003830038300383003830038
1002430084225032429547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640316332962910000103003830038300383003830038
100243003722508429547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640316332962910000103003830038300383003830038
1002430037225053529547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640316332962910000103003830038300383003830038
1002430037225056029547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640316332962910000103003830038300383003830038
1002430037225036929547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640316332962910000103003830038300383003830038
10024300372250122729547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640316332962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  sadalp v0.4s, v8.8h
  movi v1.16b, 0
  sadalp v1.4s, v8.8h
  movi v2.16b, 0
  sadalp v2.4s, v8.8h
  movi v3.16b, 0
  sadalp v3.4s, v8.8h
  movi v4.16b, 0
  sadalp v4.4s, v8.8h
  movi v5.16b, 0
  sadalp v5.4s, v8.8h
  movi v6.16b, 0
  sadalp v6.4s, v8.8h
  movi v7.16b, 0
  sadalp v7.4s, v8.8h
  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)03mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)191e1f3f51schedule 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)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1602042006515110100029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011921611200621600001002006620066200662006620066
16020420065151101000113258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011911611200621600001002006620066200662006620066
1602042013315110100052258011610080016100800285006401962004520065200656128012820080028200160056200652013311160201100991001001600001000061111011911611200621600001002006620066200662006620066
1602042006515010100029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001001031111011911611200621600001002006620066200662006620066
1602042006515010100029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011911611200621600001002006620066200662006620066
1602042006515010100029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011911611200621600001002006620066200662006620066
1602042006515010100029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011911611200621600001002006620066200662006620066
1602042006515010100029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001001031111011911611200621600001002006620066200662006620066
1602042006515010100029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001001031111011911611200621600001002006620066200662006620066
1602042006515110100029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011911611200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

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)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)9fl1d cache writeback (a8)acbranch cond mispred nonspec (c5)cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaec? simd retires (ee)? int retires (ef)f5f6f7f8fd
160024200811500452580010108000010800005064000011520027200462004632280010208000020160000200462004611160021109101016000010000100348211220211111120043150160000102004720047200472004720047
16002420046150087258001010800001080000506400001152002720046200463228001020800002016000020046200461116002110910101600001000010032821920211121120043150160000102004720047200472004720047
1600242004615004565800101080000108000050640000115200272004620046322800102080000201600002004620046111600211091010160000100001003282192021191020043150160000102004720047200472004720047
1600242004615004525800101080000108000050640000115200272004620046322800102080000201600002004620046111600211091010160000100001003482192021189200431552160000102004720047200472004720047
160024200461500452580010108000010800005064000011520027200462004632280010208000020160000200462004611160021109101016000010100100328219202119920043310160000102004720047200472004720047
160024200461500512580010108000010800005064000011520027200462004632280010208000020160000200462004611160021109101016000010000100348211020211121220043150160000102004720047200472004720047
16002420046150045258001010800001080000506400001152002720046200463228001020800002016000020046200461116002110910101600001000010033821112021191220043150160000102004720047200472004720047
160024200461500452580010108000010800005064000011520027200462004632280010208000020160000200462004611160021109101016000010000100338218202118920043150160000102004720047200472004720047
160024200461500452580010108000010800005064000011520027200522004632280010208000020160000200462004611160021109101016000010000100328219244119920043150160000102004720047200472004720047
160024200461500512580010108000010800005064000011520027200462004632280010208000020160000200462004611160021109101016000010000100338211220211121120043300160000102004720047200472004720047

Test 5: throughput

Count: 16

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)0309191f373f51schedule 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)696b6d6emap 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 cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)dde0? simd retires (ee)? int retires (ef)f5f6f7f8fd
16020440085299100096251601171001600171001600205001320130400200400484004019977619991160120200160032200320064400394004911160201100991001001600001000011110118160400371600001004005040040400414005040049
160204400403000001730251601081001600081001600205001320132400210400394003919977619990160120200160032200320064400404004911160201100991001001600001000011110118160400461600001004004040041400504004040040
16020440048300000040251601091001600081001600205001320129400210400484003919977620000160120200160032200320064400494003911160201100991001001600001000011110118160400371600001004004040050400404004140050
1602044003930000001892516010810016000810016002050013201314002004003940040199771520025160120200160032200320064400484004811160201100991001001600001000011110118160400361600001004004040041400414004040040
16020440039300000040251601081001600171001600205001280132400210400404003919977620000160120200160032200320064400394004911160201100991001001600001000011110118160400371600001004004140050400404004140040
16020440040300000040251601081001600081001600205001280132400210400404004919977620000160120200160032200320064400404004911160201100991001001600001000011110118160400371600001004004140050400404004140040
16020440040300000039251601171001600091001600205002399159400200400404004919977619991160120200160032200320064400494003911160201100991001001600001006011110118160400361600001004004140050400404004140040
16020440040300000193251601081001600171001600205001280132400300400394003919977620000160120200160032200320064400484004011160201100991001001600001000011110118160400451600001004004040041400504004040041
16020440040300000030251601081001600091001600205001280132400300400394004019977619991160120200160032200320064400404004011160201100991001001600001000011110118160400371600001004004040049400414004140041
16020440040300000039251601081001600091001600205001280132400210400394003919977619991160120200160032200320064400394004011160201100991001001600001000011110118160400461600001004004940050400404004940041

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f373a3f4e51schedule 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 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)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002440040300000000180560251600111016001810160000501319997115400304004940049199960320028160010201600002032000040048400391116002110910101600001000000001002211324162113240046156160000104005040040403284035140452
16002440525304118911889685911521417116118910161106101612226117366680154036740573404942013204720317161204201609812032232840629405581011600211091010160000100222040330100228412164114240046156160000104005040050400504005040040
160024400493000000510180890251600101016000110160000501280000115400294004040040199960132007816001020160000203200004004940049211600211091010160000100000000100228413162113340036155160000104004940040400404004140040
160024400403000030001801840251600281016001710160307502438865115400304004940039199960320028160010201600002032000040049400491116002110910101600001000010001002211512162113240036156160000104005040050400404005040050
1600244004930001000018046025160467101600001016000050243886511540030400484004819996032010816001020160000203200004004040048111600211091010160000100000000100248423162123340045155160000104004140049400404004940102
1600244003930000000018056025160028101600181016000050239902711540030400494004919996032014616001020160000203200004004940049111600211091010160000100001000100228412162112340046156160000104005040050400504004040040
16002440049300000000180460251600281016001810160000502438865115400204004940049199960820086160010201600002032000040048400992116002110910101600001000012001004281013552213340046156160000104005040040400504005040040
16002440049300000012018055025160028101601131016000050128000001540020400494004919996032001916001020160000203200004004940039111600211091010160000100000000100228412162113340046156160000104005040050400504004040050
1600244004930000001200055025160011101600171016000050239899911540029400404004019996032001916001020160000203200004004940049111600211091010160000100000030100248413162113340046156160000104005040050400494004040049
1600244004929900000018056025160028101600001016000050128000011540029400494004919996032001916001020160000203200004004940049111600211091010160000100000000100228512162112340046156160000104005040040401004005040050