Apple Microarchitecture Research by Dougall Johnson

M1/A14 P-core (Firestorm): Overview | Base Instructions | SIMD and FP Instructions
M1/A14 E-core (Icestorm):  Overview | Base Instructions | SIMD and FP Instructions

SETF16

Test 1: uops

Code:

  setf16 w1
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4
  mov x4, 5

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 1.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)0318191e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)606d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst int alu (97)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
100410357000619172510001000100062250010351035805388210001000200010351041110011000007312711990100010361036103610361036
100410357000619172510001000100062250010351035805388210001000200010351041110011000007312711990100010361036103610361036
100410358000619172510001000100062250010351035805388210001000200010351041110011000007312711990100010361036103610361036
100410358009619172510001000100062250010351035805388210001000200010351041110011000007312711990100010361036103610361036
1004103580030619172510001000100062250010351035805388210001000200010351041110011000007312711990100010361036103610361036
100410358000619172510001000100062250010351035805388210001000200010351041110011000007312711990100010361036103610361036
100410358000619172510001000100062250010351035805388210001000200010351041110011000037312711990100010361036103610361036
1004103580001569172510001000100062250010351035805388210001000200010351041110011000007312711990100010361036103610361036
100410357000619172510001000100062250010351035805388210001000200010351041110011000007312711990100010361036103610361036
10041035800061917251000100010006225001035103580538821000100020001035104111001100007907312711990100010361036103610361036

Test 2: Latency 2->1

Chain cycles: 1

Code:

  setf16 w1
  cset x1, cc
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4
  mov x4, 5

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 1 chain cycle): 1.0035

retire uop (01)cycle (02)03mmu table walk data (08)18191e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020420035150000061199302520100201002011212972334916955200352003517425617487201122022430236200351041120201100991002010010100061111318162001120000101002003620036200362003620036
20204200351500002461199302520100201002011212972334916955200352003517425617487201122022430236200351041120201100991002010010100001111318162001120000101002003620036200362003620036
2020420035150000061199302520100201002011212972334916955200352003517425617487201122022430236200351041120201100991002010010100001111318162001120000101002003620036200362003620036
20204200351500000726199262520100201002011212972334916955200352003517425617487201122022430236201711042120201100991002010010100001111318162001120000101002003620036200362003620036
2020420035150000061199302520100201002011212972334916955200352003517425617487201122022430236200351041120201100991002010010100001111318162001120000101002003620036200362003620036
2020420035150000061199302520100201002011212972334916955200352003517425617487201122022430236200351041120201100991002010010100001111318162001120000101002003620036200362003620036
2020420035149000061199302520100201002011212972334916955200352003517425617487201122022430236200351041120201100991002010010100001111318162001120000101002003620036200362003620036
2020420035150000061199302520100201002011212972334916955200352003517425617487201122022430236200351041120201100991002010010100001111318162001120000101002003620036200362003620036
2020420035150000084199302520100201002011212972334916955200352003517425617487201122022430236200351041120201100991002010010100001111318162001120000101002003620036200362003620036
20204200351500000232199302520100201002011212972334916955200352003517425617487201122022430236200351041120201100991002010010100001111318162001120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code, minus 1 chain cycle): 1.0035

retire uop (01)cycle (02)03mmu table walk data (08)1e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100104161270227111999520022100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100107991270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100103731270127111999520000100102003620036200362003620036
20024200351500061199182520010200102001012972471491695520035200351742831750420010200203002020035104112002110910200101001044841270127211999520000100102003620036200362003620036
2002420035150091241991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010001270127111999520000100102003620036200362003620036
200242003515000611991825200102003220010129724714916955200352003517428317504200102002030020200351041120021109102001010010001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010061270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010001270227111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010101270127121999520000100102003620036200362003620036
200242003515000611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010061270117111999520000100102003620036200362003620036

Test 3: Latency 2->2

Code:

  setf16 w0
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4
  mov x4, 5

