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

UQSHRN2 (4S)

Test 1: uops

Code:

  uqshrn2 v0.8h, v1.4s, #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)031e3f4e51schedule uop (52)schedule simd uop (54)dispatch simd uop (57)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map simd uop (7e)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst simd alu (9a)l1d cache writeback (a8)c2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
1004303723576125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372306125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372306125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372206125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372366125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372306125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372306125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372306125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372306125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
1004303722216125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038

Test 2: Latency 1->1

Code:

  uqshrn2 v0.8h, v1.4s, #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)03181e3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)696d6emap stall dispatch (70)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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
10204300372250126129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000371021612296340100001003003830038300383003830038
1020430037224006129548251010010010000123100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
10204300372240061295482510100100100001001000050042773133001830037300372826532874510100200100002002000030037300371110201100991001001000010001871011611296340100001003003830038300383003830038
102043003722500726295482510100100100001001000050042773133001830037300372826532874510100200100002002000030037300371110201100991001001000010001871011611296340100001003003830038300383003830038
102043003722500726295482510100100100001001000050042773133001830037300372826532874510100200100002002000030037300371110201100991001001000010002771011611296340100001003003830038300383003830038
10204300372240061295482510100100100001001000050042773133001830037300372826532874510100200100002002000030037300371110201100991001001000010001871011611296340100001003003830038300383003830038
10204300372250061295482510100100100001001000050042773133001830037300372826532874510100200100002002000030037300371110201100991001001000010009971011611296340100001003003830038300383003830084
102043003722500726295482510100100100001001000050042773133001830037300372826532874510100200100002002000030037300371110201100991001001000010002771011611296340100001003003830038300383003830038
102043008022400612954825101001001000010010000500427731330018300373003728265328745101002001000020020000300373003711102011009910010010000100010271011611296340100001003003830038300383003830038
10204300372250061295482510100100100001001000050042773133001830037300372826532874510100200100002002000030037300371110201100991001001000010001271011611296349100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)0318191e3f4e51schedule 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)accdcfd5map dispatch bubble (d6)dbddfetch restart (de)e0ec? simd retires (ee)? int retires (ef)f5f6f7f8fd
100243003722400061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000064021602229630010000103003830038300383003830038
100243003722500061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000064021602229630010000103003830038300383003830038
100243003722400061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000064021602229630010000103003830038300383003830038
100243003722500061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000064021602229630010000103003830038300383003830038
100243003722500061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000064021602229630010000103003830038300383003830038
100243003722500061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000064021602229630010000103003830038300383003830038
1002430037225000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010021064021602229630210000103003830038300383003830038
100243003722500061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000064021602229630010000103003830038300383003830038
100243003722400066295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000064021602229630010000103003830038300383003830038
100243003722500061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000064021602229630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  uqshrn2 v0.8h, v0.4s, #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)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)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)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
1020430037224005362954725101001001000010010000500427716030018030037300372827162874010100200100082002001630037300371110201100991001001000010077011171711600296460100001003003830038300383003830038
102043003722500612954725101001001000010010000500427716030018030037300372827162874110100200100082002001630037300371110201100991001001000010002111171801610296460100001003003830038300383003830038
1020430037225001032954725101001001000010010000500427716030018030037300372827162874110100200100082002001630037300371110201100991001001000010002111171801600296450100001003003830038300383003830038
10204300372250061295472510100100100001001000050042771603001803003730037282716287411010020010008200200163003730037111020110099100100100001000011171701600296460100001003003830038300383003830038
102043003722500612954725101001001000010010000500427716030018030037300372827172874010100200100082002001630037300371110201100991001001000010049611171801600296460100001003003830038300383003830038
10204300372250061295472510100100100001001000050042771603001803003730037282717287411010020010008200200163003730037111020110099100100100001000011171701600296460100001003003830038300383003830038
10204300372250061295472510100100100001001000050042771603001803003730037282717287411010020010008200200163003730037111020110099100100100001002911171701600296460100001003003830038300383003830038
102043003722500726295472510100100100001001000050042771603001803003730037282716287401010020010008200200163003730037111020110099100100100001000311171701600296460100001003003830038300383003830038
1020430037225006129547251010010010000100100005004277160300180300373003728271728741101002001000820020016300373003711102011009910010010000100016811171701600296450100001003003830038300383003830038
10204300372250061295472510100100100001001000050042771603001803003730037282716287401010020010008200200163003730037111020110099100100100001000011171801600296460100001003003830038300383003830038

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)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)l1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)eb? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002430037225000000061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000003064021622296290010000103003830038300383003830038
10024300372250000000612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000078064021622296290010000103003830038300383003830038
1002430037225000000061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000006064021622296290010000103003830038300383003830038
1002430037225000000061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000006064021622296290010000103003830038300383003830038
1002430037225000000061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000003064021622296290010000103003830038300383003830038
1002430037224000000061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000003064021622296290010000103003830038300383003830038
1002430037224000000061295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000003064021622296290210000103003830038300383003830038
100243003722500000001562954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000015064021622296290010000103003830038300383003830038
10024300372250000000536295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000003064021622296290010000103003830038300383003830038
10024300372250000000726295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000013064021622296290010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  uqshrn2 v0.8h, v8.4s, #3
  movi v1.16b, 0
  uqshrn2 v1.8h, v8.4s, #3
  movi v2.16b, 0
  uqshrn2 v2.8h, v8.4s, #3
  movi v3.16b, 0
  uqshrn2 v3.8h, v8.4s, #3
  movi v4.16b, 0
  uqshrn2 v4.8h, v8.4s, #3
  movi v5.16b, 0
  uqshrn2 v5.8h, v8.4s, #3
  movi v6.16b, 0
  uqshrn2 v6.8h, v8.4s, #3
  movi v7.16b, 0
  uqshrn2 v7.8h, v8.4s, #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)03l2 tlb miss data (0b)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)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 tlb access (a0)l1d tlb miss (a1)l1d cache writeback (a8)a9acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
