Apple M1 Microarchitecture Research by Dougall Johnson

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

SQSHL (immediate, vector, 16B)

Test 1: uops

Code:

  sqshl v0.16b, v0.16b, #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 (01)cycle (02)033f4e51inst issue (52)~issue fp/simd (54)~dispatch fp/simd (57)huge thing fp/simd (5b)6061696d6edispatch 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)a8accfd0d5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004203715821686251000100010002645210020182037203715713189510001000100020372037111001100000730116111786100020382038203820382038
1004203715611686251000100010002645210020182037203715713189510001000100020372037111001100000730116111786100020382038203820382038
1004203715611686251000100010002645210020182037203715713189510001000100020372037111001100000730116111786100020382038203820382038
1004203715611686251000100010002645211020182037203715713189510001000100020372037111001100000730116111786100020382038203820382038
10042037151031686251000100010002645210020182037203715713189510001000100020372037111001100000730116111786100020382038203820382038
1004203715611686251000100010002645210020182037203715713189510001000100020372037111001100000730116111786100020382038203820382038
1004203715611686251000100010002645210520182037203715713189510001000100020372037111001100000730116111786100020382038203820382038
1004203715611686251000100010002645210020182037203715713189510001000100020372037111001100000730116111786100020382038203820382038
1004203716611686251000100010002645210520182037203715713189510001000100020372037111001100000730116111786100020382038203820382038
1004203716611686251000100010002645210020182037203715713189510001000100020372037111001100000730116111786100020382038203820382038

Test 2: Latency 1->2

Code:

  sqshl v0.16b, v0.16b, #3
  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)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)9fa8acc5cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020420037150189611968625101001001000010010000500284752112001820037200371842131874510100200100002001000020037200371110201100991001001000010000071021611197910100001002003820038200382003820038
10204200371500611968625101001001000010010000500284752112001820037200371842131874510100200100002081000020037200371110201100991001001000010000071011611197910100001002003820038200382003820038
10204200371500611968625101001001000010010000500284752102001820037200371842131874510100200100002001000020037200371110201100991001001000010000071011611197910100001002003820038200382003820038
102042003715021611968625101001001000010010000500284752112001820037200371842131874510100200100002001000020037200371110201100991001001000010000071011611197910100001002003820038200382003820038
10204200371500611968625101001001000010010000500284752112001820037200371842131874510100200100002041000020037200371110201100991001001000010000071011611197910100001002003820038200382003820038
1020420037150411611968625101001001000010010000500284752112001820037200371842131874510100200100002001000020037200371110201100991001001000010000071011611197910100001002003820038200382003820038
1020420037150447611968625101001001000010010000500284752112001820037200371842131874510740200100002001000020037200371110201100991001001000010000071011621197910100001002003820038200382003820038
10204200371500611968625101001001000010010000500284752112001820037200371842131874510100200100002001000020037200371110201100991001001000010000071011611197910100001002003820038200382003820038
102042003715018891968625101001001000010010000500284752112001820037200371842131874510100200100002001000020037200371110201100991001001000010000071011611197910100001002003820038200382003820038
10204200371500611968625101001001000010010000500284752112001820037200371842131874510100200100002001000020037200371110201100991001001000010000071011611197910100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)03081e3f4e51inst 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
10024200371500061196862510010101000010100005028475210200182003720037184433187671001020100002010000200372003711100211091010100001000640516651978610000102003820038200382003820038
1002420037156001268196862510010101000010100005028475210200182003720037184433187671001020100002010000200372003711100211091010100001000640716761978610000102003820038200382003820038
10024200371500061196862510010101000010100005028475210200182003720225184433187671001020100002010000200372003711100211091010100001013640716671978610000102003820038200382003820038
10024200371500061196862510010101000010100005028475211200182003720037184433187671001020100002010000200372003711100211091010100001000640616661978610000102003820038200382003820038
10024200371500061196862510010101000010100005028475210200182003720037184433187671001020100002010000200372003711100211091010100001000640716671978610000102003820038200382003820038
10024200371500061196862510010101000010100005028475210200182003720071184433187671001020100002410000200372003711100211091010100001000640616661978610000102003820038200382003820038
100242003715000536196862510010101000010100005028475210200182003720037184433187671001020100002010000200372003711100211091010100001003640716661978610000102003820038200382003820038
100242003715000224196862510010101000010100005028475210200182003720037184433187671001020100002010000200372003711100211091010100001000640616661978610000102003820038200382003820038
10024200371500061196862510010101000010100005028475211200182003720037184433187671001020100002010000200372003711100211091010100001000640616661978610000102003820038200382003820038
10024200371500061196862510010101000010100005028475211200182003720037184433187671001020100002010000200372003711100211091010100001000640716651978610000102003820038200382003820038