(non-fused SUB/CBNZ loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)031e3a3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)6061696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst int alu (97)l1d tlb miss (a1)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd0d2map dispatch bubble (d6)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204100357500619927251020010200102106477120049695610035100358673787361021010224202481003511011102011009910100000111719001610010101001001003610036100361003610036
10204100357500619927251020010200102106477121049695610035100358673787361021010224202481003511011102011009910100000111719511610010101001001003610036100361003610036
10204100357501619927251020010200102106477120549695610035100358673787361021010224202481003511011102011009910100000111719001610010101001001003610036100361003610036
102041003575012279927251020010200102106477121049695610035100358673787361021010224202481003511011102011009910100400111719511610010101001001003610036100361003610036
10204100357501619927251020010200102106477121049695610035100358673787361021010324202481007911011102011009910100000111719001610010101001001003610036100361003610036
10204100357501669927251020010200102106477121049695610035100358673787361021010224202481003511011102011009910100000111719011610010101001001003610036100361003610036
10204100357500619927251020010200102106477120549695610035100358673787361021010224202481003511011102011009910100000111719511610010101001001003610036100361003610036
1020410035750127699272510200102001021064771205496956100351003586737873710210102242024810035110111020110099101000330111719011610010101001001003610036100361003610036
102041003575006199272510200102001021064771210496956100351003586737873610210102242024810035110111020110099101000190111719511610010101001001003610036100361003610036
10204100357500619927251020010200102106477120049695610035100358673787371021010224202481003511011102011009910100000111719001610010101001001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)033f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst int alu (97)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024100357512699182510020100201002064729614969551003510035867838754100201002020020100351041110021109100100064032733999310010101003610036100361003610036
1002410035756199182510020100201002064729614969551003510035867838754100201002020020100351041110022109100100064032733999310010101003610036100361003610036
100241003575147991825100201002010020647296149695510035100358678387541002010020200201003510411100211091001021064032733999310010101003610036100361003610036
1002410035756199182510020100201002064729604969551003510035867838754100201002020020100351041110021109100100064032733999310010101003610036100361003610036
1002410035766199182510020100201002064729614969561003510035867838754100201002020020100351041110021109100100064032733999310010101003610036100361003610036
100241003575622991825100201002010020647296149695510035100358678387541002010020200201003510411100211091001003664032733999310010101003610036100361003610036
1002410035756199182510020100201002064729614969551003510035867838754100201002020020100351041110021109100100064032733999310010101003610036100361003610036
10024100357547899182510020100201002064729614969551003510035867838754100201002020020100351041110021109100106064032733999310010101003610036100361003610036
1002410035756199182510020100201002064729614969551003510035867838754100201002020020100351041110021109100100064032733999310010101003610036100361003610036
1002410035756199182510020100201002064729614969551003510035867838754100201002020020100351041110021109100100064032733999310010101003610036100361003610036

Test 4: throughput

Count: 8

Code:

  ands xzr, xzr, xzr
  setf16 w0
  ands xzr, xzr, xzr
  setf16 w0
  ands xzr, xzr, xzr
  setf16 w0
  ands xzr, xzr, xzr
  setf16 w0
  ands xzr, xzr, xzr
  setf16 w0
  ands xzr, xzr, xzr
  setf16 w0
  ands xzr, xzr, xzr
  setf16 w0
  ands xzr, xzr, xzr
  setf16 w0
  mov x0, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3a3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)flags prf full (73)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
160204534324000000000282716012016012016012810637381495033953408534083334706333571601281602401602405340866111602011009910016010010000000001111011901600534051600201005340953409534095340953409
160204534084000000000282716012016012016012810637381495032853408534413334706333571601281602401602405340866111602011009910016010010000000001111011901600534051600201005340953409534095340953409
160204534084000000000282716012016012016012810637381495032853408534083334706333571601281602401602405340866111602011009910016010010000000001111011901600534051600201005340953409534095340953409
1602045340840000000006932716012016012016012810637381495032853408534083334706333571601281602401602405340866111602011009910016010010000000001111011901600534051600201005340953409534095340953409
1602045340840000401200282716012016012016019810637381495032853408534083334706333571601281602401602405340866111602011009910016010010000000001111011901600534051600201005340953409534095340953409
160204534084000000000282716012016012016012810637381495032853408534083334706333571601281602401602405340866111602011009910016010010000000001111011901600534051600201005340953409534095340953409
160204534084000000900282716012016016316012810637381495032853408534083334706333571601281602401602405340866111602011009910016010010000000001111011901600534051600201005340953409534095340953409
1602045340840000000002182716012016012016012810637381495032853408534083334706333571601281602401602405340866111602011009910016010010000000001111011901600534051600201005340953409534095340953409
160204534084000000000282716012016012016012810637381495032853408534083334706333571601281602401602405340866111602011009910016010010000000001111011901600534051600201005340953409534095340953409
16020453408400000100012182716018716012016012810637381495032853408534083334706333571601281602401602405340866111602011009910016010010000000001111011901600534051600201005340953409534095340953409

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)191e3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)5f60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d cache writeback (a8)a9accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaeb? int retires (ef)f5f6f7f8fd
160024533904000004325160010160010160010102938811495029453374533743333133335116001016002016002053374661116002110910160010109012100223113419212111453370160000157105337553375533755337553375
16002453374400000432516001016001016001010293881149502945337453374333313333511600101600201600205337466111600211091016001010200100223111119211201953370160000157105337553375533755337553375
1600245337440000043251600101600101602961029388114950294533745337433331333351160010160020160020533746611160021109101600101048018100223111019211111553370160000157105337553375533755337553375
16002453374400000432516001016001016001010293881149502945337453374333313333511600101600201600205337466111600211091016001010200100223111419211141153370160000157105337553375533755337553375
16002453374399000432516001016001016001010293881149502945337453374333313333511600101600201600205337466111600211091016001010200100226111219211171353370160000157105337553375533755337553375
16002453374399000642516001016001016001010293881149502945337453374333313333511600101600201600205337466111600211091016001010100100223111919211191453370160000157105337553375533755337553375
16002453374400000432516001016001016001010293881149502945337453374333313333511600101600201600205337466111600211091016001010200100223111419211121053370160000157105337553375533755337553375
16002453374399000432516021416001016001010293881149502945337453374333313333511600101600201600205337466111600211091016001010100100226111319421121253370160000157105337553375533755337553375
160024533744000004325160010160010160010102938811495029453374533743333133335116001016002016002053374661116002110910160010102001002431213194221412534191600001517105337553375533755337553375
16002453374400000432516001016001016001010293881149502945337453374333313333511600101600201600205337466111600211091016001010200100246121619211111853370160000307105337553375533755337553375

