Apple M1 Microarchitecture Research by Dougall Johnson

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

FCADD (vector, 4H)

Test 1: uops

Code:

  fcadd v0.4h, v0.4h, v1.4h, #90
  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)03091e3f4e51inst 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
1004303722006125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723006125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723006125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303722066125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723066125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303722006125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230126125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303722066125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303722006125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303722006125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038

Test 2: Latency 1->2

Code:

  fcadd v0.4h, v0.4h, v1.4h, #90
  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)0308091e3f4e51inst 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)9fa0a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722500061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
102043003722500061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
102043003722501061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161229634100001003003830038300383003830038
102043003722500061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
1020430037224000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010001267101161129634100001003003830038300383008630038
102043003722510061295482510100100100081001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
102043003722400061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
1020430037225000536295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
102043003722500061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
102043003722400061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000107101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03191e1f3f4e51inst 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)9fa0a1a8acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037225000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000006403163329630010000103003830038300383003830038
1002430037225000822954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006403163329630010000103003830038300383003830084
1002430037225000842954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006403163329630010000103003830038300383003830038
1002430037225000842954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006403163329630010000103003830038300383003830038
1002430037225000842954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006403163329630010000103003830038300383003830038
1002430037225000842954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006403163329630010000103003830038300383003830038
10024300372250004722954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006403163329630010000103003830038300383003830038
10024300372250001262954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006403163329630010000103003830038300383003830038
1002430037225000842954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010220006403163329630010000103003830038300383013130038
10024300372250008422954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010001006403163329630010000103003830038300383003830038

Test 3: Latency 1->3

Code:

  fcadd v0.4h, v1.4h, v0.4h, #90
  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)03181e3f4e51inst 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)9fa8acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250010329548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372250014629548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225008429548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830180
10204300372250014729548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225008429548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225006129548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225008429548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372250018929548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010010071011611296340100001003003830038300383003830038
10204300372250025629548251010010010000100100005004277313130066030037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372250158429548251010010010000100100005004277313130018030037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03090e1e3f4e51inst 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)9fa8acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722500082295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225000161295482510010101000010100005042773133001830037300372828732877510010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225000126295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
100243003722500084295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830085
1002430037225000379295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225000177295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250012124294851431007113100561010745654286812302703040330319283302928879110572611151202228630407303668110021109101010000100192182640316222963010000103003830038300383003830038
1002430037225000145295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
100243003722500084295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383008530038
100243003722500084295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  fcadd v0.4h, v8.4h, v9.4h, #90
  fcadd v1.4h, v8.4h, v9.4h, #90
  fcadd v2.4h, v8.4h, v9.4h, #90
  fcadd v3.4h, v8.4h, v9.4h, #90
  fcadd v4.4h, v8.4h, v9.4h, #90
  fcadd v5.4h, v8.4h, v9.4h, #90
  fcadd v6.4h, v8.4h, v9.4h, #90
  fcadd v7.4h, v8.4h, v9.4h, #90
  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)03081e1f3f51inst 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)9fa1a6a8acc5cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042003915001504125801001008000010080000500640000120020200392003999733999780100200800002001600002003920039118020110099100100800001000000051102161120036800001002004020040200402004020040
80204200391510004125801001008000010080000500640000120020200882009799733999780100200800002001600002024820112218020110099100100800001000000051101161120036800001002004020040200402004020040
80204200391500004125801001008000010080000500640000020020200392003999733999780100200800002001600002003920039118020110099100100800001000000051101161120036800001002004020040200402004020040
80204200391500004125801001008000010080000500640000020020200392003999733999780100200800002001600002003920039118020110099100100800001000000051101161120036800001002004020040200402004020040
802042003915004804125801001008000010080000500640000020020200392003999733999780100200800002001600002003920039118020110099100100800001000000051101161120036800001002004020040200402004020040
802042003915002104125801001008000010080000500640000120020200392003999733999780100200800002001600002003920039118020110099100100800001000000051101161120036800001002004020040200402004020040
8020420039150010204125801001008000010080000500640000120020200392003999733999780100200800002001600002003920039118020110099100100800001000000051101161120036800001002004020040200402004020040
802042003915000051625801001008000010080000500640000020020200392003999733999780100200800002001600002003920039118020110099100100800001000000051101161120036800001002004020040200402004020040
80204200391500004125801001008000010080000500640000020020200392003999733999780100200800002001600002003920039118020110099100100800001000000051101161120036800001002004020040200402004020040
802042003915002704125801001008000010080000500640000020020200392003999733999780100200800002001600002003920039118020110099100100800001000000051101161120036800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030b181e1f3f51inst 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)9fa0a6a8accfd0d5d6ddinst fetch restart (de)e0? int output thing (e9)ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
800242004815000150402580010108000010800005064000005200202003920039999631001980010208000020160000200392003911800211091010800001000035020015161111200360080000102004020040200402004020040
8002420039150000040258001010800001080000506400001520020200392003999963100198001020800002016000020039200391180021109101080000100000502007161311200360080000102004020040200402004020040
8002420039150006040258001010800001080000506400000020020200392003999963100468001020800002016000020039200391180021109101080000100015255020511161213200360080000102004020040200402004020040
80024200391500000402580010108000010800005064000000200202003920039999631001980010208000020160000200392003911800211091010800001000005020011161212200360080000102004020040200402004020040
80024200391500021040258001010800001080000506400000020020200392003999963100198001020800002016000020039200391180021109101080000100000502051316119200360080000102004020040200402004020040
80024200391500030040258001010800001080000506400000020020200392003999963100198001020800002016000020039200391180021109101080000100000502001216116200360080000102004020040200402004020040
8002420039150005310402580010108000010800005064000000200202003920039999631001980010208000020160000200392003911800211091010800001000005020012161211200360080000102004020040200402004020040
800242003915000035240258001010800001080000506400000020020200392003999963100198001020800002016000020039200391180021109101080000100000502007161211200360080000102004020040200402004020040
8002420039150000040258001010800001080000506400000020020200392003999963100198001020800002016000020039200391180021109101080000100000502057161211200360080000102004020040200402004020040
80024200391500000402580010108000010800005064000000200202003920039999631001980010208000020160000200392003911800211091010800001000005020012161212200360080000102004020040200402004020040