Apple M1 Microarchitecture Research by Dougall Johnson

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

PMULL + EOR (1Q)

Test 1: uops

Code:

  pmull v0.1q, v1.1d, v2.1d
  eor v0.16b, v0.16b, v3.16b
  movi v0.16b, 1
  movi v1.16b, 2
  movi v2.16b, 3

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 2.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)031e373f51inst issue (52)~issue fp/simd (54)~dispatch fp/simd (57)huge thing fp/simd (5b)60696d6escheduler 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)a8accfd6e0? fp/simd (ee)f5f6f7f8fd
2004289200392510001000100080000270289289322100020004000289289112001200000136162862000290290290290290
2004289200392510001000100080000270289289322100020004000289289112001200000136162862000290290290290290
2004289200392510001000100080000270289289322100020004000289289112001200006136162862000290290290290290
2004289200392510001000100080000270289289322100020004000289289112001200010136162862000290290290290290
2004289200392510001000100080000270289289322100020004000289289112001200000136162862000290290290290290
2004289200392510001000100080000270289289322100020004000289289112001200000136162862000290290290290290
2004289200392510001000100080000270289289322100020004000289289112001200000136162862000290290290290290
2004289200392510001000100080000270289289322100020004000289289112001200000136162862000290290290290290
2004289200392510001000100080000270289289322100020004000289289112001200000136162862000290290290290290
2004289200392510001000100080001270289289322100020004000289289112001200000136162862000290290290290290

Test 2: Latency 1->2

Code:

  pmull v0.1q, v1.1d, v2.1d
  eor v0.16b, v0.16b, v3.16b
  mov v1.16b, v0.16b
  nop
  movi v0.16b, 1
  movi v1.16b, 2
  movi v2.16b, 3

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)031e1f3c3f4e51inst 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? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
4020430037232000612951625101001001000010010000500427404503001830037300372451532499510100200300002006000030037300371140201100991001003000010002426102161129779300001003003830038300383003830038
4020430037233000612951625101001001000010010000500427404503001830037300372451532499510100200300002006000030037300371140201100991001003000010005726101161129779300001003003830038300383003830038
4020430037233000612951625101001001000010010000500427404503001830037300372451532499510100200300002006000030037300371140201100991001003000010006926101161129779300001003003830038300383003830038
40204300372320004412946825101001001000010010000500427404503001830037300372451532499510100200300002006000030037300371140201100991001003000010009926101161129779300001003003830038300383003830038
4020430037233000612951625101001001000010010000500427404503001830037300372451532499510100200300002006000030037300371140201100991001003000010002726101161129779300001003003830038300383003830038
4020430037233000612951625101001001000010010000500427404503001830037300372451532499510100200300002006000030037300371140201100991001003000010003026101161129779300001003003830038300383003830038
402043003723300089295162510100100100001001000050042740450300183003730037245153249951010020030000200600003003730037114020110099100100300001000026101161129779300001003003830038300383003830038
40204300372330006129516251010010010000100100005004274045030018300373003724515324995101002003000020060000300373003711402011009910010030000100011126101161129779300001003003830038300383003830038
402043003723300089295162510100100100001001000050042740450300183003730037245153249951010020030000200600003003730037114020110099100100300001000626101161129779300001003003830038300383003830038
402043003723300061295162510100100100001001000050042740450300183003730037245153249951010020030000200600003003730037114020110099100100300001000026101161129779300001003003830038300383003830038

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)9fa1a8acc5cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
4002430037225061295162510010101000010100005042740451300183003730037245383250171065820300002060000300373003711400211091010300001003002520116112978430000103003830038300383003830038
4002430037224061295162510010101000010100005042740451300183003730037245383250171001020300002060000300373003711400211091010300001002002520116112978430000103003830038300383003830038
4002430037225061295162510010101000010100005042740451300183003730037245383250171001020300002060000300373003711400211091010300001000002520116112978430000103003830038300383003830038
4002430037225061295162510010101000010100005042740450300183003730037245383250171001020300002060000300373003711400211091010300001007002520116112978430000103003830038300383003830038
4002430037225061295162510010101000010100005042740450300183003730037245383250171001020300002060000300373003711400211091010300001001002520116112978430000103003830038300383003830038
4002430037225061295162510010101000010100005042740450300183003730037245383250171001020300002060000300373003711400211091010300001000012520116122978430000103003830038300383003830038
4002430037225061295162510010101000010100005042740450300183003730037245383250291001020300002060000300373003711400211091010300001002002520116112978430000103003830038300383003830038
40024300372250612951625100101010000101000050427404503001830037300372453832501710010203000020600003003730037114002110910103000010028302520116112978430000103003830038300383003830038
40024300372410189295162510010101000010100005042740450300183003730037245383250171001020300002060000300373003711400211091010300001000002520116112978430000103003830038300383003830038
4002430037225061295165010019101000010100005042740450300183003730037245383250171001020300002060000300913003711400211091010300001000002520116112978430000103003830038300383003830038