Test 3: throughput

Count: 8

Code:

  sqshl v0.16b, v8.16b, #3
  sqshl v1.16b, v8.16b, #3
  sqshl v2.16b, v8.16b, #3
  sqshl v3.16b, v8.16b, #3
  sqshl v4.16b, v8.16b, #3
  sqshl v5.16b, v8.16b, #3
  sqshl v6.16b, v8.16b, #3
  sqshl v7.16b, v8.16b, #3
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03081e3a3f51inst 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)9fa1a8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042004815001502925801081008000810080020500640132020019200382003899776998980223200800322008003220038200381180201100991001008000010000011151180160020035800001002003920039200392003920039
80204200381500007125801081008000810080020500640132020019200382003899776998980120200800322008003220038200381180201100991001008000010020011151180160020035800001002003920039200392003920039
80204200381500002925801081008000810080020500640952020061200382003899776998980120200800322008003220190200381180201100991001008000010000011151180160020035800001002003920039200392003920039
8020420038150016802925801081008000810080020500640132020019202502003899776998980120200800322008003220038200381180201100991001008000010000011151180160020035800001002003920039200392003920039
80204200381500002925801081008000810080020500640132020019200382003899776998980120200800322008003220038200481180201100991001008000010000011151180160020035800001002003920039200392003920039
8020420038150000356925801081008000810080020500640132020019200382003899776998980120200800322008003220038200381180201100991001008000010000011151180160020035800001002003920039200392003920039
80204200381500002925801081008000810080020500640132020019200382003899776998980120200800322008003220038200381180201100991001008000010000011151180160020035800001002003920039200392003920039
802042003815003907125801081008000810080020500640132020019200382003899776998980120200800322008003220038200381180201100991001008000010000011151180160020035800001002003920039200392003920039
80204200381500007125801081008000810080020500640132020019200382003899776998980120200800322008003220038200381180201100991001008000010000011151180160020035800001002003920039200392003920039
802042003815001202925801081008000810080020500640132020019200382003899776998980120200800322008003220038200381180201100991001008000010000011151180160020035800001002003920039200392003920039

1000 unrolls and 10 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)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)9fa0a1a6a8a9acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420048150000029703925800101080000108000050640000020019200382003899893100118001020800002080000200382003811800211091010800001000000005020116112003580000102003920039200392003920039
80024200381500000003925800101080000108000050640000020019200382003899893100118001020800002080000200382003811800211091010800001000000005020116112003580000102003920039200392003920039
8002420038150000054303925800101080000108000050640000020019200382003899893100118001020800002080132200382003811800211091010800001000000005020126112003580000102003920039200392003920039
800242003815000000051425800101080000108000050640000020019200382003899893100118001020800002080000200382003811800211091010800001000000005020354662022680000102029120241202962029520238
8002420287152006566044087612480477108046510801975064384802021320241203391003124101188049520803872080488202912009161800211091010800001022210234805107270322023580000102003920039200392003920039
80024200381500000003925800101080000108000050640000020019200382003899893100118001020800002080000200382003811800211091010800001000000005020116112003580000102003920039200392003920091
800242003815000004509125800101080000108000050640000020019200382003899893100118001020800002080000200382003811800211091010800001000000234305020116112003580000102003920039200392003920039
800242003815000000014464801971080279108009850640772020135202912028110024201014680313208048920805852033320377818002110910108000010022103753450381102512035080000102029120444203892044020439
800242043815300881056616149415980761108066010807765064614402033320436203461005042102298078920800002080000200382003811800211091010800001000012351005020116112007380000102003920292204002033720392
800242024415210771026440130881808501080839108078050646952020332204402049310057311025380888228068120807752048020443101800211091010800001004000373325177374322034580000102003920039200392003920039