Test 5: throughput

Count: 4

Code:

  fcmp s0, s0
  setf16 w0
  setf16 w0
  setf16 w0
  setf16 w0
  mov x0, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03181e3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)696d6emap stall dispatch (70)flags prf full (73)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
5020413458104042611224501224011210010401431001357512780097133951341613416613724677711050156402511001380302200261341613416115020110099100401001000010011132210160013413400121001341613417134171341713417
50204134161000782825501224011210010401431001357512780097133951341613416613724677711050156402511001380302200261341613416115020110099100401001000010011132210160013412400121001341713417134171341613417
50204134161000812825501224011210010401431001357512780097133951341613416613724677711050156402511001380302200261341613416115020110099100401001000010011132210160013413400121001341713417134171341713417
50204134161000156283725501224011210010401431001357608280097133951341613416613724677711050156402511001380302200261341613416115020110099100401001000010011132210160013413400121001341713417134171341613417
502041341610101022825501224011210010401431001357512780097133951341613416613724677711050156402511001380302200261341613416115020110099100401001000010011132210160013413400121001341713417134161341713417
50204134161010047925501224011210010401431001357512780097133951341613416613924567711050156402511001380302200261341613416115020110099100401001000010011132210161013413400121001341713417134171341713417
502041341610100286025501224011210010401431001357512780097133951341613416613924567711050156402511001380302200261341613416115020110099100401001000010011132210160013413400121001341713417134171341713417
502041341610004622825501224011210010401431001357512780097133951341613416613724677711050156402511001380302200261341613416115020110099100401001000010011132210160013413400121001341713417134171341713417
5020413416100002825501224011210010401431001357512780097133951341613416613924677711050156402511001380302200261341613416115020110099100401001000010011132210160013413400121001341713417134171341713417
5020413416101007025501224011210010401431003757512780097133951341513416613724567711050156402511001380302200261341613415115020110099100401001000010011132210160013413400121001341713417134171341713417

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l2 tlb miss instruction (0a)181e3f4d51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)flags prf full (73)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)l1d cache writeback (a8)acc2cfd0d5map dispatch bubble (d6)ddfetch restart (de)dfe0? int output thing (e9)? int retires (ef)f5f6f7f8fd
50024134051000004502550010400101000040010100005734568000001335313382133825575379537109500104002010000800202000013382133821150021109104001010000100290314603191161337940000101338313383133831338313383
50024133821000004502550010400101000040010100005734568000001335313382133825575378437109500104002010000800202000013382133821150021109104001010000100030314632192261337940000101338313383133831338313383
50024133821040004502550010400101000040010100005734568000001335313382133825575379537109500104002010000800202000013382133821150021109104001010000100300314632191261337940000101338313383133831338313383
50024133821000004502550010400101000040010100005734568000001335313382133825577378437109500104002010000800202000013382133821150021109104001010000100000314631192261337940000101338313383133831338313383
5002413382100000450255001040010100004001010000573456800000133531338213382557737953710950010400201000080020200001338213382115002110910400101000010001470314631192261337940000101338313383133831338313383
50024133821000006602550010400101000040010100005734568000001335313382133825575379537109500104002010000800202000013382133821150021109104001010000100000314632191161337940000101338313383133831338313383
50024133821010004502550010400101000040010100005734568000001335313382133825575378437109500104002010000800202000013382133821150021109104001010000102100314632191161337940000101338313383133831338313383
50024133821030004502550010400101000040010100005734568000001335313382133825575378437109500104002010000800202000013382133821150021109104001010000100100314631191261337940000101338313383133831338313383
50024133821000004502550010400101000040010100005734568000001335313382133825577379537109500104002010000800202000013382133821150021109104001010000100000314632192161337940000101338313383133831338313383
50024133821000004502550010400101000040010100005734568000001335313382133825575379537109500104002010000800202000013382133821150021109104001010000100100314632191161337940000101338313383133831338313383