Test 3: Latency 1->3

Code:

  pmull v0.1q, v1.1d, v2.1d
  eor v0.16b, v0.16b, v3.16b
  mov v2.16b, v0.16b
  nop
  movi v0.16b, 1
  movi v1.16b, 2
  movi v2.16b, 3

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03090b18191e1f3f4e51inst 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 ld/st (7d)~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)9fa0a8a9accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
40204300372330000121766129516251010010010000100100005004274045030018300373003724515032499510100200030000200600003003730037114020110099100100300001000000261021611297790300001003003830038300383003830038
40204300372330000006129516251010010010000100100005004274045130018300373003724515032499510100200030000200600003003730037114020110099100100300001000000261011611297790300001003003830038300383003830038
40204300372330000006129516251010010010000100100005004274045130018300373003724515032499510100204030000200604943003730037114020110099100100300001000200264211611297790300001003003830038300383003830038
40204300372330000006129516251010010010000100100005004274045130018300373003724515032499510100200030000200600003003730037114020110099100100300001000000261011611297791300001003003830038300383003830038
40204300372330000006129516251010010010000100100005004274045130018300373003724515032499510100200030000200600003003730037114020110099100100300001000000261011611297790300001003003830038300383014930038
4020430037233000000225229410251012210210018108101505004274045130018300373003724498032499510100200030247202614923014730145114020110099100100300001000000261011611297790300001003003830038300383003830038
40204300372320000006129516251010010010000100100005004274045130018300373003724515032499510100200030000200600003003730037114020110099100100300001000000261011611297790300001003003830094300383003830092
40204301472320000006129516251010010010000100100005004274045130018300373003724515032499510100200030000200600003003730037114020110099100100300001000000261011611297790300001003003830038300383003830038
40204300372320000006129516251010010010000100100005004274045130018300373003724515032499510100200030000200600003003730037114020110099100100300001000000261011611297790300001003003830038300383003830038
40204300372320000006129516251010010010000100100005004274045130018300373003724515032499510100200030000200600003003730037114020110099100100300001000000261011611297790300001003026030038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)0308191e3f4e51inst 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)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)9fa1a8acbranch mispredict (cb)cdcfd0d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
40024300372410002872951625100101010000101000050427404513001803003730037245380325017100102030000206000030037300371140021109101030000100000025200416342978430000103003830038300383003830038
4002430037225000612951625100101010000101000050427404513001803003730037245380325017100102030000206000030037300371140021109101030000100000025200416432978430000103003830038300383003830038
4002430037225000612951625100101010000101000050427404513001803003730037245380325017100102030000206000030037300371140021109101030000100000025200416242978430000103003830038300383003830038
4002430037225000612951625100101010000101000050427404513001803003730037245380325017100102030000206000030037300371140021109101030000100000025200416652978430000103003830038300383003830038
4002430037225000612951625100101010000101000050427404513001803003730037245380325017100102030000206000030037300371140021109101030000100000025200616432978430000103003830038300383003830038
4002430037225000612951625100101010000101000050427404513001803003730037245380325017100102030000206000030037300371140021109101030000100000025200416432978430000103003830038300383003830038
40024300372250005362951625100101010009101000050427404513001803003730037245380325017100102030000206000030037300371140021109101030000100000025200316442978430000103003834270300383003830038
4002430037225000612951625100101010000101000050427227913001803003730037245380325017100102030000206000030037300371140021109101030000100000025200316442978430000103003830038300383003830038
4002430037225000612951625100101010000101000050427404513001803003730037245380325017100102030000206000030037300371140021109101030000100000025200316342978430000103003830038300383003830038
4002430037225000612951625100101010000101000050427404513001803003730037245380325017100102030000206000030037300371140021109101030000100000025200416432978430000103003830038300383003830038

