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

USRA (vector, 4H)

Test 1: uops

Code:

  usra v0.4h, v1.4h, #3
  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)03191e3f4e51schedule 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)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000000373216112630100030383038303830383038
100430372400612548251000100010003983131301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
100430372300612548251000100010003996701301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
100430372400612548251000100010003983131301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
100430372300612548251000100010003983130301830373037241532895100010002000303730371110011000000373116112630100030383038303830383038
100430372309612548251008100010003983131301830373037241532895100010002000303730371110011000000373116112630100030383038303830383038
100430372400612548251000100010003983130301830373037241532895100010002000303730371110011000010373116112630100030383038303830383038
100430372400612548251008100010003983131301830373037241532895100010002000303730371110011000010073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  usra v0.4h, v1.4h, #3
  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)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 cache writeback (a8)accdcfd2d5map dispatch bubble (d6)ddfetch restart (de)e0ec? simd retires (ee)? int retires (ef)f5f6f7f8fd
1020430037232061295482510100100100001001000050042773130300183003730037282650328745101002001000020020000300373003711102011009910010010000100000710021622296340100001003003830038300383003830038
1020430037233061295482510100100100001001000050042773130300183003730037282650328745101002001000020020000300373003711102011009910010010000100000710021622296340100001003003830038300383003830038
1020430037233061295482510100100100001001000050042773130300183003730037282650328745101002001000020020000300373003711102011009910010010000100000710021622296340100001003003830038300383003830038
10204300372322189295482510100100100001001000050042773130300183003730037282650328745101002001000020020000300373003711102011009910010010000100000710021622296340100001003003830038300383003830038
1020430037233061295482510100100100001001000050042773130300183003730037282650328745101002001000020020000300373003711102011009910010010000100000710021622296340100001003003830038300383003830038
1020430037233061295482510100100100001001000050042773130300183003730037282650328745101002001000020020000300373003711102011009910010010000100000710021622296340100001003003830038300383003830038
1020430037233061295482510100100100001001000050042773130300183003730037282650328745101002001000020020000300373003711102011009910010010000100000710021622296340100001003003830038300383003830038
1020430037233061295482510100100100001001000050042773130300183003730037282657328745101002001000020020000300373003711102011009910010010000100000710021622296340100001003003830038300383003830038
1020430037233061295482510100100100001001000050042773130300183003730037282650328745101002001000020020000300373003711102011009910010010000100000710021622296340100001003003830038300383003830038
1020430037232082295482510100100100001001000050042773130300183003730037282650328745101002001000020020000300373003711102011009910010010000100000710021622296340100001003003830038300383003830038

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)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)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 tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002430037233000000612954825100101010000101000050427731303001803003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
1002430037225000000612954825100101010000101000050427731303001803003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
1002430037225000000842954825100101010000101000050427731303001803003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
1002430037225000000612954825100101010000101000050427731303001803003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
10024300372250000003462954825100101010000101000050427731303001803003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
10024300372240000005272954825100101010000101000050427731303001803003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
10024300372250000001562954825100101010000101000050427731303001803003730037282873287671001020100002020000300373003711100211091010100001000010006402162229630010000103003830038300383003830038
1002430037225000000612954825100101010000101000050427731303001803003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
1002430037224000000612954825100101010000101000050427731313001803003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
10024300372240000002042954825100101010000101000050427731313001803003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  usra v0.4h, v0.4h, #3
  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)0318191e1f3a3f4e51schedule 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)ld unit uop (a6)l1d cache writeback (a8)acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ec? simd retires (ee)? int retires (ef)f5f6f7f8fd
