Apple M1 Microarchitecture Research by Dougall Johnson

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

FSUB (scalar, S)

Test 1: uops

Code:

  fsub s0, s0, s1
  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)030b1e3f4e51inst 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)a0a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10043037230061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372200200254825100010001000398313030183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372300128254825100010001000398313130183037303724153289510001000200030373037111001100003073116112630100030383038303830383038
10043037230061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
10043037220061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
10043037230061254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
10043037220061254825100010001000398313130183037303724153289510001000200030373037111001100020073116112630100030383038303830383038
10043037230061254825100010001000398313130183037303724153289510001000200030373037111001100001073116112630100030383038303830383038
10043037230084254825100010001000398313130183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372200105254825100010001000398313130183037303724153289510001000200030373037111001100001073116112630100030383038303830383038

Test 2: Latency 1->2

Code:

  fsub s0, s0, s1
  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)0308181e3f4e51inst 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)9fa1a6a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722400061295482510134100100001001000052242773131300183003730084282652028745101002001000020420000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
10204300372240496129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100001007101161129634100001003003830038300383003830038
102043003722500126129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100420207101261129665100001003008530086300383003830038
10204300372250006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
102043003722500010329548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129706100001003003830038300383003830038
102043003722500061295481011010010010000105100005004277313130018300373003728265328745101002001000020020000300373003721102011009910010010000100000007101161129634100001003003830038300383003830038
10204300372250006129548251010010510000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
102043003722500016629548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
10204300372250006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038
10204300372250006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000007101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03090b18191e1f3a3f4e51inst 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)9fa0a6a7a8a9accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250000002662954825100101010000101000050427731330018300373003728287328767100102010000202000030037300371110021109101010000100001006441216101029630010000103003830038300383003830038
100243003722500000027312954825100101010000101000050427731330018300373003728287328767100102010000202000030037300371110021109101010000100001006441016101029630010000103003830038300383003830038
10024302292240000002662954825100101010000101000050427731330018300843003728290328767100102010000202034430037300371110021109101010000100000006441216121229630010000103003830038300383003830038
1002430037225000000266295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000100644816101129630010000103003830038300383003830038
10024300372250000002662954825100101010000101000050427731330018300373003728287328767100102010000202000030037300371110021109101010000100000006441016101029630010000103003830038300383003830038
10024300372250000002662954825100101010000101000050427731330018300373003728287328767100102010000202000030037300371110021109101010000100001006441017101029630010000103003830038300383003830038
10024300372250000002662954825100101010000101000050427731330018300373003728287328767100102010000202000030037300371110021109101010000100000006441016101029630010000103003830038300383003830038
1002430037225000000266295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000100644516101029630010000103003830038300383003830038
10024300372250000002662954825100101010000101000050427731330018300373003728287328767100102010000202000030037300371110021109101010000100001006441016101129630010000103003830038300383003830038
10024300372240000002662954825100101010000101000050427731330018300373003728287328767100102010000202000030037300371110021109101010000100001006441016101029630010000103003830038300383003830038

Test 3: Latency 1->3

Code:

  fsub s0, s1, s0
  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)031e1f3f4e51inst 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)9fa8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250061295482510100100100001001000050042773131300180300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
