Apple M1 Microarchitecture Research by Dougall Johnson

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

SADALP (vector, 2D)

Test 1: uops

Code:

  sadalp v0.2d, v1.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)031e3f4e51inst 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)a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004303722061254825100010001000398313030183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
1004303723061254825100010001000398313030183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
1004303723061254825100010001000398313130183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
1004303723061254825100010001000398313130183037303724153289510001000200030373037111001100010073316232630100030383038303830383038
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000605173216222630100030383038303830383038
1004303723061254825100010001000398313130183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
1004303723061254825100010001000398313030183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
1004303723061254825100010001000398313030183037303724153289510001000200030373037111001100000073216222630100030383038303830383038
1004303722066254825100010001000398313130183037303724153289510001000200030373037111001100010073216222630100030383038303830383038
1004303723061254825100010001000398313030183037303724153289510001000200030373037111001100000073216222630100030383038303830383038

Test 2: Latency 1->1

Code:

  sadalp v0.2d, v1.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)0318191e3f4e51inst 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
10204300372250006129548251010010010000100100005224277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
10204300372250006129548251010010010000100100005004277313130018300373003728265328763104212001000020020000300373003711102011009910010010000100007101161129693100001003003830038300383003830038
10204300372250006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
10204300372240006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
102043003722500010329548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
10204300372240006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
10204300372240008229548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
10204300372250006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
10204300372240006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
10204300372250006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)0318191e3f4e51inst 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
1002430037225002461295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
100243003722500061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
1002430037225114561295482510010101000010100005042773130300183003730037282873287671001020104852020324300373003711100211091010100001000640216222963010000103003830038300383003830038
100243003722500061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
100243003722400061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
1002430037225000485295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
100243003722500061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
10024300372250039346295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
100243003722500061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
1002430037225000251295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  sadalp v0.2d, v0.4s
  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)030a0b191e3a3f4e51inst 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)9facc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225000006129547251010010010000100100005004277160130018300373003728271728741101002001000820020016300373003711102011009910010010000100011171711611296460100001003003830038300383003830038
1020430037225000006129547251010010010000100100005004277160130018300373003728271728740101002001000820020016300373003711102011009910010010000100011171811611296450100001003003830038300383003830038
1020430037225000006129547251010010010000100100005004277160130018300373003728271728741101002001000820020016300373003711102011009910010010000100011171711611296450100001003003830038300383003830038
1020430037225000006129547251010010010000100100005004277160130018300373003728271628740101002001000820020016300373003711102011009910010010000100011171811611296450100001003003830038300383003830038
1020430037224000006129547251010010010000100100005004277160130018300373003728271628740101002001000820020016300373003711102011009910010010000100011171811611296460100001003003830038300383003830038
102043003722500012015629547251010010010000100100005004277160130018300373003728271628740101002001000820020016300373003711102021009910010010000100011171811611296460100001003003830038300383003830038
10204300372250000023229547251010010010000100100005004277160130018300373003728271628741101002001000820020016300373003711102011009910010010000100011171711611296450100001003003830038300383003830038
1020430037225000006129547251010010010000100100005004277160130018300373003728271728741101002001000820020016300373003711102011009910010010000100011171711611296450100001003003830038300383003830038
1020430037225000006129547251010010010000100100005004277160130018300373003728271728740101002001000820020016300373003711102011009910010010000100011171811711296450100001003003830038300383003830038
1020430037225000006129547251010010010000100100005004277160130018300373003728271728741101002001000820020016300373003711102011009910010010000100011171711611296450100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)0307080a0b181e1f3a3f4e51inst 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)9faccfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372251010000268295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001006441116111129629010000103003830038300383003830038
10024300372251010000268295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001006441116111129629010000103003830038300383003830038
10024300372251010000268295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001006441116111129629010000103003830038300383003830038
10024300372251010000268295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001006441116111129629010000103003830038300383003830038
1002430037225101000026829547251001010100001010000504277160130018300373003728286328786100102010000202000030037300371110021109101010000100644616111129629010000103003830038300383003830038
100243003722510100002638295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001006441116111129629010000103003830038300383003830038
1002430037224101000026829547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100644111661129629010000103003830038300383003830038
100243003722510100002353295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001006441116111129629010000103003830038300383003830038
10024300372251010000268295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001006441116111129629010000103003830038300383003830038
10024300372251010000268295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001006441116111029629010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  sadalp v0.2d, v8.4s
  movi v1.16b, 0
  sadalp v1.2d, v8.4s
  movi v2.16b, 0
  sadalp v2.2d, v8.4s
  movi v3.16b, 0
  sadalp v3.2d, v8.4s
  movi v4.16b, 0
  sadalp v4.2d, v8.4s
  movi v5.16b, 0
  sadalp v5.2d, v8.4s
  movi v6.16b, 0
  sadalp v6.2d, v8.4s
  movi v7.16b, 0
  sadalp v7.2d, 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.2509

