Apple M1 Microarchitecture Research by Dougall Johnson

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

SQXTN2 (2D)

Test 1: uops

Code:

  sqxtn2 v0.4s, v1.2d
  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
10043037220612548251000100010003983133018303730372415328951000100020003037303711100110000073116222630100030383038303830383038
10043037220612548251000100010003983133018303730372415328951000100020003037303711100110001073116212630100030383038303830383038
100430372312612548251000100010003983133018303730372415328951000100020003037303711100110000073116212630100030383038303830383038
10043037220612548251000100010003983133018303730372415328951000100020003037303711100110001073116212630100030383038303830383038
10043037220612548251000100010003983133018303730372415328951000100020003037303711100110000073116212630100030383038303830383038
10043037230612548251000100010003983133018303730372415328951000100020003037303711100110000073116212630100030383038303830383038
10043037230612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230612548251000100010003983133018303730372415328951000100020003037303711100110000073116212630100030383086303830383038
10043037230842548251000100010003983133018303730372415328951000100020003037303711100110000094116212630100030383038303830383038
10043037230612548251000100010003983133018303730372415328951000100020003037303711100110000073416112630100030383038303830853038

Test 2: Latency 1->1

Code:

  sqxtn2 v0.4s, v1.2d
  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)03080b18191e3f4e51inst 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)9fa8c2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250000061295482510100100100001001000050042773131300183003730037282650328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773131300183003730037282650328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773131300183003730037282650328745101002001000020020000300373003711102011009910010010000100007101161229634100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773131300183003730037282650328745101002001000020020000300833003711102011009910010010000100007101161129634100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773131300183003730037282650328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773131300183003730037282650328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
102043003722500000189295482510100100100001001000050042773131300183003730037282650328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773131300183003730037282650328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773131300183003730037282650328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
10204300372250000061295482510100100100001001000050042773131300183003730037282650328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038

1000 unrolls and 10 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)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)9fa0accdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722506129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100006401116332963010000103003830038300383003830038
10024300372240612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640316332963010000103003830038300383003830038
10024300372250612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640316332963010000103003830038300383003830038
10024300372250612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640316332963010000103003830038300383003830038
10024300372250612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640316332963010000103003830038300383003830038
10024300372250612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640316332963010000103003830038300383003830038
10024300372250612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640316332963010000103003830038300383003830038
10024300372250612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640316332963010000103003830038300383003830038
10024300372250612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010030640316332963010000103003830038300383003830038
10024300372240612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640316332963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  sqxtn2 v0.4s, v0.2d
  movi v0.16b, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 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)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)9fa0a1a8a9acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250000000612954725101001001000010010000500427716003001830037300372827172874110100200100082002001630037300371110201100991001001000010000000011171701600296450100001003003830038300383003830038
