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

Test 1: uops

Code:

  usqadd v0.4s, v1.4s
  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 data (08)l2 tlb miss data (0b)18191e1f3a3f4e51schedule 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 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? simd retires (ee)f5f6f7f8fd
100430372400000006125482510001000100039831313018303730372415328951000100020003037303711100110000000000073116112630100030383038303830383038
1004303723000000014725482510001000100039831313018303730372415328951000100020003037303711100110000000000073116112630100030383038303830383038
1004303724000000032925482510001000100039831313018303730372415328951000100020003037303711100110000000000073116112630100030383038303830383038
100430372300000006125482510001000100039831313018303730372415328951000100020003037303711100110000000000073116112630100030383038303830383038
100430372400000006125482510001000100039831313018303730372415328951000100020003037303711100110000000000073116112630100030383038303830383038
100430372300000006125482510001000100039831303018303730372415328951000100020003037303711100110000000000073116112630100030383038303830383038
100430372400000006125482510001000100039831313018303730372415328951000100020003037303711100110000000000073116112630100030383038303830383038
100430372300000008925482510001000100039831313018303730372415328951000100020003037303711100110000000000073116112630100030383038303830383038
1004303723000000014725482510001000100039831313018303730372415328951000100020003037303711100110000000000073116112630100030383038303830383038
1004303724000000052125482510001000100039831313018303730372415328951000100020003037303711100110000000000073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  usqadd v0.4s, v1.4s
  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)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)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)9fl1d cache writeback (a8)acc2branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
102043003723306129548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003723306129548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003723206129548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010010017101161129634100001003003830087300383003830038
102043003723306129548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003723306129548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003723206129548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003723306129548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003723206129548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003723306129548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
1020430037232071629548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)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)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)9fl1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
100243003722500000026229548251001010100001010000504277313130018030037300372828721287671001020100002020000300373003711100211091010100001000557106441016101029630010000103003830038300383003830038
100243003722500002190262295302510010101000010100005042773130300373300373003728287328767100102010000202000030037300371110021109101010000100000644816101029630010000103003830038300383003830038
1002430037225000000262295482510010101000010100005042773130300180300373003728287328767100102010000202000030084300371110021109101010000100000644101651029630010000103003830038300383003830059
10024300372250000002622954825100101010000101000050427731303001803003730037282873287671001020100002021294300373003711100211091010100001000006441016101029630010000103003830038300853003830038
10024300372250000002622954825100101010000101000050427731313001803003730037282873287671001020100002020000300373003711100211091010100001000006441016101029630010000103003830038300383003830038
100243003722500006602662954825100101010000101000050427731313001803003730037282873287671001020100002020000300373003731100211091010100001000006441016111129630010000103003830038300383003830038
10024300372250000002662954825100101010000101000050427731303001803003730037282873287671001020100002020000300373003711100211091010100001000006441116101029630010000103003830038300383003830038
10024300372250000002662954825100101010000101000061427867003001803003730037282873287671001020100002020000300373003711100211091010100001000006441016101029630010000103003830038300383003830038
10024300372250000002662954825100101010000101044750427731303001803003730037282873287671001020100002020000300373003711100211091010100001000006441116101029630010000103003830038300383003830038
10024300372250000002662954825100101010000101000050427731303001803003730037282873287671001020100002020000300373003711100211091010100001000306441016101029630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  usqadd v0.4s, v0.4s
  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)03191e1f3a3f4e5051schedule 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)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