Test 4: Latency 1->4

Code:

  pmull v0.1q, v1.1d, v2.1d
  eor v0.16b, v0.16b, v3.16b
  mov v3.16b, v0.16b
  nop
  movi v0.16b, 1
  movi v1.16b, 2
  movi v2.16b, 3

(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)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
4020430037233001210329516251010010010000100100005004274045030018030037300372451532499510100200300002006000030037300371140201100991001003000010000026102161129779300001003003830038300383003830038
40204300372320006129516251010010010000100100005004274045130018030037300372451532499510100200300002006000030037300371140201100991001003000010000026101161129779300001003003830038300383003830038
40204300372330027103295162510100100100001001000050042740450300180300373003724515324995101002003000020060000300373003711402011009910010030000100042026101161129779300001003003830038300383003830038
40204300372330008229516251010010010000100100005004274045030018030037300372451532499510100200300002006000030037300371140201100991001003000010000026101161129779300001003003830038300383003830038
40204300372330006129516251010010010000100100005004274045030018030037300372451532499510100200300002006000030037300371140201100991001003000010000026101161129779300001003003830038300383003830038
402043003723300010329516251010010010000100100005004274045130018030037300372451532499510100200300002006000030037300371140201100991001003000010000026101161129779300001003003830038300383003830038
40204300372330008929516251010010010000100100005004274045030018030037300372451532499510100200300002006000030037300371140201100991001003000010000026101161129779300001003003830038300383003830038
40204300372330006129516251010010010000100100005004274045030018030037300372451532499510100200300002006000030037300371140201100991001003000010006026101161129779300001003003830038300383003830038
40204300372320006129516251010010010000100100005004274045130018030037300372451532499510100200300002006000030037300371140201100991001003000010000026101161129779300001003003830038300383003830038
402043003723200010329516251010010010000100100005004274045030018030037300372451532499510100200300002006000030037300371140201100991001003000010000026101161129779300001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03040818191e1f3a3f4e51inst 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)74scheduler 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)9fa1a6a8a9acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
4002430037225000000261295162510010101000010100005042740450300183003730037245380325017100102030000206000030037300371140021109101030000100002302525161613122978430000103003830038300383003830038
400253003724510000016129516251001010100001010000504274045030018300373003724538032501710010203000020600003003730037114002110910103000010003000252512161192978430000103003830038300383003830038
4002430037225100000161295162510010101000010100005042740450300183003730037245380325017100102030000206000030037300371140021109101030000100000002527151613142978430000103003830038300383003830038
4002430037225100000164295162510010101000010100005042740450300183003730037245380325017100102030000206000030037300371140021109101030000100041013202525131613152978430000103003830038300383003830038
40024300372241000001642951625100101010000101000050427404503001830037300372453803250171001020300002060000300373003711400211091010300001000260602526131611142978430000103003830038300383003830038
4002430037225100000161295162510010101000010100005042740450300183003730037245380325017100102030000206000030037300371140021109101030000100010750252591614152978430000103003830038300383003830038
4002430037225100000161295162510010101000010100005039069050300183003730037245380325017100102030000206000030037300371140021109101030000100000002526131610152978430000103003830038300383003830038
40024300372391000001943295162510010101000010100005042740450300183003730037245380325017100102030000206000030037300371140021109101030000100000002526171610132978430000103003830038300383003830038
4002430037225100000161295162510010101000010100005042740450300183003730037245380325017100102030000206000030037300371140021109101030000100000002526121611182978430000103003830038300383003830038
4002430037225100000161295162510010101000010100005042740450300183003730037245380325017100102030000206000030037300371140021109101030000100000002526111615142978430000103003830038300383003830038

Test 5: throughput

Count: 8

