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

USQADD (scalar, B)

Test 1: uops

Code:

  usqadd b0, b1
  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)031e1f3f4e51schedule 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)ld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
10043037220061254825100010001000398313130183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
10043037230061254825100010001000398313130183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
10043037220061254825100010001000398313130183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
10043037220061254825100010001000398313130183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
10043037230061254825100010001000398313130183037303724153289510001161232030373037111001100020073216222630100030383038303830383038
100430372338861254825100010001000398313030183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
100430372300612548251000100010003983131301830373037241532895100010002000303730371110011000001273216222630100030383038303830383038
10043037230061254825100010001000398313130183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
100430372300126254825100010001000398313130183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
10043037220061254825100010001000398313130183037303724153289510001000200030373037111001100000073216222630100030383038303830383038

Test 2: Latency 1->1

Code:

  usqadd b0, b1
  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)18191e1f3a3f4e51schedule 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 tlb miss (a1)l1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
10204300372330000880168295482510100100100001001000050042773130300183003730037282653287451010020010000202200003003730037111020110099100100100001002000071011611296340100001003003830038300383003830038
102043003723311000061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001004200071011611297060100001003003830038300383003830038
1020430037232102000612954825101401001000010010000500427731313001830037300372826532875210100200100002002000030037300371110201100991001001000010000002756216112981126100001003027930464302733046830372
1020430467235059119444006065294761241021913010064128110437544288169030306304573026328279442883611027230113192162152830464302751011020110099100100100001000010071011622296340100001003003830038300383003830181
102043013123300100061295482510100100100001001000050042773130300543003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
1020430037233000000151295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
10204300372330000001032954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000710132122970422100001003003830086300853003830038
102043003723300000089295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
102043003723300000082295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
102043003723300000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000071011611296860100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03mmu table walk data (08)18191e1f3f4e51schedule 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 tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002430037233000003242954863100201210000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010002000006404164429630010000103003830038300383003830038
100243003723300000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000000906404164429630210000103003830038300383003830038
1002430037232000007662954825100101010032101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000000306404164329630010000103003830038300383003830038
1002430037233100001732954845100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000000306404164329630010000103003830038300383003830038
1002430037232000004392954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000000006404163429630010000103003830038300383017930038
1002430037233000001242954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000000006404163429630010000103003830038300383003830038
100243003724100000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000052006403163429630010000103003830038300383003830038
100243003723300000892954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000000006403164429630010000103003830038300383003830038
100243003723300000972954825100101010000101000050427731313001830037301332828732876710160201032522203363003730037211002110910101000010000010006404164429630010000103003830122300853013230038
1002430084233111088314329548121100101010008101000055427867003001830085300842829272876710310201000020200003003730037111002110910101000010002000006404164429630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  usqadd b0, b0
  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)03181e3a3f4e51schedule 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)ld unit uop (a6)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
10204300372250006129547251010010010000100100005004277160130018300373003728271728710101002001000820020016300373003711102011009910010010000100000011171701600296292100001003003830038300383003830038
102043003722500061295472510100100100001001000050042771600300183003730037282711028760101002001000820020016300373003711102011009910010010000100000311171801600296450100001003003830038300383003830038
10204300372250006129547251010010010000100100005004277160030018300373003728271628740101002001000820020016300373003711102011009910010010000100000011171801600296450100001003003830038300383003830038
10204300372580006129547251010010010000100100005004277160030018300373003728271728740101002001000820020016300373003711102011009910010010000100000011171701600296450100001003003830038300383003830038
10204300372250006129547251010010010000100100005004277160030018300373003728271728740101002001000820020016300373003711102011009910010010000100000011171801600296450100001003003830038300383003830038
10204300372250006129547251010010010000100100005004277160030018300373003728271628741101002001000820020016300373003711102011009910010010000100000011171801600296450100001003003830038300383003830038
10204300372330006129547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100000011171701600296450100001003003830038300383003830038
10204300372250006129547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100000011171701600296450100001003003830038300383003830038
10204300372250006129547251010010010000100100005004277160030018300373003728271728740101002001000820020016300373003711102011009910010010000100000011171801600296460100001003003830038300383003830038
10204300372250006129547251010010010000100100005004277160030018300373003728271628740101002001000820020016300373003711102011009910010010000100000011171701600296460100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)031e3f4e5051schedule 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)60696b6d6emap 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)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
100243003722506129547300212510010101000010100005042771601300180300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722506129547300212510010101000010100005042771601300180300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722506129547300212510010101000010100005042771601300180300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372250612954702510010101000010100005042771601300180300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372240612954702510010101000010100005042771601300180300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372250612954702510010101000010100005042771601300183300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372250612954702510010101000010100005042771601300180300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372250612954702510010101000010100005042771601300180300373003728286328767100102010000202000030037300371110021109101010000103123640216222962910000103003830038300383003830038
100243003722521612954702510010101000010100005042771601300180300373003728286328767100102010000202000030037300371110021109101010000100003640216222962910000103003830038300383003830038
10024300372250612954702510010101000010100005042771601300180300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  usqadd b0, b8
  movi v1.16b, 0
  usqadd b1, b8
  movi v2.16b, 0
  usqadd b2, b8
  movi v3.16b, 0
  usqadd b3, b8
  movi v4.16b, 0
  usqadd b4, b8
  movi v5.16b, 0
  usqadd b5, b8
  movi v6.16b, 0
  usqadd b6, b8
  movi v7.16b, 0
  usqadd b7, b8
  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)60696d6emap 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)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