retire (01)cycle (02)030b181e3f51inst 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)9fa1a8acc5branch mispredict (cb)cdcfd0d2d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602042007815000392925801161008001610080028500640196115200452006520065612801282008002820016005620065200651116020110099100100160000100200111101195011611200621600001002006620066200662006620066
160204200651500002925801161008001610080028500640196115200452006520065612801282008002820016005620065200651116020110099100100160000100000111101195111610200621600001002006620066200662006620066
160204200651510002925801161008001610080028500640196110200452006520065612801282008002820016005620065200651116020110099100100160000100003111101205001610200621600001002006620066200662006620066
160204200651500002925801161008001610080028500640196015200452006520065612801282008002820016005620065200651116020110099100100160000100000111101205101600200621600001002006620066200662006620066
160204200651500002925801161008001610080028500640196115200452006520065612801282008002820016005620065200651116020110099100100160000100000111101205011610200621600001002006620066200662006620066
16020420065150001592925801161008001610080028500640196115200452006520065612801282008002820016005620065200651116020110099100100160000100000111101195021610200621600001002006620066200662006620066
160204200651500002925801161008001610080028500640196110200452006520065612801282008002820016005620065200651116020110099100100160000100000111101195101601200621600001002006620066200662006620066
160204200651500002925801161008001610080028500640196010200452006520065612801282008002820016005620065200651116020110099100100160000100000111101195101601200621600001002006620066200662006620066
1602042006515100122925801161008001610080028500640196015200452006520065612801282008002820016005620065200651116020110099100100160000100000111101205111610200621600001002006620066200662006620066
160204200651500002925801161008001610080028500640196015200452006520065612801282008002820016005620065200651116020110099100100160000100000111101205111610200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0304070a181e3f51inst 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)9fa8cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002420091150111004527800101080000108000050640000110200322005120060322800102080000201600002005120060111600211091010160000100100308219342216520048201160000102006120052200612005220061
160024200511500000605127800101080000108000050640000115200322005120051322800102080000201600002006020051111600211091010160000102100288413252114520048201160000102005220052200522005220052
16002420051150000065127800101080000108000050640000115200322005120051322800102080000201600002005120051111600211091010160000100100288416254224420048401160000102005220061200612006120052
16002420060150000005129800101080000108000050640000115200412006020060322800102080000201600002006020051111600211091010160000100100308425342226420048402160000102005220061200612006120061
160024200601500000051298001010800001080000506400000152004120060200603228001020800002016000020060200601116002110910101600001001003111523344223520057402160000102006120061200612005220061
160024200601510000245129800101080000108000050640000015200412006020060322800102080000201600002006020060111600211091010160000100100308214252126520057202160000102005220052200612005220061
160024200511510010185129800101080000108000050640000015200322006020051322800102080000201600002005120051111600211091010160000100100308115254116520048202160000102005220052200612005220061
16002420051150000004527800101080000108000050640000015200322006020051322800102080000201600002006020051111600211091010160000100100293425344116520048402160000102006120052200612005220061
160024200511500000051298001010800001080000506400000152004120060200603228001020800002016000020060201291116002110910101600001001003111523344225620057402160000102006120061200612006120061
16002420060150001005129800101080000108000050640000015200412006020060322800102080000201600002006020060111600211091010160000100100308213252225420057402160000102006120061200612006120061

