Apple M1 Microarchitecture Research by Dougall Johnson

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

FABS (scalar, D)

Test 1: uops

Code:

  fabs d0, d0
  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)696d6edispatch 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
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110001073116111786100020382038203820382038
10042037153611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110001073116111786100020382038203820382038
100420371512611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038
10042037160611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038
10042037150611686251000100010002645212018203720371571318951000100010002037203711100110000073116111786100020382038203820382038

Test 2: Latency 1->2

Code:

  fabs d0, d0
  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)03091e3f4e51inst 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)9fa0a8acbranch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102042003715000611968625101001001000010010000500284752102001820037200371842131874510100200100002001000020037200371110201100991001001000010000007101161119791100001002003820038200382003820038
102042003714900611968625101001001000010010000500284752102001820037200371842131874510100200100002001000020037200371110201100991001001000010000007101161119791100001002003820038200382003820038
102042003715000611968625101001001000010010000500284752112001820037200371842131874510100200100002001000020037200371110201100991001001000010000007101161119791100001002003820038200382003820038
102042003715000611968685101001001000010010000500284752112001820037200371842131874510100200100002001000020037200371110201100991001001000010000007101161119791100001002003820038200382003820038
102042003715000611968625101001001000010010000500284752102001820037200371842131874510100200100002001000020037200371110201100991001001000010000007101161119791100001002003820038200382003820038
1020420037150003331968625101001001000010010000500284752102001820037200371842131874510100200100002001000020037200371110201100991001001000010000007101161119791100001002003820038200382003820038
102042003715000611968625101001001000010010000500284752102001820037200371842131874510100200100002001000020037200371110201100991001001000010000007101161119791100001002003820038200382003820038
102042003715000611968625101001001000010010000500284752102001820037200371842131874510100200100002001000020037200371110201100991001001000010000007101161119791100001002003820038200382003820038
102042003715000611968625101001001004810010000500284752102001820037200371842131874510100200100002001000020037200371110201100991001001000010000607101161119791100001002003820038200382003820038
102042003715000611968625101001001000010010000500284752102001820037200371842131874510100200100002001000020037200371110201100991001001000010000007101161119791100001002003820038200382003820038

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)60696b6d6edispatch 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)9fa0a1a8a9acbranch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100242003715000000061196862510010101000010100005028475211200180200372003718443318767100102010000201000020037200371110021109101010000100000006405163319786010000102003820038200382003820038
100242003715000000061196862510010101000010100005028475211200180200372003718443318767100102010000201000020037200371110021109101010000100000006403163319786010000102003820038200382003820038
100242003715000000061196862510010101000010100005028475211200180200372003718443318767100102010000201000020037200371110021109101010000100000006403163319786010000102003820038200382003820038
100242003715000000066196862510010101000010100005028475211200180200372003718443318767100102010000201000020037200371110021109101010000100000006403163319786010000102003820038200382003820038
1002420037150000000611965325100101010000101000050284752112001802003720037184433187671001020100002010000200372003711100211091010100001000001206403163319822010000102003820038200382003820038
100242003715000000061196862510010101000010100005028475211200180200372003718443318767100102010000201000020037200371110021109101010000100000006403163319786010000102003820038200382003820038
100242003715000000061196862510010101000010100005028475211200180200372003718443318767100102010000201000020037200371110021109101010000100000006403163319786010000102003820038200382003820038
100242003715000000061196862510010101000010100005028475211200180200372003718443318767100102010000201000020037200371110021109101010000100000006403163319786010000102003820038200382003820038
1002420037150000027061196862510010101000010100005028475211200180200372003718443318767100102010000201000020037200371110021109101010000100010006403163319786010000102003820038200382003820038
100242003715000000061196752510010101000013100005028475211200180200372003718443318767100102010000201000020037200371110021109101010000100000906403243319786010000102003820038200382003820038

Test 3: throughput

Count: 8

Code:

  fabs d0, d8
  fabs d1, d8
  fabs d2, d8
  fabs d3, d8
  fabs d4, d8
  fabs d5, d8
  fabs d6, d8
  fabs d7, d8
  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)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)9fa0a1a6a8acc5branch mispredict (cb)cdcfd5d6e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042005715099425801081008000810080020500640132120019200382003899776998980120200800322008003220038200381180201100991001008000010000000111511811620035800001002003920039200392003920039
8020420038150029258010810080008100800205006401321200192003820038997769989801202008003220080032200382003811802011009910010080000100000400111511801620035800001002003920039200392003920039
8020420038150011325801081008000810080020500640132120019200382003899776998980120200800322008003220038200381180201100991001008000010000000111511801620035800001002003920039200392003920039
802042003815007125801081008000810080020500640132120019200382003899776998980120200800322008003220038200381180201100991001008000010000000111511801620035800001002003920039200392003920039
8020420038150020125801081008000810080020500640132120019200382003899776998980120200800322008003220038200381180201100991001008000010000000111511801620035800001002003920039200392003920039
8020420038150011325801081008000810080020500640132120019200382003899776998980120200800322008003220038200381180201100991001008000010010000111511801620035800001002003920039200392003920039
802042003815002925801081008000810080020500640132120019200382003899866998980120200800322008003220038200381180201100991001008000010000000111511801620035800001002040120039200392003920039
802042008915002925801081008000810080020500640132120019200382003899776998980120200800322008003220038200381180201100991001008000010000000111511801620035800001002003920039200392003920039
8020420038150019925801081008000810080020500640132120019200382003899776998980120200800322008003220038200381180201100991001008000010000000111511801620035800001002003920039200392003920039
802052003815002925801081008000810080020500640132120019200382003899776998980120200800322008003220038200381180201100991001008000010000000111511801620035800001002003920039200392003920039

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03080b191e1f3f51inst 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)9fa6a8a9acc5cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420050150000001462580010108000010800005064000012001920038200389996031001880010208000020800002003820038118002110910108000010000005020316342003580000102003920039200392003920039
8002420038150000324264392580010108000010800005064000012001920038200389996031001880010208000020800002003820038118002110910108000010000305020316442003580000102003920039200392003920039
800242003815000000392580010108000010800005064000012001920038200389996031001880010208000020800002003820038118002110910108000010000005020416342003580000102003920039200392003920039
8002420038150000001232580010108000010800005064000012001920038200389996031001880010208000020800002003820038118002110910108000010010305020316442003580000102003920039200392003920039
800242003815000000392580010108000010800005064000012001920038200389996031001880010208000020800002003820038118002110910108000010000005020216442003580000102003920039200392003920039
800242003815000000392580010108000010800005064000012001920038200389996031001880010208000020800002003820038118002110910108000010040005020416442003580000102003920039200392003920039
8002420038150000001442580010108000010800005064000012001920038200389996031001880010208000020800002003820038118002110910108000010000005020316342003580000102003920039200392003920039
800242003815000000392580010108000010800005064000012001920038200389996031001880010208000020800002003820038118002110910108000010000005020416432003580000102003920039200392003920039
800242003815000000392580010108000010800005064000012001920038200389996031001880010208000020800002003820038118002110910108000010000005020416242003580000102003920039200392003920039
800242003815000000392580010108000010800005064000012001920038200389996031001880010208000020800002003820038118002110910108000010000005020216242003580000102003920039200392003920039