Apple M1 Microarchitecture Research by Dougall Johnson

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

ABS (vector, 8H)

Test 1: uops

Code:

  abs v0.8h, v0.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)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)a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
100430372206125472510001000100039816013018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
1004303723022725472510001000100039816013018303730372414328951000100010003037303711100110000073116222629100030383038303830383038
100430372306125472510001000100039816013018303730372413328951000100010003037303711100110000073116112629100030383038303830383038
100430372308225472510001000100039816003018303730372414328951000100010003037303711100110002073116222626100030383038303830383038
100430372306125472510001000100039816003018303730372414328951000100010003037303711100110000073116122629100030383038303830383038
100430372306125472510001000100039816003018303730372414328951000100010003085303711100110000073116112629100030383038303830383038
100430372306125472510001000100039816013018303730372414328951000100010003037303711100110000075116122629100030383038303830383038
100430372208425472510001000100039816013018303730372414328951000100010003037303711100110000073116112629100030383038303830383038
100430372306125472510001000100039816003018303730372414328951000100010003037303711100110000075116112629100030383038303830383038
100430372206125472510001000100039816013018303730372414328951000100010003037303711100110000073116112629100030383038303830383038

Test 2: Latency 1->2

Code:

  abs v0.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): 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)9fa8cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225607262954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010007101161129633100001003003830038300383003830038
102043003722400612954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010007101161129633100001003003830038300383003830038
102043003722500612954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010007101161129633100001003003830038300383003830038
102043003722500612954725101001001000010010000500427716013005430037300372826432874510100200100002001000030037300371110201100991001001000010007101161129633100001003003830038300383003830038
102043003722500612954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010007101161129633100001003003830038300383003830038
102043003722500612954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010007101161129633100001003003830038300383003830038
102043003722500612954725101001001000010010000500427716013001830037300372826432874510100200100002001000030084300371110201100991001001000010007101161129633100001003003830038300383003830038
102043003722500612954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010007101163129633100001003003830038300383003830038
1020430037225003462954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010007101161129633100001003003830038300383003830038
102043003722500612954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010007101161129633100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)0307080a18191e1f3f4e51inst 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)9fa0a6a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250000012014729547251001010100001010000504277160130018300373003728286328767100102010000201000030037300371110021109101010000100000006402162229629010000103003830038300383003830038
100243003722500000006129547251001010100001010000504277160130018300373003728286328767100102010000201000030037300371110021109101010000100000006402164229629010000103003830038300383003830038
100243003722500000006129547251001210100001210000604277160130018300373003728286328767100102010000201000030037300371110021109101010000100000006682162229629010000103003830038300383003830038
100243003722500000006129547251001010100001210000604277160130018300373003728286328767100102010000201000030037300371110021109101010000100000006402162229631010000103003830038300383003830038
1002430037225000000014529547251001010100001010000504277160130018300373003728286328767100102010000201000030037300371110021109101010000100000006402162229629010000103003830038300383003830038
100243003722500000006129547251001010100001010000504277160130018300373003728286328767100102010000201000030037300371110021109101010000100000006402162229629010000103003830038300383003830038
1002430037225000000072629547251001010100001010000504277160130018300373003728286328767100102010000201000030037300372110021109101010000100000047912733629811210000103036930357303203036830371
100243036622700077135616402429492136100631410048161060055428662413027030367302282830731288801121322111442211167303683041881100211091010100001040101926347915725429883310000103013330369303703036930370
100243032222701018933616460029484151100691510056141105080428392013030630406303662831131288861106520111492411147303673036981100211091010100001000221696327959646229953110000103041530416304653041830454
1002430414226301881197264529629475173100791810072171120082428942603034230453304652831035289251121324112992211308303693031991100211091010100001020022508007293485429698210000103027430310303593008630038

Test 3: throughput

Count: 8

Code:

  abs v0.8h, v8.8h
  abs v1.8h, v8.8h
  abs v2.8h, v8.8h
  abs v3.8h, v8.8h
  abs v4.8h, v8.8h
  abs v5.8h, v8.8h
  abs v6.8h, v8.8h
  abs v7.8h, v8.8h
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)030b191e1f3f51inst 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)9fa8a9c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80204200391500000302580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000011151180160020036800001002004020040200402004020040
802042003914900005452580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000011151180160020036800001002004020040200402004020040
802042003915000006152580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000011151180160120036800001002004020040200402004020040
802042003915000006512580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000011151180160020036800001002004020040200402004020040
802042003915000005422580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000011151180160020036800001002004020040200402004020040
802042003915000005402580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000011151180160020036800001002004020040200402004020040
80204200391500000302580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000011151180160020036800001002004020040200402004020040
80204200391500000302580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000011151180160020036800001002004020040200402004020040
802042003915000005702580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000011151180160020036800001002004020040200402004020040
802042003915000007632580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000011151180160020036800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03070a1e3a3f51inst 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)9fa8acbranch mispredict (cb)cfitlb miss (d4)d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80024200511501102892580010108000010800005064000012002020039200399996310019800102080000208000020039200391180021109101080000100005024015161792003680000102004020040200402004020040
800242003915011024725800101080000108000050640000120020200392003999963100198001020800002080000200392003911800211091010800001010050240171614162003680000102004020040200402004020040
800242003915011024725800101080000108000050640000120020200392003999963100198001020800002080000200392003911800211091010800001000050240151616172003680000102004020040200402004020040
8002420039150110211025800101080000108000050640000120020200392003999963100198001020800002080000200392003911800211091010800001000050240161615132003680000102004020040200402004020040
800242003915011024725800101080000108000050640000120020200392003999963100198001020800002080000200392003911800211091010800001000050240161615172003680000102004020040200402004020040
8002420039150110233225800101080000108000050640000120020200392003999963100198001020801062080104200392003911800211091010800001000050240161618162003680000102004020040200402004020040
80024200391501102472580010108000010800005064000012002020039200399996310019800102080000208000020039200391180021109101080000100005024081613162003680000102004020040200402004020040
8002420039150110211025800101080000108000050640000120020200392003999963100198001020800002080000200392003911800211091010800001000050240161616142003680000102004020040200402004020040
8002420039150110247258001010800001080000506400001200202003920039100123100198001020800002080000200392003911800211091010800001000050240171614162003680000102004020040200402004020040
800242003915011024725800101080000108000050640000120020200392003999963100198001020800002080000200392003911800211091010800001000050240161615132003680000102004020040200402004020040