Apple M1 Microarchitecture Research by Dougall Johnson

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

SQABS (vector, 16B)

Test 1: uops

Code:

  sqabs v0.16b, v0.16b
  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)033f4e5051inst 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)a0a1a8acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004303722195254730212510001000100039816013018303730372414328951000100010003037303711100110000000073216332629100030383038303830383038
100430372361254730212510001000100039816013018303730372414328951000100010003037303711100110000000073316332629100030383038303830383038
100430372361254730212510001000100039816013018303730372414328951000100010003037303711100110000003073316332629100030383038303830383038
100430372361254702510001000100039816013018303730372414328951000100010003037303711100110000000473316332629100030383038303830383038
100430372361254702510001000100039816013018303730372414328951000100010003037303711100110000000073316332629100030383038303830383038
100430372261254702510001000100039816013018303730372414328951000100010003037303711100110000000073316332629100030383038303830383038
100430372361254702510001000100039816013018303730372414328951000100010003037303711100110000000073316332629100030383038303830383038
100430372361254702510001000100039816013018303730372414328951000100010003037303711100110000000073316332629100030383038303830383038
100430372284254702510001000100039816013018303730372414328951000100010003037303711100110000000073316332629100030383038303830383038
100430372361254702510001000100039816013018303730372414328951000100010003037303711100110000000073316332629100030383038303830383038

Test 2: Latency 1->2

Code:

  sqabs v0.16b, v0.16b
  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)03080b1e1f3f4e51inst 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)9fa8acc2cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722500002812954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000007101161129633100001003003830038300383003830038
10204300372250000612954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000007101161129633100001003003830038300383003830038
10204300372250060612954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000007101161129633100001003003830038300383003830038
10204300372250000612954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000007101161129633100001003003830038300383003830038
10204300372250000612954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000007101161129633100001003003830038300383003830038
10204300372250000612954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000017101161129633100001003003830038300383003830038
102043003722500005362954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000007101161129633100001003003830038300383003830038
102043003722500003462954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000007101161129633100001003003830038300383003830038
10204300372250000612954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010060007101161129633100001003003830038300383003830038
10204300372250000612954725101001001000010010000500427716013001830037300372828332874510100200100002001000030037300371110201100991001001000010000007101161129633100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.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)9fa0a1a6a8a9accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037224000000006129547251001010100001010000504277160030018300373003728286328767100102010000201000030037300371110021109101010000100000006402162229629010000103003830038300383003830038
10024300372250000000010529547251001010100001010000504277160130018300373003728286328767100102010000201000030037300371110021109101010000100000006402162229629010000103003830038300383003830038
1002430037225000000006129547251001010100001010000504277160130018300373003728286328767100102010000201000030037300371110021109101010000100000006401165729940310000103041530415304493041730416
1002430416227101991068792152062947517210076191006411112009342879761303423041430414283193928917113652011636241130430461305131011002110910101000010002022519080921052429980410000103046430420304683041730453
10024302722280018811977040606029475172100761310064161120067428797613034230417304142830841289361121324113042611464304143041691100211091010100001000200251086402162229629010000103003830038300383003830038
1002430037225000001320880077302950215310095111008815113506042866241302703055430320283263287671001020100002010489301803032111100211091010100001040004219409123892230066210000103055830451303703041830654
1002430603237000101415841144170962954725100101010000101000050427851203030630463303692831448289181136522121292011304303683041610110021109101010000100400008314832229883410000103027430559302723041530038
1002430037233000003006129547251001010100001010000504277160130018300373003728286328767100102010000201000030037300371110021109101010000100000006402162229629010000103003830038300383003830038
1002430037232000000006129547251001010100001010000504277160130018300373003728286328767100102410000201000030037300371110021109101010000100000006402162329629010000103003830038300383003830038
1002430037225000000006129547251001010100001010000504277160130018300373003728286328767100102010000201000030037300371110021109101010000100000006402162229629010000103003830038300383003830038

Test 3: throughput

Count: 8

Code:

  sqabs v0.16b, v8.16b
  sqabs v1.16b, v8.16b
  sqabs v2.16b, v8.16b
  sqabs v3.16b, v8.16b
  sqabs v4.16b, v8.16b
  sqabs v5.16b, v8.16b
  sqabs v6.16b, v8.16b
  sqabs v7.16b, v8.16b
  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)03091e3f51inst 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)9fa8c2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042006115100302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000011151183162320036800001002004020040200402004020040
8020420039150003025801081008000810080020500640132120020200392003999771299908012020080032200800322003920039118020110099100100800001000011151183163320036800001002004020040200402004020040
802042003915000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000011151183163320036800001002004020040200402004020040
80204200391500369302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000011151183162320036800001002004020040200402004020040
802042003915000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000011151182163320036800001002004020040200402004020040
802042003915000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000011151183163320036800001002004020040200402004020040
802042003915006302580108100800081008002050064013212002020039200399977699908012020080032200800322003920248118020110099100100800001000011151183163320036800001002004020040200402004020040
802042003915000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000011151183162320036800001002004020040200402004020040
802042003915000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000011151183163220036800001002004020040200402004020040
802042003915000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000011151183163220036800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)031e3f51inst 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)9faccfd5d6ddinst fetch restart (de)e0ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80024200501503230258001010800001080000506400000200202003920039999631001980219208000020800002003920039118002110910108000010050208168820036080000102009220040200402004020040
8002420113150040258001010800001080000506400000200202003920039999631001980010208000020800002003920039118002110910108000010050208166520036080000102004020040200402004020040
8002420039150040258001010800001080000506400000200202003920039999631001980010208000020800002003920039118002110910108000010050207166620036080000102004020040200402004020040
8002420039150040258001010800001080000506400001200202003920039999631001980010208000020800002003920039118002110910108000010050207165620036080000102004020040200402004020040
8002420039150040258001010800001080000506400001200202003920039999631001980010208000020800002003920039118002110910108000010050208165620036080000102004020040200402004020040
8002420039150040258001010800001080000506400000200202003920039999631001980010208000020800002003920039118002110910108000010050206165720036080000102004020040200402004020040
8002420039150040258001010800001080000506400001200202003920039999631001980010208000020800002003920039118002110910108000010050207167720036080000102004020040200402004020040
8002420039150040258001010800001080000506400001200202003920089999631001980010208000020800002003920039118002110910108000010050207167620036080000102004020040200402004020040
8002420039150040258001010800001080000506400001200202003920039999631001980010208000020800002003920039118002110910108000010050207166520036080000102004020040200402004020040
8002420039150040258001010800001080000506400001200202003920039999631001980010208000020800002003920039118002110910108000010050207169520036080000102004020040200402004020040