10204300372240000612954730021251010010010000100100005004277160130018300373003728271628733101002001000820020016300373003711102011009910010010000100000011171701600296450100001003003830038300383003830038
1020430037225000061295470251010010010000100100005004277160130018300373003728271628741101002001000820020016300373003711102011009910010010000100000011171701600296460100001003003830038300713003830038
1020430037225000061295470251010010010000100100005004277160130018300373003728271728740101002001000820020016300373003711102011009910010010000100000011171801600296450100001003003830038300383003830038
1020430037225000061295470251010010010000100100005004277160130018300373003728271728741101002001000820020016300373003711102011009910010010000100000011171701600296450100001003003830038300383003830038
1020430037225000061295470251010010010000100100005004277160130018300373003728271728741101002001000820020016300373003711102011009910010010000100000011171701600296450100001003003830038300383003830038
1020430037225000061295470251010010010000100100005004277160130018300373003728271628741101002001000820020016300373003711102011009910010010000100000311171701600296450100001003003830038300383003830038
1020430037225000061295470251010010010000100100005004277160130018300373003728271728740101002001000820020016300373003711102011009910010010000100000011171701600296450100001003003830038300383003830038
1020430037225000061295470251010010410000100100005004277160130018300373003728271628741101002001000820020016300373003711102011009910010010000100000011171701600296450100001003003830038300383003830038
1020430037225000061295470251010010010000100100005004277160130018300373003728271628741101002001000820020016300373003711102011009910010010000100000011171701600296450100001003003830038300383003830038
1020430037224000061295470251010010010000100100005004277160130018300373003728271728741101002001000820020016300373003711102011009910010010000100000011171801600296460100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03l2 tlb miss data (0b)181e3f4e51schedule 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 cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
10024300372330006129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000103009640316332962910000103003830038300383003830038
1002430037233000612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010303640316332962910000103003830038300383003830038
100243003723300061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000150640316332962910000103003830038300383003830038
10024300372330003572954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010400640316332962910000103003830038300383003830038
1002430037232000612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010400640316332962910000103003830038300383003830038
10024300372330006129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000103709640316332962910000103003830038300383003830038
10024300372320007262954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010200640316332962910000103003830038300383003830038
10024300372320001032954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010400640316332962910000103003830038300383003830038
1002430037233000612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010400640316332962910000103003830038300383003830038
100243003723300126129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000105400640316332962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)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)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)9fld unit uop (a6)l1d 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
160204200651560002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000001111011901600201291600001002006620066200662006620066
16020420065156016225234925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010001001111011901600200621600001002006620066200662006620066
160204200651560005725801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000001111011901600200621600001002006620066200662006620066
160204200651550002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000001111011901600200621600001002006620066200662006620066
160204200651560002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000001111011901600200621600001002006620066200662006620066
160204200651560006025801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000001111011901600200621600001002006620066200662006620066
16020420065155019202925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000001111011901600200621600001002006620066200662006620066
1602042006515500013825801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000001111011901600200621600001002006620066200662006620066
160204200651550002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000001111011901600200621600001002006620066200662006620066
160204200651550006425801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000001111011901600200621600001002006620066200662006620066

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 tlb miss (a1)l1d cache writeback (a8)accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaebec? simd retires (ee)? int retires (ef)f5f6f7f8fd
1600242008715607325800101080000108000050640000111020027200462004632280010208000020160000200462004611160021109101016000010000100331632720422692004730390160000102005120051200512004720051
16002420050155125125800101080000108000050640000011020031200502005032280010208000020160000200502005011160021109101016000010000100351662924422692004730330160000102005120051200512005120052
1600242005015505125800101080000108000050640000011020031200502005032280010208000020160000200502005011160021109101016000010000100321662924422792004730330160000102005120051200512005120051
16002420050156051258001010800001080000506400000110200312004620050322800102080000201600002005020050111600211091010160000100401003516621024422962004730310160000102005120051200512005120051
16002420051155056225800101080000108000050640000011020031200502005032280010208000020160000200502005011160021109101016000010000100361662924422962004730310160000102005120051200512005120051
1600242014015505125800101080000108000050640000011020031200502005032280010208000020160000200502005111160021109101016000010000100351662924422692004732310160000102005420051200512005120051
16002420050155051258001010800001080000506400000110200312005020050322800102080000201600002005320050111600211091010160000100001003516621024422992004732300160000102004720051200512005120051
16002420050155051258001010800001080000506400000110200332005020050322800102080000201600002005020050111600211091010160000100001003216629244226920047304590160000102005120051200552005520051
1600242005015505125800101080000108000050640000011020031200462005032280010208000020160000200502005011160021109101016000010000100321662924422972004730310160000102005120051200512005120051
16002420050155051258001010800001080000506400000110200312005020051322800102080000201600002005020050111600211091010160000100001003316626244229620047303190160000102005120051200512005120141