16020420065155029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
16020420065155071258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
160204200651560865258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
160204200651550941258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
16020420065156029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
16020420065155029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
1602042006515601018258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
1602042006515509212948011910080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
160204200651560115258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
160204200651560333258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100101111011916200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1i tlb fill (04)l2 tlb miss instruction (0a)1e3a3f51schedule 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)5f60696d6emap 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)accfd0d2l1i cache miss demand (d3)l1i tlb miss demand (d4)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0ea? simd retires (ee)? int retires (ef)f5f6f7f8fd
1600242006915531013582580010108000010800005064000011200292004820048322800102080000201600002004820048111600211091010160000100000100543421422211127382004533160000102005320049200532005320049
16002420048156100116342580010108000010800005064000011200292004820049322800102080000201600002004820048111600211091010160000100000100603520362632238392004934160000102004920049200492004920049
1600242004815520014102580010108000010800005064000011200292004820048322800102080000201600002004820048111600211091010160000100000100613411362211140412004533160000102004920049200492004920049
1600242004815510013592580010108000010800005064000011200292004820048322800102080000201600002004820048111600211091010160000100000100633410382211138312004533160000102004920049200492004920049
1600242004815520003812580010108000010800005064000011200292005220048322800102080000201600002004820048111600211091010160000100000100483421392211139392004933160000102005320049200492004920049
1600242004815620003672580010108000010800005064000011200292005220048322800102080000201600002004820048111600211091010160000100000100613510392211141402004533160000102004920049200492004920049
1600242004815610004112580010108000010800005064000011200332004820048322800102080000201600002004820048111600211091010160000100000100616520312211140402004533160000102004920049200492004920049
1600242005215610003752580010108000010800005064000001200332005220052322800102080000201600002005220052111600211091010160000100000100473411232211137392004533160000102004920049200492004920049
1600242004815520003722580010108000010800005064000011200332004920048322800102080000201600002005220052111600211091010160000100000100613510312612240402004534160000102004920049200492004920049
1600242004815520013272580010108000010800005064000001200332005220052322800102080000201600002005220052111600211091010160000100000100633410232211139392005133160000102005320053200532005320053

Test 5: throughput

Count: 16

Code:

  usqadd b0, b16
  usqadd b1, b16
  usqadd b2, b16
  usqadd b3, b16
  usqadd b4, b16
  usqadd b5, b16
  usqadd b6, b16
  usqadd b7, b16
  usqadd b8, b16
  usqadd b9, b16
  usqadd b10, b16
  usqadd b11, b16
  usqadd b12, b16
  usqadd b13, b16
  usqadd b14, b16
  usqadd b15, b16
  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)03191e3f51schedule 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)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd2d5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
160204400493100275482516010810016000810016013050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118001600400361600001004004040040400404004040040
16020440039310024302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118001600400361600001004004040040400404004040040
1602044003931006302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118001600400361600001004004040040400404004040040
16020440039310015302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118001600400361600001004014540040400404004040040
160204400393100513302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118001600400361600001004004040040400404004040040
160204400393100498302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118001600400361600001004004040040400914009240040
16020440039311060302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118001600400361600001004004040040400404004040040
1602044003931105521142516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118001600400361600001004004040040400404004040040
160204400393100525302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000021110118001600400361600001004004040040400404004040040
160204400393100225912516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010021311110118001600400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1i tlb fill (04)1e3a3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)simd uops in schedulers (5a)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 cache writeback (a8)accdcfd0d2l1i cache miss demand (d3)l1i tlb miss demand (d4)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
160024400503100008025160010101600001016000050012800001104002040039400391999603200191600102016000020320000400394003911160021109101016000010000100251152134163223031400364113160000104004040040400404004040040
16002440039310101582516001010160080101600005001280000015400204003940039199967320019160010201600002032000040039400391116002110910101600001000110022851027162112828400364113160000104004040040400404004040040
16002440039310101522516001010160000101600005001280000010400204003940039199960320019160010201600002032000040039400391116002110910101600001000010027652118163222723400724113160000104004040040400404004040040
16002440039310100582516001010160000101600005001280000010400204003940039199960320019160010201600002032000040039400391116002110910101600001000010027652121163223020400614113160000104004040040400404004040040
160024400393101018502516001010160000101600005001280000010402024003940039199960320019160010201600002032000040039400391116002110910101600001000010027652127163222226400494113160000104004040040400404004040040
16002440039310001632516001010160000101600005001280000010400204003940039199960320019160010201600002032000040039400391116002110910101600001000010027652127163222827401854113160000104004040040400404009240040
16002440039325101582516001010160000101600005001280000010400204003940039199960320019160010201600002032000040039400391116002110910101600001000010025652131163223031400474113160000104004040040400404004040040
16002440039321101522516001010160000101600005001280000010400204009040039199960320019160010201600002032000040039400391116002110910101600001000010025652128163221930400584113160000104004040040400404004040040
160024400393101017172516001010160000101600005001280000010400204003940039199960320019160010201600002032000040039400391116002110910101600001000010025652125163223019400474113160000104004040040400404004040040
16002440039310101582516001010160000101600005001280000010400204003940039199960320019160010201600002032000040039400391116002110910101600001000010025652129163223030400474113160000104004040040400894004040040