Apple M1 Microarchitecture Research by Dougall Johnson

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

SQXTUN (4S)

Test 1: uops

Code:

  sqxtun v0.4h, v0.4s
  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)03081e3f4e51inst 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)a6a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10043037230061254725100010001000398160130183085303724143289510001000100030373037111001100000073116112629100030383038303830383038
10043037230061254725100010001000398160030183037303724143289510001000100030373037111001100000073116112629100030383038303830383085
100430372300612547251000100010003981601301830373037241432895100010001000303730371110011000005173116112629100030383038303830383038
100430372310612547251000100010003981600301830373037241432895100010001000303730371110011000003973116112629100030383038303830383038
10043037220061254725100010001000398160030183037303724143289510001000100030373037111001100000073116112629100030383038303830383038
10043037220061254725100010001000398160130183037303724143289510001000100030373037111001100000073116112629100030383038303830383038
10043037220061254725100010001000398160130183037303724143289510001000100030373037111001100000073116112629100030383038303830383086
10043037230061254725100010001000398160030183037303724143289510001000100030373037111001100000073116112629100030383038303830383038
10043084230061254725100010001000398160030183037303724143289510001000100030373037111001100000073116112629100030383038303830383038
10043037220061254725100010001000398160030183037303724143289510001000100030373037111001100000073116112629100030383038308630853038

Test 2: Latency 1->2

Code:

  sqxtun v0.4h, v0.4s
  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)030b18191e1f3f4e51inst 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
1020430037225000120842954725101001001000010010000500427716013001830037300842826432874510263200100002001016730085300371110201100991001001000010020002071011611296330100001003003830038300383003830038
10204300372250000012629493142101901391004812110150500427716013001830037300372826472874510255200101612001000030037300371110201100991001001000010000000071011611296330100001003003830038300383003830038
1020430037225000001452954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000000071011611296332100001003003830038300383003830038
1020430037225000001872954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000000071011611296330100001003003830038300383003830038
1020430037225000001472954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000010071011611296330100001003003830038300383003830038
1020430037224000001662954725101001061000010010000500427716013001830037300372826482874510100200100002001000030037300371110201100991001001000010000010071011611296330100001003003830038300383003830038
102043003722500000168295472510100100100001001000050042771601300183003730037282643287451103822211156224101683037230319711020110099100100100001002222219303864257242986627100001003036130373303613032830371
1020430362227077543616401129484153101971381004813910900698428680313019830418303592828636288691103822011163224111553032530359811020110099100100100001000200219518866148212984930100001003037030373303683018130371
102043042022707793661646382949315510193135100321411090069742865081302703035930370282891928836111922211116222810502303713036981102011009910010010000100220101683871011611296330100001003003830038300383003830038
1020430037225000002102954725101001001000010010000500427716013001830037300372826432874510100200100002001000030037300371110201100991001001000010000000071011611296330100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03081e3a3f4e51inst 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)9fa8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037225000791295472510010101000010100005042771603001830037300372828632876710010201000020100003003730037111002110910101000010000640216222962910000103003830038300383003830038
1002430037225000188295472510010101000010100005042771603001830037300372828632876710010201000020100003003730037111002110910101000010000640216222962910000103003830038300383003830038
1002430037225000166295472510010101000010100005042771603001830037300372828632876710010201000020100003003730037111002110910101000010000640216222962910000103003830038300383003830038
1002430037225000145295472510010101000010100005042771603001830037300372828632876710010201000020100003003730037111002110910101000010000640216222962910000103003830038300383003830038
1002430037225000187295472510010101000010100005042771603001830037300372828632876710010201000020100003003730037111002110910101000010000640216222962910000103003830038300383003830038
100243003722500061295472510010101000010100005042771603001830081300372828632876710010201000020100003003730037111002110910101000010000640216222962910000103003830038300383003830038
100243003722500061295472510010101000010100005042771603001830037300372828632876710010201000020100003003730037111002110910101000010000640216222962910000103003830038300383003830038
1002430037225000235295472510010101000010100005042771603001830037300372828632876710010201000020100003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024302262250120149295472510010101000010100005042771603001830037300372828632876710010201000020100003003730037111002110910101000010000640216222962910000103003830038300383003830038
1002430037225100932295474410010101000010100005042771603001830037300372828632876710010201000020100003003730037111002110910101000010000640216222962910000103003830038300383003830038

Test 3: throughput

Count: 8

Code:

  sqxtun v0.4h, v8.4s
  sqxtun v1.4h, v8.4s
  sqxtun v2.4h, v8.4s
  sqxtun v3.4h, v8.4s
  sqxtun v4.4h, v8.4s
  sqxtun v5.4h, v8.4s
  sqxtun v6.4h, v8.4s
  sqxtun v7.4h, v8.4s
  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)03080918191e1f3f51inst 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)9fa0a1a6a8a9acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8020420049150000000722580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511811622200360800001002004020040200402004020040
8020420039150000000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511811622200360800001002004020040200402004020040
80204200391500000004712580108100800081008002050064013212002020113200399977699908012020080032200800322003920039118020110099100100800001000001000111511831622200360800001002004020040200402004020040
8020420039150000000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039218020110099100100800001000000000111511821612200360800001002004020040200402004020040
8020420039150000000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511811622200360800001002004020040200402004020040
8020420039150000000512580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511821621200360800001002004020040200402004020040
8020420039150000000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511821612200360800001002004020040200402004020040
8020420039150000000532580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000001000111511811612200360800001002004020040200402004020040
8020420039150000000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511821622200360800001002004020040200402004020040
8020420039150000000302580108100800081008002050064013212002020039200399977699908012020080032200800322003920039118020110099100100800001000000000111511821612200360800001002004020040200402004020040

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)5f60696d6edispatch 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)9fa6a8acbranch mispredict (cb)cfd0d2d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
800242005115001262580010108000010800005064000001200202003920039999631001980010208000020800002003920039118002110910108000010010050200051600063200360080000102023820040200402004020040
80024200391500822580010108000010800005064000000200202003920039999631001980010208000020800002003920039118002110910108000010070050200061600072200360080000102004020040200402004020040
80024200391500402580010108000010800005064000011200202003920039999631001980010208000020800002003920039118002110910108000010000150200061600073200360080000102004020040200402004020040
80024200391500402580010108000010800005064000001200202003920039999631001980010208000020800002003920039118002110910108000010000050200081600062200360080000102004020040200402004020040
80024200391500402580010108000010800005064000001200202003920039999631001980010208000020800002003920039118002110910108000010000050200061600043200360080000102004020040200402004020040
80024200391500402580010108000010800005064000001200202003920039999631001980010208000020800002003920039118002110910108000010000050200071600062200360080000102004020040200402004020040
80024200391500612580010108000010800005064000001200202003920039999631001980010208000020800002003920039118002110910108000010000050200031600063200360080000102004020040200402004020040
80024200391500402580010108000010800005564000001200202003920039999631001980010208000020800002003920039118002110910108000010000050200041600053200360080000102004020040200402004020040
80024200391500402580010108000010800005064000001200202003920039999631001980010208000020800002003920039118002110910108000010000050200041600074200360080000102004020040200402004020040
80024200391500632580010108000010800005064000001200202003920039999631001980010208000020800002003920039118002110910108000010000050200031600064200360080000102004020040200402004020040