Apple M1 Microarchitecture Research by Dougall Johnson

Firestorm: Overview | Base Instructions | SIMD and FP Instructions
Icestorm:  Overview | Base Instructions | SIMD and FP Instructions

URSHL (vector, 4H)

Test 1: uops

Code:

  urshl v0.4h, v0.4h, v1.4h
  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 (01)cycle (02)031e3f4e51inst issue (52)~issue fp/simd (54)~dispatch fp/simd (57)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op fp/simd (7e)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst neon or fp (9a)a0a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004303723061254825100010001000398313030183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303722061254825100010001000398313030183037303724153289510001000200030373037111001100001073116112630100030383038303830383038
1004303723061254825100010001000398313030183037303724153289510001000200030373037111001100001073116112630100030383038303830383038
1004303723061254825100010001000398313030183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303723061254825100010001000398313030183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303722061254825100010001000398313030183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303722961254825100010001000398313030183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303723061254825100010001000398313030183037303724153289510001000200030373037111001100001373116112630100030383038303830383038
1004303722061254825100010001000398313030183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303722061254825100010001000398313030183037303724153289510001000200030373037111001100000073116112630100030383038303830383038

Test 2: Latency 1->2

Code:

  urshl v0.4h, v0.4h, v1.4h
  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 (01)cycle (02)031e3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa8cfd2d5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000710011611296340100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000710011611296340100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000710011611296340100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000710011611296340100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000710211611296340100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000710011611296340100001003003830038300383003830038
1020430037224061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000710011611296340100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000710011611296340100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000710011611296340100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000710011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)0307080b18191e1f3a3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa1a6a8a9acc2cfd2d5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722500000000271295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000064004163329630010000103003830038300383003830038
10024300372250000000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000064003163329630010000103003830038300383003830038
10024300372250000000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000064003163329630010000103007430183300843003830038
10024300372250000000082295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000064003163329630010000103003830038300383003830038
10024300372250000000012629548251001010100001010000504281384130234303673032328315282890311059241115022223003035930369811002110910101000010220019635276704724529940310000103036930370303693032230226
1002430370227010779366160496529503184100721310056131104371428816903027030367304122831139288791105926111522022300303683036791100211091010100001000002735064003163329753310000103042530086303723036630322
10024301212270013892461604660294851611007116100641811043614287347130270304143036928302362889711060241115520222903041630368811002110910101000010431024970280803723329992610000103046330453305093046630466
100243046222711089663704171382942825610102121008811114907542840981302703051130508283164928952116552011307222359230512305111211002110910101000010001230803264003163329630010000103003830038300383003830038
10024300372250006103964400715329485160100621510064151089410942868121304863060830641283312828916115072611151262228830369304171311002110910101000010020227705078605803329630010000103060630602304183046330462
1002430605236110861191708061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000064003163329630010000103003830038300383003830038

Test 3: Latency 1->3

Code:

  urshl v0.4h, v1.4h, v0.4h
  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 (01)cycle (02)031e3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa8accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225156129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
1020430037225366129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
1020430037225396129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
10204300372253156129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
102043003722566129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
102043003722506129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
1020430037225396129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
10204300372253156129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
102043003722566129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
10204300372254206129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)031e3a3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa6a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722502662954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000644121612122963010000103003830038300383003830038
10024300372250266295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000064410161052963010000103003830038300383003830038
10024300372250266295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000064481610102963010000103003830038300383003830038
100243003722502662954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000644101612102963010000103003830038300383003830038
10024300372250266295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000064412161052963010000103003830038300383003830038
1002430037225026629548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100006441016582963010000103003830038300383003830038
10024300372250266295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000064481610102963010000103003830038300383003830038
100243003722502662954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000644111611122963010000103003830038300383003830038
1002430037225022022954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000644101610102963010000103003830038300383003830038
100243003722502662954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000644121612122963010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  urshl v0.4h, v8.4h, v9.4h
  urshl v1.4h, v8.4h, v9.4h
  urshl v2.4h, v8.4h, v9.4h
  urshl v3.4h, v8.4h, v9.4h
  urshl v4.4h, v8.4h, v9.4h
  urshl v5.4h, v8.4h, v9.4h
  urshl v6.4h, v8.4h, v9.4h
  urshl v7.4h, v8.4h, v9.4h
  movi v8.16b, 9
  movi v9.16b, 10

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)030918191e1f3f51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a6a8a9accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042006015000000412580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100000003511041611200360800001002004020040200402004020040
802042003915000000412580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511011611200360800001002004020040200402004020040
802042003915000000412580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511011611200360800001002004020040200402004020040
802042003915000000412580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511011611200360800001002004020040200402004020040
802042003915000000412580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511011611200360800001002004020040200402004020040
802042003915000000412580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511011611200360800001002004020040200402004020040
802042003915000000412580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511011611200360800001002004020040200402004020040
802042003915000000412580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511011611200360800001002004020040200402009120040
802042003915000000412580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511011611200360800001002004020040200402004020040
802042003915000000412580100100800001008000050064000012002020039200399973399978010020080000200160000200392003911802011009910010080000100000000511011611200360800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0318191e1f3f51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa8accfd5d6d9ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80024200481500013504025800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000502021605520036080000102004020040200402004020040
8002420039150000031425800101080000108000050640000200202003920039999631001980010208010620160000200392003911800211091010800001000502041604320036080000102004020040200402004020040
800242003915000004025800101080000108000050640000200202003920039999631001980124208000020160000200392003911800211091010800001010502031604420036080000102004020040200402004020040
8002420039150001804025800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000502051605320036080000102004020040200402004020040
800242003915000904025800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000502041604420036080000102004020040200402004020040
800242003915000004025800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000502041604320036080000102004020040200402004020040
8002420039150002250922258001010800001080000506400002002020039200399996121001980010208000020160000200392003911800211091010800001000502431603520036080000102004020040200402004020040
800242003915000004025800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000502041605520036080000102004020040200402004020040
8002420039150002404025800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000502041603420036080000102004020040200402004020040
800242003915000004025800101080000108000050640000200202003920039999631001980010208000020160000200392003911800211091010800001000502041604420036080000102004020040200402004020040