102043003722500001800612954725101001001000010010000500427716003001830037300372827172874010100200100082002001630037300371110201100991001001000010000000011171701600296450100001003003830038300383003830038
102043003722500001500612954725101001001000010010000500427716003001830037300372827162874010100200100082002001630037300371110201100991001001000010000000011171801600296450100001003003830038300383003830038
10204300372250000300612954725101001001000010010000500427716003001830037300372827162874110100200100082002001630037300371110201100991001001000010000000011171701600296460100001003003830038300383003830038
102043003722500001800612954725101001001000010010000500427716003001830037300372827172881110100200100082002001630037300371110201100991001001000010000000011171801610296450100001003003830038300383003830038
10204300372250000000612954725101001001000010010000500427716003001830037300372827162874010100200100082002001630037300371110201100991001001000010000100011172222422296290100001003003830038300383003830082
10204300372240000001612954725101001001000010010000500427716003001830037300372825262873310100200100002002000030037300371110201100991001001000010000000011172222422296290100001003003830038300383003830038
10204300372250000001972954725101001001000010010000500427716003001830037300372825262873310100200100002002000030037300371110201100991001001000010000000011172222422296290100001003003830038300383003830038
10204300372250000001972954725101001001000010010000500427716003001830037300372825262873310100200100002002000030037300371110201100991001001000010010000011172201600296460100001003003830038300383003830038
10204300372250000000612954725101001001000010010000500427716003001830037300372827172874010100200100082042001630037300371110201100991001001000010000000011171701610296450100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03081e3f4e51inst 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)9fa1a7a8a9acc2cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037225006129547251001010100001010000504277160130018300803003728286328767100102010000202000030037300371110021109101010000100000600640316332962910000103003830038300383003830038
100243003722502286129547251001010100001010000504277160130018300373003728286328767101602010168202000030037300371110021109101010000100002620640316332962910000103003830038300383003830038
1002430037225006129547251001010100001010150504277160130018300373003728286328767100102010000202033630084300851110021109101010000100000000640316332962910000103003830038300383003830038
10024300372240126129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000000640316332962910000103003830038300383003830038
1002430037225006129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100010000640316332962910000103003830038300383003830038
10024300372250010329547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000040640316332970110000103003830038300853003830038
1002430037225033073629547251001012100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000000640316332962910000103003830038300383003830038
1002430037225006129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000000640316332962910000103003830038300383003830038
1002430037224006129547251001010100001010000504277160130018300373003728286328767106142010000202000030037300371110021109101010000100000000640316332962910000103003830038300383003830038
100243003722507810329547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100010000640316332962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  sqxtn2 v0.4s, v8.2d
  movi v1.16b, 0
  sqxtn2 v1.4s, v8.2d
  movi v2.16b, 0
  sqxtn2 v2.4s, v8.2d
  movi v3.16b, 0
  sqxtn2 v3.4s, v8.2d
  movi v4.16b, 0
  sqxtn2 v4.4s, v8.2d
  movi v5.16b, 0
  sqxtn2 v5.4s, v8.2d
  movi v6.16b, 0
  sqxtn2 v6.4s, v8.2d
  movi v7.16b, 0
  sqxtn2 v7.4s, v8.2d
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03181e3f51inst 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)5f6061696d6escheduler 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)9fa8acc5branch mispredict (cb)cdcfd0d2d6e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16020420090150024292580116100800161008002850064019600020045200652006561280128200800282001600562006520065111602011009910010016000010000111101195016200621600001002006620066200662006620066
160204200651500126942580116100800161008002850064019600020045200652006561280128200800282001600562006520065111602011009910010016000010000111101190016200621600001002006620066200662006620066
16020420168151039292580116100800161008002850064019600020045200652006561280128200800282001600562006520065111602011009910010016000010000111101195016200621600001002006620066200662006620066
160204200651500453292580116100800161008002850064019601520045200652006561280128200800282001600562006520065111602011009910010016000010000111101190016200621600001002006620066200662006620066
16020420065150015292580116100800161008002850064019601520045200652006561280128200800282001600562006520065111602011009910010016000010000111101190016200621600001002006620066200662006620066
1602042006515009292580116100800161008002850064019611520045200652006561280128200800282001600562006520065111602011009910010016000010000111101195016200621600001002006620066200662006620066
16020420065150012292580116100800161008002850064019600020045200652006561280551200800282001600562006520065111602011009910010016000010000111101195016200621600001002006620066200662006620066
1602042006515003292580116100800161008002850064019600020045200652006561280128200800282001600562006520065111602011009910010016000010000111101195016200621600001002006620066200662006620066
1602042006515003292580116100800161008002850064019600020045200652006561280128200800282001600562006520065111602011009910010016000010020111101190116200621600001002006620066200662006620066
16020420065150012292580116100800161008002850064019600020045200652006561280128200800282001600562006520065111602011009910010016000010000111101195016200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0308090a181e1f3f51inst 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)5f60696d6escheduler 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)9fa0a1a8accfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002420067150000054045258001010800001080000506400001120027200532004632280010208000020160000200502004611160021109101016000010000010034911392021114122004315160000102004720047200472004720047
16002420050150000033045258001010800001080000506400000120027200662004632280010208000020160000200462004611160021109101016000010040010035311132021113132004315160000102004720047200472004720047
1600242004615000009045258001010800001080000506400001120027200542004632280010208000020160000200462004611160021109101016000010000010040311182022215132004315160000102004720047200472004720047
16002420046150000012045258001010800001080000506400000120031200542004632280010208000020160000200462004611160021109101016000010000010045321132421111142004330160000102004720047200512004720051
1600242005015000006045258001010800001080000506400001120027200542004632280010208000020160000200462004611160021109101016000010000010036311152021120122004315160000102004720047200472004720047
16002420046150000012045258001010800001080000506400001120027200542004632280220208000020160000200462004611160021109101016000010000010038611192021117122004315160000102004720047200472004720051
1600242004615000003045258001010800001080000506400001120027200622005432280010208000020160000200462004611160021109101016000010000010039311152021115102004315160000102004720051200472004720047
1600242004615000003045258001010800001080000506400001120027200622004632280010208000020160000200462004611160021109101016000010000010037311132021115122004315160000102004720047200472004720047
16002420046150000448045258001010800001080000506400001120027200622004632280010208000020160000200462004611160021109101016000010000010037311122021113112004315160000102004720047200472004720047
16002420046150000030173258001010800001080000506400001120027200622004632280010208000020160000200462004611160021109101016000010000010036311172021112122004315160000102004720047200472004720047