1020430037233000006129547251010010010000100100005004277160030018300373003728271122874110100200103452022001630037300371110201100991001001000010000160111718016002964500100001003003830038300383003830038
102043003723200000612954725101001101000810010000500427716013001830037300372827162874110100200100082002001630037300371110201100991001001000010000000111718016002964600100001003003830038300383003830038
102043003723200000612954725101001001000010010000500427716013001830037300372827162874110100200100082002001630037300371110201100991001001000010000000111717016002964600100001003003830038300383003830038
102043003723300000822954725101001001000010010000500427716013001830037300372827162874010100200100082002001630037300371110201100991001001000010000030111718016002964600100001003003830038300383003830038
10204300372330000010429547251010010010000100100005004277160030018300373003728271728740101002001000820020016300373003711102011009910010010000100000270111718016002964600100001003003830038300383022830038
102043003723200000612954725101001001000010010000500427716013001830037300372827162874010100200100082002001630037300371110201100991001001000010000030111718016002964500100001003003830038300383003830038
102043003723300000612954725101001001000010010000500427716003001830037300372827172874010100200100082002001630037300371110201100991001001000010000000111718016002964500100001003003830038300383003830038
102043003723300000612954725101001001000010010000500427716013001830037300372827162874110100200100082002001630037300371110201100991001001000010000000111718016002964500100001003003830038300383003830038
102043003723200000612954725101001001000010010000500427716003001830037300372827172874010100200100082002001630037300371110201100991001001000010000000111718016002964500100001003003830038300383003830038
102043003723300000612954725101001001000010010000500427716003001830037300372827172874010100200100082002001630037300371110201100991001001000010000000111717016002966003100001003003830038300383003830038

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 cache writeback (a8)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0ea? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002430037233186129547251001010100001010000614278512130018300373003728286328767100102010000202000030037300371110021109101010000100064002162229629010000103003830038300383003830038
100243003723307429547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100064002162229629010000103003830038300383003830038
1002430037233126129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100064002162229629010000103003830038300383003830038
100243003723306129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100064002162229629010000103003830038300383003830038
1002430037232061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000640342162229629010000103003830038300383003830038
100243003723206129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100064002162229629010000103003830038300383003830038
100243003723306129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100064002162229629010000103003830038300383003830038
100243003723306129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100064002162229629010000103003830038300383003830038
100243007023206129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100064002162229629010000103003830038300383003830038
100243003723306129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100064002162229629010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  usra v0.4h, v8.4h, #3
  movi v1.16b, 0
  usra v1.4h, v8.4h, #3
  movi v2.16b, 0
  usra v2.4h, v8.4h, #3
  movi v3.16b, 0
  usra v3.4h, v8.4h, #3
  movi v4.16b, 0
  usra v4.4h, v8.4h, #3
  movi v5.16b, 0
  usra v5.4h, v8.4h, #3
  movi v6.16b, 0
  usra v6.4h, v8.4h, #3
  movi v7.16b, 0
  usra v7.4h, v8.4h, #3
  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 data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f3a3f51schedule 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)acc2branch 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
16020420088156000000007125801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010010011110119016112006201600001002006620066200662006620066
16020420065155000000002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010000011110119116112006201600001002006620066200662006620066
16020420065156000000002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010000011110120016002006201600001002006620066200662006620066
160204200651560000018002987802221028001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010000011110119116002006201600001002006620066200662006620066
160204200651550000024002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010000011110119116002006201600001002006620066200662006620066
160204200651550000018002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010013011110119016102006201600001002006620066200662006620066
160204200651550000012002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000011110119016002006201600001002006620066200662006620066
16020420065156000006002925801161008001610080028500640196020045200652006561280128200800282001600562006520191111602011009910010016000010000011110120016002006201600001002006620066200662006620066
160204200651550000015002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010000011110120116002006201600001002006620066200662006620066
16020420065155000000003425801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010000011110119016002006201600001002006620066200662006620066

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)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)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 cache writeback (a8)accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaec? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002420083155000180452780010108000010800005064000011200322027220064322800102080000201600002005120051111600211091010160000100010033311192521119820048201160000102005220053200522005220052
160024200511550004440520278001010800001080000506400001120032202502006432280010208000020160000200512005111160021109101016000010091004331192521191920048201160000102005220052200522005220052
16002420051156100088452780010108000010800005064000011200322024920064322800102080000201600002005120051111600211091010160000100010043311725211191920048201160000102005220052200522005220052
16002420051155000243045278001010800001080000506400001120032202422006432280010208000020160000200512005111160021109101016000010001004331172521171720048201160000102005220052200522005220052
1600242005115500060452780010108000010800005064000011200322026520064322800102080000201600002005120051111600211091010160000100010044311192621171920048211160000102005220052200522005220052
1600242005115500090452780010108000010800005064000011200322026420064322800102080000201600002005120051111600211091010160000100010043311192521119920048201160000102005220052200522005220052
1600242005115500000452780010108000010800005064000011200322028320064322800102080000201600002005120051111600211091010160000100010032311192521191920048201160000102005220052200522005220052
16002420051156000009027800101080000108000050640000012003220277200641022800102080000201600002005120051111600211091010160000100010043311192521271920048201160000102005220052200522005220052
160024200511550000045278001010800001080000506400001120032202772006532280010208000020160000200512005111160021109101016000010001003131192521119920048202160000102005220052200522005220052
1600242005115500000502780010108000010800005064000011200322025720064322800102080000201600002005120051111600211091010160000100010043312192521191920048201160000102005220052200522005220052