Test 5: throughput

Count: 16

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03090b1e373f51inst 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)9fa8acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16020440060300000183025160117100160009100160020500251930040021400494003919977619999160120200160032200320064400394003911160201100991001001600001000001111011801600400361600001004005040040400404005040040
16020440040300002713025160108100160009100160020500128013240030400394004019977619990160120200160032200320064400494003911160201100991001001600001000001111011801600400361600001004004040041400504004040050
1602044003930000003025160117100160009100160020500128013240030400494003919977620000160120200160032200320064400404004911160201100991001001600001000001111011801600400361600001004005040040400404005040041
1602044004930000003025160109100160018100160020500132013240020400404004919977620000160120200160032200320064400404004011160201100991001001600001000001111011801600400361600001004005040050400504004040050
16020440039300000033325160117100160017100160020500132013240030400394004019977619990160120200160032200320064400494004911160201100991001001600001000001111011801600400461600001004005040040400414005040041
16020440049300000173125160117100160009100160020500128013240021400494003919977619990160120200160032200320064400494004911160201100991001001600001000001111011801600400371600001004004940049400404005040050
16020440039300000183025160108100160009100160020500128013240030400404004019977619991160120200160032200320064400404004011160201100991001001600001000001111011801600400451600001004004140041400504004040040
16020440039300010183025160108100160008100160178500255910240021400494003919977620000160120200160032200320064400494004911160201100991001001600001000001111011801600400371600001004005040040400414005040041
16020440049300000183025160109100160008100160020500132012940021400494003919977619991160120200160032200320064400404004911160201100991001001600001000001111011801600400371600001004005040050400504005040040
1602044004930000013025160118100160018100160020500128013240030400394004919977619991160120200160032200320064400394004011160201100991001001600001000001111011801600400361600001004005040040400414005040041

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0304080a0b18191e1f373f4e51inst 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)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)9fa0a6a7a8a9acc2cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002440051300100000001580251600271016000010160000501345078114002040039400491999603200191600102016000020320000400484003911160021109101016000010000000010022311716211121040036155160000104004040052400404004040041
160024400392990000000004602516001010160000101600005012800001040020400394003919996032001916001020160000203200004005140039111600211091010160000100000000100223111016211121240036155160000104004040052400404005240040
16002440059300000000000460251600101016000010160000501280000104002040039400391999603200191600102016000020320000400394003911160021109101016000010000009601002231181621181040036155160000104004040040400404004940040
1600244008530000010000046025160010101600001016000050128000010400204003940039199960320019160175201600002032000040039400391116002110910101600001000000165010022311111621110740036155160000104004040040400404004040040
1600244005230000000000071802516001010160000101600005023989990140032400394003919996032001916001020160000203200004003940039111600211091010160000100000018301002462212164221211400363010160000104004040040400404004040052
16002440060299000000000460251600101016000010160000501280000104002040039400391999603200191600102016000020320000400394004011160021109101016000010000002190100223111216211121240048155160000104009940050400404004040040
1600244005030000000000046025160010101600001016000050128000011400204004840049199960320019160010201600002032000040039400391116002110910101600001000000186010022311121621110840036155160000104004040040400504004140040
16002440050300000000000460251600271016000010160000501280000114002940040400391999603200191600102016000020320000400514003911160021109101016000010000000010022311131621110840048155160000104004040052400404004040040
16002440050300000000000460251600271016000010160000501280000114002040039400391999603200191600102016000020320000400394004811160021109101016000010000000010022311816211111240036155160000104004040052400404004040040
160024400503000000000004602516001010160001101600005012800001140020400394005119996032001916001020160000203200004003940039111600211091010160000100001246006100453111413021114840480155160000104054540581403554072140643