160204200901500000050258011610080016100800285006401962011020065200656128012820080028200160056200652006511160201100991001001600001000000301111012021600200621600001002006620066200662006620066
160204200651500000029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000002001111011901600200621600001002006620066200662006620066
1602042006515100000155258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000000001111011901600200621600001002006620066200662006620066
160204200651500000029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000000001111012121600200621600001002006620066200662006620066
160204200651500000029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000000001111011901600200621600001002006620066200662006620066
160204200651500000029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000000001111011901600200621600001002006620066200662006620066
160204200651500000029258022110080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000000001111011901621200621600001002006620066200662006620066
160204200651500000029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000000001111011901600200621600001002006620066200662006620066
160204200651510000029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000000041111011901600200621600001002006620066200662006620066
1602042036515000000117258011610080016100800285006401962004520065203856128012820080028200160056200652006511160201100991001001600001000000301111011901600200621600001002006620066200662006620066

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)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)l1d cache writeback (a8)acbranch mispred nonspec (cb)cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0ea? simd retires (ee)? int retires (ef)f5f6f7f8fd
160024200511500992580010108000010800005064000011200272004620046322800102080000201600002004620046111600211091010160000100000100313111620411952004330160000102005120051200512005120051
160024200501500206258001010800001080000506400000020031200502005032280010208000020160000200502005011160021109101016000010000010027311420211582004730160000102005120051200512005120051
16002420050150045258001010800001080000506400001020027200462004632280010208000020160000200462004611160021109101016000010000010027311420211842004315160000102004720047200472004720047
160024200461500150258001010800001080000506400001120027200462004632280010208000020160000200462004611160021109101016000010010010029311920211992004315160000102004720047200472004720047
160024200461500217258001010800001080000506400001120027200462004632280010208000020160000200462004611160021109101016000010000010032311820211842004315160000102004720047200472004720047
1600242004615001111258001010800001080000506400001120027200462004632280010208000020160000200462004611160021109101016000010040010031311820211582004315160000102004720047200472004720128
16002420046150045258001010800001080000506400001020027200462004632280010208000020160000200462004611160021109101016000010000010031311420211842004315160000102004720047200472004720047
160024200461500129258001010800001080000506400001020027200462004632280010208000020160000200462004611160021109101016000010000010031311820211842004315160000102004720047200472004720047
160024200461500173258001010800001080000506400001120027200462004632280010208000020160000200462004611160021109101016000010010010032311820211892004315160000102004720047200472004720047
16002420046150045258001010800001080000506400001120027200462004632280010208000020160000200462004611160021109101016000010000010027311820211482004315160000102004720047200472004720047

Test 5: throughput

Count: 16

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)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)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)a9acc2branch 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
160204400583000000000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000411110118016004003601600001004004040040400404004040040
160204400392990000000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118016004003601600001004004040040400404004040040
160204400393000000000302516010810016008410016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118016004003601600001004004040040400404004040040
160204400393000000000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118016004003601600001004004040040400404004040040
160204400393000000000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118016004003601600001004004040040400404004040040
160204400393000000000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118016004003601600001004004040040400404004040040
16020440039300000000030251601081001600081001600205001280132040020400394003919977619990160120200160143202322348406514066312116020110099100100160000100421256530111102951113134043611600001004030840562405634056840565
16020440501303110610133288018751771611881001608951011610765001284220040470405594057120066532025616115120016105920232212040557405628116020110099100100160000100000061230111103482165354061101600001004066840719407364072740766
160204400483000000000762716010010016000010016000050012800000400294004840048199716199941601002001600002003200004004840048111602011009910010016000010000000011110120224224004501600001004004940049400494004940049
160204400483000000000762716010010016000010016000050012800000400294004840048199716199941601002001600002003200004004840048111602011009910010016000010000000011110120224224004501600001004004940049400494004940049

1000 unrolls and 10 iterations

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

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)5f60696d6emap 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)acc2branch cond mispred nonspec (c5)cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002440050300094251600101016000010160000501280000014002040039400391999632001916001020160000203200004003940039111600211091010160000100003001002231151621155440036305160000104004040040400404004040040
160024400392990462516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000000010024622516421455400361510160000104004040040400404004040040
160024400393000462516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000000010024322416221266400363010160000104004040040400404004040040
16002440039300046251600101016000010160000501280000014002040039400391999632001916001020160000203200004003940039111600211091010160000100000001002431261642145640036305160000104004040040400404004040040
160024400393000522516001010160000101600005012800000140020400394003919996320019160010201600002032000040039400391116002110910101600001000000010024322516421466400363010160000104004040040400404004040040
16002440039300052251600101016000010160000501280000014002040039400391999632001916001020160000203200004003940039111600211091010160000100000001002432251642134440036155160000104004040040400404004040040
16002440039300046251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000001002232151641135540036305160000104004040040400404004040092
160024400393000711251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000001002231151621125540036155160000104004040040400404004040040
16002440039300046251600101016000010160000501280000114002040039400391999632001916001020160000203200004009340039111600211091010160000100320001002431151641125540036155160000104004040040400404004040040
16002440039300052251600101016000010160000501280000014002040039400391999632001916001020160000203200004003940039111600211091010160000100000001002231141621115440036155160000104004040040400404004040040