Test 5: throughput

Count: 16

Code:

  usra v0.4h, v16.4h, #3
  usra v1.4h, v16.4h, #3
  usra v2.4h, v16.4h, #3
  usra v3.4h, v16.4h, #3
  usra v4.4h, v16.4h, #3
  usra v5.4h, v16.4h, #3
  usra v6.4h, v16.4h, #3
  usra v7.4h, v16.4h, #3
  usra v8.4h, v16.4h, #3
  usra v9.4h, v16.4h, #3
  usra v10.4h, v16.4h, #3
  usra v11.4h, v16.4h, #3
  usra v12.4h, v16.4h, #3
  usra v13.4h, v16.4h, #3
  usra v14.4h, v16.4h, #3
  usra v15.4h, v16.4h, #3
  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)1e3f51schedule 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)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1602044005930000302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111013501600400361600001004004040040400404004040040
16020440039300004882516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011801600400361600001004004040040400404004040040
16020440039300004232516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011801600400361600001004004040040400404004040040
16020440039300004372516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011801600400361600001004004040040400404004040040
16020440039299001372516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011801600400361600001004004040040400404004040040
16020440039300003742516010810016000810016002050012801320400584003940039199776199901601202001600322003200644003940039111602011009910010016000010001401111011801600400361600001004004040040400404004040040
16020440039300005142516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011801600400361600001004004040040400404004040040
16020440039299002682516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011801600400361600001004004040040400404004040040
1602044003929900722516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011801600400361600001004004040040400404004040040
16020440039300012302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011801600400361600001004010940101400404004040040

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1i tlb fill (04)mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)18191e1f3a3f51schedule 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)5f60696b6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)7bmap 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)a9acc2cfd0d2l1i cache miss demand (d3)l1i tlb miss demand (d4)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002440039310010100120146251600101016000010160000501280000114002004003940039199963200191600104720160000203200004003940039111600211091010160000100000000010024311147161113739400360165160000104004040040400404004040040
16002440039310110000001911251600101016000010160000501280000114002004003940039199963200191600100201600002032000040039400391116002110910101600001000001012010023311137161113338400360165160000104004040040400404004040040
160024400393111001000017225160010101600001016000050128000011400200400394003919996320019160010020160000203200004003940039111600211091010160000100000000010024311137161112340400360165160000104004040040400404004040040
1600244003931200010300078725160010101600001016000050128000011400200400394003919996320019160010020160000203200004003940039111600211091010160000100000100010023311140161114041400360165160000104004040040400404004040040
160024400393101000000007225160010101600001016000050128000011400200400394003919996320019160010020160000203200004003940039111600211091010160000100000000010024311137161114127400360165160000104004040040400404004040040
1600244003931110010000172251600101016000010160000501280000114002004003940039199963200191600100201600002032000040039400391116002210910101600001000002015010024311137161113737400360165160000104004040040400404004040040
160024400393101001000008425160010101600001016000050128000011400200400394003919996320019160010020160000203200004003940039111600211091010160000100000000010023311139161113938400360365160000104004040040400404004040040
1600244003931011000012007225160010101600001016000050128000011400200400394003919996320019160010020160000203200004003940039111600211091010160000100000000010026311139161114029400360165160000104004040040400404004040040
1600244003931010000000184251600101016000010160000501280000114002004003940039199963200191600100201600002032000040039400391116002110910101600001000000000100233111381611140414003602119160000104004040040400404010340040
1600244003931101010000158251600101016000010160000501280000104002004003940039199963200191600100201600002032000040039400391116002110910101600001000000000100223110241611140274003602113160000104004040040400404004040040