Apple M1 Microarchitecture Research by Dougall Johnson

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

USHL (vector, 8H)

Test 1: uops

Code:

  ushl v0.8h, v0.8h, v1.8h
  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)0307081e3f4e51inst 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)a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10042037161006316872510001000100026468012018203720371572318951000100020002037203711100110000075216121785100020382038203820382038
10042037161006116872510001000100026468012018203720371572318951000100020002037203711100110000073216111787100020382038203820382038
10042037160006116872510001000100026468012018203720371571318951000100020002037203711100110000075116111785100020382038203820382038
10042037150006116872510001000100026468002018203720371572318951000100020002037203711100110000073116111787100020382038203820382038
10042037150006116872510001000100026468012018203720371572318951000100020002037203711100110000075216221785100020382038203820382038
10042037160066116872510001000100026468012018203720371572318951000100020002037203711100110000075116111787100020382038203820382038
100420371610156116872510001000100026468002018203720371572318951000100020002037203711100110001075116111787100020382038203820382038
100420371600011816872510001000100026468012018203720371571318951000100020002037203711100110000073116221787100020382038203820382038
10042037160006316872510001000100026468012018203720371572318951000100020002037203711100110000073116111787100020382038203820382038
10042037150006316872510001000100026468012018203720371572318951000100020002037203711100110000075116111787100020382038203820382038

Test 2: Latency 1->2

Code:

  ushl v0.8h, v0.8h, v1.8h
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)03181e3f4e51inst 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)9fa8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020420037160006119687251010010010000100100005002847680020018200372003718422318745101002001000020020000200372003711102011009910010010000100007101161119791100001002003820038200382003820038
10204200371550036519687251010010010000100100005002847680020018200372003718422318745101002001000020020000200372003711102011009910010010000100007101161119791100001002003820038200382003820038
10204200371550080519687251010010010000100100005002847680120018200372003718422318745101002001000020020000200372003711102011009910010010000100007101161119791100001002003820038200382003820038
1020420037155006119687251010010010000100100005002847680020018200372003718422318745101002001000020020000200372003711102011009910010010000100007101161119791100001002003820038200382003820038
10204200371560086919687251010010010000100100005002847680020018200372003718422318745101002001000020020000200372003711102011009910010010000100007101161119791100001002003820038200382003820038
1020420037155006119687251010010010000100100005002847680020018200372003718422318745101002001000020020000200372003711102011009910010010000100097101161119791100001002003820038200382003820038
10204200371560018919687251010010010000100100005002847680020018200372003718422318745101002001000020020000200372003711102011009910010010000100007101161119791100001002003820038200382003820038
10204200371550072119687251010010010000100100005002847680020018200372003718422318745101002001000020020000200372003711102011009910010010000100007101161119791100001002003820038200382003820038
10204200371550080719687251010010010000100100005002847680120018200372003718422318745101002001000020020000200372003711102011009910010010000100007101161119791100001002003820038200382003820038
10204200371550089619687251010010010000100100005002847680020018200372003718422318745101002001000020020000200372003711102011009910010010000100007101161019791100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)0318191e1f3f4e51inst 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)72scheduler 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)9fa8acc2c5cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024200371500000611968725100101010000101000050284768012001820037200371844403187671001020100002020000200372003711100211091010100001000006406163319785010000102003820038200382003820038
100242003715000006119687251001010100001010000502847680120018200372003718444031876710010201000020200002003720037111002110910101000010012006403163319785110000102003820038200382003820038
10024200371500000611968725100101010000101000050284768012001820037200371844403187671001020100002020000200372003711100211091010100001003006403163319785010000102003820038200382003820038
100242003715000120611968725100101010000101000050284768012001820037200371844403187671001020100002020000200372003711100211091010100001033206403163319785010000102003820038200382003820038
10024200371500060611968725100101010000101000050284768012001820037200371844403187671001020100002020000200372003711100211091010100001003006403163319785010000102003820038200382003820038
100242003715000006119687251001010100001010000502847680120018200372003718444031876710010201000020200002003720037111002110910101000010042006403163319785010000102003820038200382003820038
1002420037150000011719687251001010100001010000502847680120018200372003718444731876710010201000020200002003720037111002110910101000010170006403163319785010000102003820038200382003820038
10024200371500000611968725100101010000101000050284768012001820037200371844403187671001020100002020000200372003711100211091010100001040006403163319785010000102003820038200382003820038
10024200371500000611968725100101010000101000050284768012001820037200371844403187671001020100002020000200372003711100211091010100001010006403165319785010000102003820038200382003820038
10024200371501000611968725100101010000101000050284768012001820037200371844403187671001020100002020000200372003711100211091010100001000006403163319785010000102003820038200382003820038

Test 3: Latency 1->3