Test 5: throughput

Count: 16

Code:

  usqadd v0.4s, v16.4s
  usqadd v1.4s, v16.4s
  usqadd v2.4s, v16.4s
  usqadd v3.4s, v16.4s
  usqadd v4.4s, v16.4s
  usqadd v5.4s, v16.4s
  usqadd v6.4s, v16.4s
  usqadd v7.4s, v16.4s
  usqadd v8.4s, v16.4s
  usqadd v9.4s, v16.4s
  usqadd v10.4s, v16.4s
  usqadd v11.4s, v16.4s
  usqadd v12.4s, v16.4s
  usqadd v13.4s, v16.4s
  usqadd v14.4s, v16.4s
  usqadd v15.4s, v16.4s
  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)03mmu table walk data (08)l2 tlb miss data (0b)1e3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)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)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)dbddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
16020440059310000302516010810016000810016002005001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000011110118016000400361600001004004040040400404004040040
16020440039310000302516010810016000810016002005001280132140020400394003919977619990160120200160032200320282400394003911160201100991001001600001000011110118016000400361600001004004040040400404004040040
16020440039310000302516010810016000810016002005001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000011110118016000400361600001004004040040400404004040040
16020440039310000302516010810016000810016002005001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000011110118016000400361600001004004040040400404004040040
16020440039310000302516010810016000810016002005001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000011110118016000400361600001004004040040400404004040040
16020440039311000302516010810016000810016002005001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000011110118016000400361600001004004040040400404004040040
16020440039310000302516010810016000810016002005001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000011110118016000400361600001004004040040400404004040040
160204400393100006426160116100160016100160028050012801960400294004940048199761019986160128200160038200320076400484004911160201100991001001600001000022210128123011400461600001004004940049400494004940049
1602044004831000126426160116100160016100160028050012801961400294004840048199761019986160128200160038200320076400484004811160201100991001001600001000022210128123012400461600001004005040050400504004940050
16020440048311000642616011610016001610016002805001280196140029400494004819976919986160128200160038200320076400484004811160201100991001001600001000022210129123011400451600001004004940049400504010040049

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)0309l2 tlb miss instruction (0a)18191e1f3f51schedule 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)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)a9accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002440039310000000110251600101016000010160000501280000110400204003940039199963200191600102016000020320000400394003911160021109101016000010000100248111216211101140036305160000104004040040400404004040040
1600244009131210012880522516001010160000101600005012800001154002040039400391999632001916001020160000203200004003940039111600211091010160000101001002485111163221111400363110160000104004040040400404004040040
16002440039310000012052251600101016000010160000501280000015400204003940039199963200191600102016000020320000400394003911160021109101016000010000100241162101632299400363110160000104004040040400404004040040
16002455719322000012046251600101016000010160000501280000110400204003940039199963200191600102016000020320000400394003911160021109101016000010003100223111116211918400363010160000104004040040400404004040040
16002440039311000000462516001010160000101600005012800001104002040039400391999632001916001020160000203200004003940039111600211091010160000100001002231110163221016400363110160000104004040040400404004040040
1600244003931000000046251600101016000010160000501280000110400204003940039199963200191600102016000020320000400394003911160021109101016000010000100223111016211122240036155160000104004040040400404004040040
16002440039310000000462516001010160000101600005012800001104002040039400391999632001916001020160000203200004003940039111600211091010160000100001002462211164221017400363012160000104004040040400404004040040
160024400393100000005225160010101600001016000050128000001040020400394003919996320019160010201600002032000040039400391116002110910101600001000010022311121621181840036155160000104004040040400404004040040
160024400393100000005225160010101600001016000050128000001040020400394003919996320019160010201600002032000040039400391116002110910101600001000010024622916422101840036155160000104004040040400404004040040
16002440039310000000512516001010160000101600005012800001104002040039400391999632001916001020160000203200004003940039111600211091010160000100001002231191621191940036155160000104004040040400404004040040