10204300372250061295482510100100100001001000050042773131300180300373003728265328745101002001000020020000300373003711102011009910010010000100107101161129634100001003003830038300383003830038
10204300372250061295482510100100100001001000050042773131300180300373003728265328745101002001000020020000300373003711102011009910010010000100107101161129634100001003003830038300383003830038
102043008522500822954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001001107101161129634100001003003830038300383003830038
10204300372250061295482510100100100001001000050042773131300180300373003728265328745101002001000020020000300373003711102011009910010010000100107101161129634100001003003830038300383003830038
10204300372250061295482510100100100001001000050042773131300180300373003728265328745101002001000020020000300373003711102011009910010010000100107101161129634100001003003830038300383003830038
10204300372250061295482510100100100001001000050042773131300180300373003728265328745101002001000020020000300373003711102011009910010010000100107101161129634100001003003830038300383003830038
10204300372250061295482510100100100001001000050042773131300180300373003728265328745101002001000020020000300373003711102011009910010010000100037101161129634100001003003830038300383003830038
10204300372250061295482510100100100001001000050042773131300180300373003728265328745101002001000020020000300373003711102011009910010010000100107101161129634100001003003830038300383003830038
10204300372250061295482510100100100001001000050042773131300180300373003728265328745101002001000020020000300373003711102011009910010010000100107101161129634100001003008530038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)030a1e3a3f4e51inst 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)9fa8accdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000101006402162229630010000103003830038300383003830038
10024300372250006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000101006402162229630010000103003830038300383003830038
10024300372250008429548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100006402162229643010000103003830038300383003830038
10024300372240006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000101006402162229631010000103003830038300383003830038
10024300372250006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000101006402162229630010000103003830038300383003830038
10024300372250006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000101006402162229630010000103003830038300383003830038
10024300372250006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000101006402162229630010000103003830038300383003830038
10024300372250006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000102306402162229630010000103003830038300383003830038
10024300372240006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000101006402162229630010000103003830038300383003830038
10024300372250006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000102306402162229630010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  fsub s0, s8, s9
  fsub s1, s8, s9
  fsub s2, s8, s9
  fsub s3, s8, s9
  fsub s4, s8, s9
  fsub s5, s8, s9
  fsub s6, s8, s9
  fsub s7, s8, s9
  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)030818191e1f3a3f51inst 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)9fa0a1a6a8a9acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8020420060150000000302580108100800081008002050064013220020200392003999776999080120200800322001600642003920039118020110099100100800001000000000111511811600200360800001002004020040200402004020040
8020420039150000000302580108100800081008002050064013220020200392003999776999080120200800322001600642003920039118020110099100100800001000000000111511801600200360800001002004020040200402004020040
8020420039150000000302580108100800081008002050064013220020200392003999776999080120200800322001600642003920039118020110099100100800001000000000111511801601200360800001002004020040200402004020040
8020420039150000000302580108100800081008002062064013220020200392003999776999080120200801412001600642003920039118020110099100100800001000001000111511811600200360800001002004020040200402004020040
80204200391500006004125801001008000010080000500640000200202003920039997331002480100200800002001600002003920039118020110099100100800001000001000000511011611200360800001002004020040200402004020040
8020420092150011000412580211100800001008000050064000020020200392003999733999780100200800002001600002003920039118020110099100100800001000000030000511011611200360800001002004020040200402009020040
8020420039150000000412580100100800001008000050064000020020200392003999733999780100200800002001600002003920039118020110099100100800001000001000000511011611200360800001002004020040200402004020040
8020420039150000000414480100100800001008000050064000020020200392003999733999780100200800002001602882003920039118020110099100100800001000001000000511011611200360800001002004020040200402004020040
8020420039150000000412580100100800001008000050064000020020200392003999733999780100200800002001600002003920039118020110099100100800001000000000000511011611200360800001002004020040200402004020040
8020420039150000000412580100100800001008000050064000020020200392003999733999780100200800002001600002003920039118020110099100100800001000001000000511011611200360800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03080b1e1f3f51inst 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)6061696d6edispatch 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)9fa8accfd0d5d6ddinst fetch restart (de)e0ec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80024200481500000402580010108000010800005064000015200202003920039999631001980010208000020160000200392003911800211091010800001003502053164320036080000102004020040200402004020040
800242003915010004025800101080000108000050640000052002020039200399996310019800102080000201600002003920039118002110910108000010383502055164420036080000102004020040200402004020040
800242003915000008952580010108000010800005064000015200202003920039999631001980010208000020160000200392003911800221091010800001020502054164320036080000102004020040200402004020040
80024200391500000402580010108000010800005064000005200202003920039999631001980010208000020160000200392003911800211091010800001000502004165320036080000102004020040200402004020040
80024200391500000402580010108000010800005064000015200202003920039999631001980010208000020160000200392003911800211091010800001000502054163720036080000102004020040200402004020040
80024200391500000402580010108000010800005064000000200202003920039999631001980010208000020160000200392003911800211091010800001000502053163320036080000102004020040200402004020040
80024202431500000402580010108000010800005064000015200202003920039999631001980010208000020160000200392003911800211091010800001000502054163320036080000102004020040200402004020040
80024200391500000402580010108000010800005064000015200202003920039999631001980010208000020160000200392003911800211091010800001006502055163320036080000102004020040200402004020040
80024200391500000402580010108000010800005064000015200202003920039999631001980010208000020160000200392003911800211091010800001000502053165520036080000102004020040200402004020040
800242003915000004025800101080000108000050640000152002020039200399996310019800102080000201600002003920039118002110910108000010503502053163320036080000102004020040200402004020040