Code:

  ushl v0.8h, v1.8h, v0.8h
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)0308090b18191e1f3a3f4e51inst 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)9fa0a1a6a7a8a9acc2cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102042003715600000000611968725101001001000010010000500284768012001820037200371842231874510100200100002002000020037200371110201100991001001000010000000000071011611197910100001002003820038200382003820038
1020420037155000001200611968725101001001000010010000500284768002001820037200371842231874510100200101762002000020037200371110201100991001001000010000000000171011611197910100001002003820038200382003820038
102042003715500000000891968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000000000071011611197910100001002003820038200382003820038
102042003715500000000611968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000000000071011611197910100001002003820038200382003820038
102042003715500000000611968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000000000071011611197910100001002003820038200382003820038
102042003715500000000611968725101001001000010010000500284768002001820037200371842231874510100200100002002000020037200371110201100991001001000010000000000071011611197910100001002003820038200382003820038
102042003715500000000611968725101001001000010010000500284768012001820037200371842231874510100200100002002000020037200371110201100991001001000010000001000071011611197910100001002003820038200382003820038
102042003715500000000611968725101001001000010010000500284768012001820037200371842231874510100200100002002000020037200371110201100991001001000010000000030071011611197910100001002003820038200382003820038
102042003715500000000611968725101001001000010010000500284768012001820037200371842231874510100200100002002000020037200371110201100991001001000010000000000071011611197910100001002003820038200382003820038
102042003715500000000611968725101001001000010010000500284768012001820037200371842231874510100200100002002000020037200371110201100991001001000010000000000071011611197910100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)03080b18191e1f3f4e51inst 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)9fa0a1a6a8a9accfd5d6dbddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002420037156000030477196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000064021602219785010000102003820038200382003820038
1002420037155000000147196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000064021602219785010000102003820038200382003820038
100242003715500000084196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000064021602219785010000102003820038200382003820038
1002420037155000000103196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000064021602219785010000102003820038200382003820038
1002420037155000000818196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000064021602219785010000102003820038200382003820038
1002420037156000000807196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000000064021602219785010000102003820038201332003820264
1002420133156002340844025261965480100501010024131045655285152902009020180201781845111187991031620106732220672201802017051100211091010100001000000364031602219785010000102003820038200382003820038
10024200371550000001671968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037211002110910101000010022101191179037202420038410000102036520365203232036720418
10024204151580177105670461871961061101101210096161121672285409502030620275203711846636189181107822111602422664204152041481100211091010100001000000064034104219951110000102013320180203232032220226
10024202781570126810352407819643101100591110048121060877285152902012620227203701845729188771046720100002020000200372003711100211091010100001020012364021652520101110000102018020464202772031920374

Test 4: throughput

Count: 8

Code:

  ushl v0.8h, v8.8h, v9.8h
  ushl v1.8h, v8.8h, v9.8h
  ushl v2.8h, v8.8h, v9.8h
  ushl v3.8h, v8.8h, v9.8h
  ushl v4.8h, v8.8h, v9.8h
  ushl v5.8h, v8.8h, v9.8h
  ushl v6.8h, v8.8h, v9.8h
  ushl v7.8h, v8.8h, v9.8h
  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)03080b18191e1f3f51inst 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)9fa0a1a6a7a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80204200601560000004025801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000000000511031611200350800001002003920039200392003920039
80204200381550000004025801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000000000511011611200350800001002003920039200392003920039
80204200381550000004025801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000000000511011611200350800001002003920039200392003920039
80204200381550000004025801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000000000511011611200350800001002003920039200392003920039
80204200381550000004025801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000000000512711611200350800001002003920039200392003920039
80204200381610000304025801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000000000511011611200350800001002003920039200392003920039
80204200381550000004025801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000000000511011611200350800001002003920039200392003920039
802042003815500000073425801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000000000511011611200350800001002003920039200392003920039
80204200381550000008225801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000000000511011611200350800001002003920039200392003920039
80204200381550000004025801001008000010080000500640000200192003820038997339996801002008000020016000020088200381180201100991001008000010000000000511011611200350800001002003920039200392003920039

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0304090a1e3f51inst 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)9fa8accfd0d2icache miss (d3)itlb miss (d4)d5d6d9dadbddinst fetch restart (de)e0? int output thing (e9)ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80024200481550000392580010108000010800005064000012001920038200389996310018800102080000201600002004220038118002110910108000010005021000117160001216200350080000102003920039200392003920039
8002420038156110087258001010800001080000506400001200192003820038999631001880010208000020160000200512003811800211091010800001000502100011616000817200350080000102003920039200392003920039
800242003815611001292580010108000010800005064000012001920038200389996310018800102080000201600002004920038118002110910108000010005021000115160001915200350080000102003920039200392003920039
80024200381551100872580010108000010800005064000012001920038200389996310018800102080000201600002006520038118002110910108000010005021000117160001416200350080000102003920039200392003920039
800242003815511005892580010108000010800005064000012001920038200389996310018800102080000201600002004920038118002110910108000010205020000016160001621200350080000102003920039200392003920039
80024200381611100872580010108000010800005064000012001920038200389996310018800102080000201600002004920038118002110910108000010005020000018460001017200350080000102003920039200882003920039
80024200381561000392580010108000010800005064000012001920038200389996310018800102080000201600002003820038118002110910108000010005021000116300001519200350080000102003920039200392003920039
80024200381561000392580010108000010800005064000012001920038200389996310018800102080000201600002003820038118002110910108000010005021000116300001616200350080000102003920039200392003920039
80024200381551000392580010108000010800005064000012001920038200389996310018800102080000201600002003820038118002110910108000010005020000016270001716200350080000102003920039200392003920039
80024200381551000392580010108000010800005064000012001920038200389996310018800102080000201600002003820038118002110910108000010005021000118310001815200350080000102003920039200392003920039