Test 5: throughput

Count: 16

Code:

  sqxtn2 v0.4s, v16.2d
  sqxtn2 v1.4s, v16.2d
  sqxtn2 v2.4s, v16.2d
  sqxtn2 v3.4s, v16.2d
  sqxtn2 v4.4s, v16.2d
  sqxtn2 v5.4s, v16.2d
  sqxtn2 v6.4s, v16.2d
  sqxtn2 v7.4s, v16.2d
  sqxtn2 v8.4s, v16.2d
  sqxtn2 v9.4s, v16.2d
  sqxtn2 v10.4s, v16.2d
  sqxtn2 v11.4s, v16.2d
  sqxtn2 v12.4s, v16.2d
  sqxtn2 v13.4s, v16.2d
  sqxtn2 v14.4s, v16.2d
  sqxtn2 v15.4s, v16.2d
  movi v16.16b, 17

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)030918191e3f51inst 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)9fa8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602044003930000003025160108100160008100160020500128013214002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003929900003025160108100160008100160020500128013214002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003930000003025160108100160008100160020500128013214002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003929900003025160108100160008100160020500128013204002040247400391997761999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003930000003025160108100160008100160020500128013204002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003930000003025160108100160008100160020500128013214002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003929900003025160108100160008100160020500128013204002040039400391997761999016012020016003220032006440039400392116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003930000003025160108100160008100160020500128013214002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003930000003025160108100160008100160020500128013214002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040
1602044003929900003025160108100160008100160020500128013214002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011801600400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03090b18191e1f3a3f51inst 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)5f60696b6d6edispatch 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)9fa8acc2c5cfd0d2icache miss (d3)itlb miss (d4)d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1600244003930000000004625160010101600001016000050128000011400200400394003919996320019160010201600002032000040039400391116002110910101600001000001002231108162114540036155160000104004040040400404004040040
1600244003930000000004625160010101600001016000050128000011400200400394003919996320019160010201600002032000040039400391116002110910101600001000001002231105162114440036155160000104004040040400404004040040
16002440039300000024004625160010101600001016000050128000011400200400394003919996320019160010201600002032000040039400391116002110910101600001000401002231104162114440036155160000104004040040400404004040040
1600244003930000000004625160010101600001016000050128000011400200400394003919996320019160010201600002032000040039400391116002110910101600001000001002231104162115640036155160000104004040040400404004040040
1600244003930000000004625160010101600801016000050128000011400200400394003919996320019160010201600002032000040039400391116002110910101600001000001002231104162114440036155160000104004040040400404004040040
1600244003930000000004625160010101600001016000050128000011400200400394003919996320019160010201600002032000040039400391116002110910101600001000001002232106162116540036155160000104004040040400404004040040
1600244003929900000004625160010101600001016000050128000011400200400394003919996320019160010201600002032000040039400391116002110910101600001000001002231104162115440036155160000104004040099400404004040040
1600244003930000000004625160010101600001016000050128000011400200400394003920033320019160010201600002032000040039400391116002110910101600001000001002231105162113640036155160000104004040040400404004040040
16002440039300000012004625160010101600001016000050128000011400200400394003919996320019160010201600002032000040039400391116002110910101600001000001002231105162116540036155160000104004040040400404004040040
1600244003930000000004625160010101600001016000050128000011400200400394003919996320019160010201600002032000040039400391116002110910101600001000001002231105162115440036155160000104004040040400404004040040