Code:

  pmull v0.1q, v8.1d, v9.1d
  eor v0.16b, v0.16b, v10.16b
  pmull v1.1q, v8.1d, v9.1d
  eor v1.16b, v1.16b, v10.16b
  pmull v2.1q, v8.1d, v9.1d
  eor v2.16b, v2.16b, v10.16b
  pmull v3.1q, v8.1d, v9.1d
  eor v3.16b, v3.16b, v10.16b
  pmull v4.1q, v8.1d, v9.1d
  eor v4.16b, v4.16b, v10.16b
  pmull v5.1q, v8.1d, v9.1d
  eor v5.16b, v5.16b, v10.16b
  pmull v6.1q, v8.1d, v9.1d
  eor v6.16b, v6.16b, v10.16b
  pmull v7.1q, v8.1d, v9.1d
  eor v7.16b, v7.16b, v10.16b
  movi v8.16b, 9
  movi v9.16b, 10
  movi v10.16b, 11

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)030f1e3f51inst 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)9fa8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602042006515502853925801001008000010080000500640000002004502006420064031418010020016000020032000020064200641116020110099100100160000100030001011111621200611600001002006520065200652006520065
160204200641560351392580100100800001008000050064000000200450200642006403228010020016000020032000020064200641116020110099100100160000100000001011121612200611600001002006520065200652006520065
160204200641560345392580100100800001008000050064000000200450200642006403228010020016000020032000020064200641116020110099100100160000100000001011221622200611600001002006520065200652006520065
160204200641560375392580100100800001008000050064000000200450200642006403228010020016000020032000020064200641116020110099100100160000100000001011221611200611600001002006520065200652006520065
160204200641550396392580100100800001008000050064000000200453200642006403228010020016000020032000020064200641116020110099100100160000100000001011121621200611600001002006520065200652006520065
1602042006416103213925801001008000010080000500640000002004502006420064018228010020016000020032000020064200641116020110099100100160000100000001011111612200611600001002006520065200652006520065
1602042006415500392580100100800001008000050064000000200450200642006403228010020016000020032000020064200641116020110099100100160000100000001011121611200611600001002006520065200652006520065
160204200641560504392580100100800001008000050064000000200450200642006403228010020016000020032000020064200641116020110099100100160000100000001011231612200611600001002006520065200652006520065
160204200641560357392580100100800001008000050064000000200450200642006403228010020016000020032000020064200641116020110099100100160000100030001011211612200611600001002006520065200652006520065
1602042006415602821022580100100800001008000050064000000200450200642006403228010020016000020032000020064200641116020110099100100160000100000001011211612200611600001002006520065200652006520065

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03071e3a3f51inst 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)9fa6a8a9accfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaebec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002420064155100114258001010800001080000506400001120027200462004632280010201600002032000020046203041116002110910101600001000001004331121246221718200471500160000102005120051200512005120051
1600242004615600045258001010800001080000506400000120031200502005032280010201600002032000020050202731116002110910101600001000001004231218206122019200473000160000102004720051200512004720051
1600242005015600051258001010800001080000506400000120027200462005032280010201600002032000020050202581116002110910101600001000001004331217246221717200473000160000102005120051200512005220051
16002420046155000182258001010800001080000506400001120031201072004632280010201600002032000020046202501116002110910101600001000031003932212244221717200483000160000102004720051200472004720047
1600242005015601204502580010108000010800005064000011200272005020046322800102016000020320000200522025811160021109101016000010000010042312172410232014200482001160000102005220052200622005220052
1600242005115600045298001010800001080000506400001120032200512005132280010201600002032000020051202881116002110910101600001000001004331119254111617200482001160000102005220052200522005220052
1600242005115500145278001010800001080000506400001120032200512005132280010201600002032000020051202501116002110910101600001000001003961116256221719200614002160000102006120061200612006120061
1600242005115600045278001010800001080000506400001120032200512005132280010201600002032000020051202671116002110910101600001000001003831118254111719200482002160000102005220065200522005220052
1600242005115500045278001010800001080000506400001120032200512005132280010201600002032000020051202631116002110910101600001000001004631219254111717200482001160000102006120061200522005220061
1600242006015500051298001010800001080000506400001120032200602005132280010201600002032000020060202761116002110910101600001000031003831116254111716200482001160000102005220052200522005220052