Apple M1 Microarchitecture Research by Dougall Johnson

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

SQADD (scalar, S)

Test 1: uops

Code:

  sqadd 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)03071e3f4e51inst 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
1004303722006125482510001000100039831313018303730372415328951000100020003037303711100110001073116122630100030383038303830383038
10043037230010325482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303722006125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723006125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303722006125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303722063103254825100010001000398313130183037303724153289510001000200030373037111001100001573116112630100030383038303830383038
1004303722006125482510001000100039831313018303730372414328951000100020003037303711100110000373116112630100030383038303830383038
1004303723006125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303722066125482510001000100039831313018303730372415328951000100020003037303711100110000075216112627100030383038303830383038
100430372306612548251000100010003983131301830373037241532895100010002000303730371110011000203373116112630100030383038303830383038

Test 2: Latency 1->2

Code:

  sqadd 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)031e3f4e51inst 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)9fa8acbranch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722501932954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001001007101161129634100001003003830038300383003830038
102043003722401662954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
10204300372250612954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383008530038
102043003722501492954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
102043003722502122954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001001007101161129634100001003003830038300383003830038
10204300372250612954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
102043003722501662954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
10204300372250612954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
102043003722502122954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
102043003722501682954825101001001000010010000500427731313001803003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038

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)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)91inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a6a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722500000120004672954825100101010000101000050427731330018300373003728287328767100102010000202000030037300371110021109300211010100001000000006402162229630010000103003830038300383003830038
10024300372250000000061295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110901010100001000000006402162229630010000103008630086300383003830038
100243003722500000000212295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110901010100001000000006402162229630010000103003830038300383003830038
1002430037225000000001932954825100101010000101000050427731330018300373003728287252876710010201000020200003003730037111002110901010100001000000006402162229630010000103003830038300383003830038
100243003722500000000191295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110901010100001000000006402162229630010000103003830038300383003830038
10024300372250000000082295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110901010100001000000006402162229630010000103003830038300383003830038
100243003722400000000772295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110901010100001000000027723732429882310000103036930403303223037130370
10024303692271016779261604406294851611007113100561410976664285455302703003730226283033428898110552411022222229230368303708110021109010101000010202121963347652642329906310000103003830038300853017930038
1002430037224000000002188295031031005411100161110745604285455302343032030321283132928900110592211081222197830321303667110021109010101000010000142247507682492229630010000103013330274300383037030323
100243036822811078924602143402948518210060101005613110437642840983055830321305562832854289551165428118032623592303213050712110021109010101000010223042800028932973329883310000103003830038300383003830038

Test 3: Latency 1->3

Code:

  sqadd 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)0318191e1f3a3f4e51inst 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)9fa8accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722400000103295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
102043003722500000189295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003008930038300383003830038
10204300372240000061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000071011611296340100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001001071011611296340100001003003830038300383003830038
102043003722500000145295394510100100100001001000050042786700300183003730037282733287631010020010000200203283003730037111020110099100100100001000071011611296340100001003003830038300383008630038
102043003722501270161295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000371011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03191e3f4e51inst 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)9fa8acc2c5cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722400103295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
10024300372250061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006402163229630010000103003830038300383003830038
10024300372250061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402163229630010000103003830038300383003830038
10024300372250061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001003006402165629630010000103003830038300383003830038
10024300372250061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402163229630010000103003830038300383003830038
100243003722400725295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001003006402162329630010000103003830038300383003830038
10024300372250061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
10024300372250061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006402163229630010000103003830038300383003830038
10024300372250061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038
10024300372250061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000006402162229630010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  sqadd s0, s8, s9
  sqadd s1, s8, s9
  sqadd s2, s8, s9
  sqadd s3, s8, s9
  sqadd s4, s8, s9
  sqadd s5, s8, s9
  sqadd s6, s8, s9
  sqadd 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)033f51inst 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)9fa6a8c3branch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042005715041258010010080000100800005006400002002020039200399973399978010020080000200160000200392003911802011009910010080000100000051103161120036800001002004020040200402004020040
802042003915041258010010080000100800005006400002002020039200399973399978010020080000200160000200392003911802011009910010080000100020051101161120036800001002004020040200402004020040
8020420039150129258010010080000100800005006400002002020039200399973399978010020080000200160000200392003911802011009910010080000100000051101161120036800001002004020040200402004020040
802042003915041258010010080000100800005006400002002020039200399973399978010020080000200160000200392003911802011009910010080000100000051101161120036800001002004020040200402004020040
802042003915041258010010080000100800005006400002002020039200399973399978010020080000200160000200392003911802011009910010080000100000051101161120036800001002004020040200402004020040
802042003915041258010010080000100800005006400002002020039200399973399978010020080000200160000200392003911802011009910010080000100000051101161120036800001002004020040200402004020040
802042003915041258010010080000100800005006400002002020039200399973399978010020080000200160000200392003911802011009910010080000100000051101161120036800001002004020040200402004020040
802042003915041258010010080000100800005006400002002020039200399973399978010020080000200160000200392003911802011009910010080000100000051101161120036800001002004020040200402004020040
802042003915041258010010080000100800005006400002002020039200399973399978010020080000200160000200392003911802011009910010080000100000051101161120036800001002004020040200402004020040
8020420039150192258010010080000100800005006400002002020039200399973399978010020080000200160000200392003911802011009910010080000100000051101161120036800001002004020040200402004020040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)031e1f3f51inst 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)5f6061696d6edispatch 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)9fa8acc5cfd0d2d5d6d9ddinst fetch restart (de)e0eb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
80024200481500016825800101080000108000050640000010200202003920039999631001980010208000020160000200392003911800211091010800001000050200031602120036080000102004020040200402004020040
80024200391501510836425800101080000108000050640000010200202003920039999631001980010208000020160000200392003911800211091010800001000050200011601120036080000102004020040200402004020040
8002420039150004025800101080000108000050640000010200202003920039999631001980010208000020160000200392003911800211091010800001000050200011601120036080000102004020040200402004020040
8002420039150004025800101080000108000050640000000200202003920039999631001980010208000020160000200392003911800211091010800001000050200011601120036080000102004020040200402004020040
8002420039150004025800101080000108000050640000010200202003920039999631001980010208000020160000200392003911800211091010800001000150200011601120036080000102004020040200402004020040
80024200391500010325800101080000108000050640000010200202008920039999631001980010208000020160000200392003911800211091010800001000050200021602220036080000102004020040200402004020040
8002420039150004025800101080000108000050640000010200202003920039999631001980010208000020160000200392003911800211091010800001000050200011601120036080000102004020040200402004020040
8002420039150004025800101080000108000050640000010200202003920039999631001980010208000020160000200392003911800211091010800001000050200011661120036080000102004020040200402004020040
8002420039150004025800101080000108000050640000010200202003920039999631001980010208000020160000200392003911800211091010800001000050200011662120036080000102004020040200402004020040
8002420039150004025800101080000108000050640000010200202003920039999631001980010208000020160000200392003911800211091010800001000050200011661120036080000102004020040200402004020040