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

CFINV

Test 1: uops

Code:

  cfinv

(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)031e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)6d6emap 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)ld unit uop (a6)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
100410358061917251000100010006225010351035805388210001000100010351041110011000007312711990100010361036103610361036
100410358061917251000100010006225010351035805388210001000100010351041110011000007312711990100010361036103610361036
100410358061917251000100010006225010351035805388210001000100010351041110011000007312711990100010361036103610361036
100410358061917251000100010006225010351035805388210001000100010351041110011000007313411990100010361036103610361036
100410718078917251000100010006225010351035805388210001000100010351041110011000007312711990100010361036103610361036
100410358061917251000100010006225010351035805388210001000100010351041110011000007312711990100010361036103610361036
100410357061917251000100010006225010351035805388210001000100010351041110011000007312711990100010361036103610361036
100410358061917251000100010006225010351035805388210001000100010351041110011000007312711990100010361036103610361036
100410358061917251000100010006225010351035805388210001000100010351041110011000007312711990100010361036103610361036
1004103570619172510001000100062250103510358053882100010001000103510411100110000127312711990100010361036103610361036

Test 2: Latency 1->1

Code:

  cfinv

(non-fused SUB/CBNZ loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03mmu table walk data (08)1e3a3f4d51schedule 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 tlb access (a0)ld unit uop (a6)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204100357502106199202510200102001020064765214969551003510035865638732102001020010200100351101110201100991010000007101271110059101001001003610036100361003610036
102041003575090619920251020010200102006476521496955100351003586563873210200102001020010035110111020110099101000000710127119990101001001003610036100361003610036
102041003575000849920251020010200102006476521496955100351003586563873210200102001020010035110111020110099101000000710127119990101001001003610036100361003610036
1020410035750180619920251020010200102006476521496955100351003586563873210200102001020010035110111020110099101000000710127119990101001001003610036100361003610036
102041003575000619920251020010200102006476521496955100351003586563873210200102001020010035110111020110099101000000710127119990101001001003610036100361003610036
10204100357503420619920251020010200102006476521496955100351003586563873210200102001020010035110111020110099101000000710127119990101001001003610036100361003610036
102041003575001619920251020010200102006476521496955100351003586563873210200102001020010035110111020110099101000000710127119990101001001003610036100361003610036
102041003575100829920251020010200102006476521496955100351003586563873210200102001020010035110111020110099101000000710127119990101001001003610036100361003610036
102041003575060619920251020010200102006476521496955100351003586563873210200102001020010035110111020110099101000020710127119990101001001003610036100361003610036
102041003575000619920251020010200102006476521496955100351003586563873210200102001020010035110111020110099101000000710127119990101001001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)031e3f4d51schedule 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 int alu (97)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024100357512619918251002010020100206472964969551003510035867838754100201002010020100351041110021109100100064032722999310010101003610036100361003610036
10024100357518619918251002010020100206472964969551003510035867838754100201002010020100351041110021109100100064032722999310010101003610036100361003610036
10024100357521619918251002010020100206472964969551003510035867838754100201002010020100351041110021109100100064032722999310010101003610036100361003610036
1002410035756619918251002010020100206472964969551003510035867838754100201002010020100351041110021109100100064032733999310010101003610036100361003610036
100241003575108619918251002010020100206472964969551003510035867838754100201002010020100351041110021109100100064022722999310010101003610036100361003610036
1002410035750619918251002010020100206472964969551003510035867838754100201002010020100351041110021109100101064032733999310010101003610036100361003610036
100241003575204619918251002010020100206472964969551003510035867838754100201002010020100351041110021109100100064022732999310010101003610036100361003610036
1002410035750849918251002010020100206472964969551003510035867838754100201002010020100351041110021109100100064032732999310010101003610036100361003610036
100241003575294619918251002010020100206472964969551003510035867838754100201002010020100351041110021109100100064032722999310010101003610036100361003610036
1002410035750619918251002010020100206472964969551003510035867838754100201002010020100351041110021109100100064032723999310010101003610036100361003610036

Test 3: throughput

Count: 8

Code:

  ands xzr, xzr, xzr
  cfinv
  ands xzr, xzr, xzr
  cfinv
  ands xzr, xzr, xzr
  cfinv
  ands xzr, xzr, xzr
  cfinv
  ands xzr, xzr, xzr
  cfinv
  ands xzr, xzr, xzr
  cfinv
  ands xzr, xzr, xzr
  cfinv
  ands xzr, xzr, xzr
  cfinv

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)1e1f3f51schedule 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)a9acc2branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
16020453444400000037251601001601001601001063588149503245340453404333393333591601001602008020053404661116020110099100160100100000001011021911534001600001005340553405534055340553405
16020453404400001388837251601001601001601001063588149503245340453404333393333591601001602008020053404661116020110099100160100100000001011011911534001600001005340553405534055340553405
160204534044000015037251601001601001601001063588149503245340453404333393333591601001602008020053404661116020110099100160100100000001011011911534001600001005340553405534055340553405
16020453404400000037251601001601001601001063588049503245340453404333393333591601001602008020053404661116020110099100160100100000001011011911534001600001005340553405534055340553405
16020453404400000037251601001601001601001063588149503245340453404333393333591601001602008020053404661116020110099100160100100120001011011911534001600001005340553405534055340553405
160204534044001100702251601001601001601001063588049503245340453404333393333591601001602008020053404661116020110099100160100100000001011011911534001600001005340553405534055340553405
16020453404400000037251601001601001601001063588149503245340453404333393333591601001602008020053404661116020110099100160100100000001011011911534001600001005340553405534055340553405
16020453404399000037251601001601001601001063588049503245340453404333393333591601001602008020053404661116020110099100160100100000001011011911534001600001005346053405534055340553405
16020453404400000037251601001601001601001063588149503245340453404333398333591601001602008020053404661116020110099100160100100000001011011911534001600001005340553405534055340553405
16020453404400000037251601001601001601001063588049503245340453404333393333591601001602008020053404661116020110099100160100100000001011011911534001600001005340553405534055340553405

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f3a3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)5f6061696a6d6emap 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 tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2cdcfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaeb? int retires (ef)f5f6f7f8fd
160024533904000000000003282516001016001016001010293881154950294533745337433331333351160010160020800205337466111600211091016001010000000010022133131192111411534091600002011105337553375533755337553375
160024533743990000000004325160010160010160010102938811104950294533745337433331333351160010160020800205337466111600211091016001010000000010022136113194111612533701600002011105337553375533755337553375
1600245337440000000000051825160010160010160010102938811104950294533745337433331333351160010160020800205337466111600211091016001010000030010022136115192111913533701600002011105337553375533755337553375
160024533744000000000009125160010160010160010102938811104950485533745337433331333351160010160020800205337466111600211091016001010000000010022136114192111411533701600002011105337553375533755337553375
160024533743990000000004325160010160010160010102938811104950294533745337433331333351160010160020800205337466111600211091016001010000030010022136112194111114533701600002011105337553375533755337553375
160024533744000000000004325160010160010160010102938811104950294533745337433331333351160010160020800205337466111600211091016001010000000010022167218192111713533701600004022105337553375533755337553375
160024533744000000000004325160010160010160010102938811104950294533745337433331333351160010160020800205337466111600211091016001010000000010024167113192111313533701600004022105337553375533755337553375
160024533744000000000008525160010160010160010102938811104950294533745337433331333351160010160020800205337466111600211091016001010000000010024136111192222111533701600002011105347153375533755337553375
1600245337440000000039004325160010160010160010102938811104950294533745337433331333351160010160020800205337466111600211091016001010000000010022136113194221319533701600002011105337553375533755337553375
1600245337439900000000070825160010160010160010102938811104950294533745337433331333351160010160020800205337466111600211091016001010000000010022136120192111120533701602742011105337553375533755337553375

Test 4: throughput

Count: 4

Code:

  fcmp s0, s0
  cfinv
  cfinv
  cfinv
  cfinv

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3f4d51schedule 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)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
5020413416100000000450255010040100100004010010000574757800000134321341413414613024673711950100402001000040200200001341413414115020110099100401001000010000000032103192213411400001001341513415134151341513415
5020413414100000000450255010040100100004010010000574757800001133851341413414612824563711950100402001000040200200001341413414115020110099100401001000010000000032102192213411400001001341513415134151341513415
5020413414100000000450255010040100100004010010000574757800000133851341413414612824673711950100402001000040200200001341413414115020110099100401001000010000000032102192213411400001001341513415134151341513415
5020413414101000000450255010040100100004010010000574757800001133851341413414613024673711950100402001000040200200001341413414115020110099100401001000010000000032102192213411400001001341513415134151341513415
5020413414100000000450255010040100100004010010000574757800001133851341413414613024673711950100402001000040200200001341413414115020110099100401001000010000000032102192213411400001001341513415134151341513415
50204134141000000150450255010040100100004010010000574757800000133851341413414612824563711950100402001000040200200001341413414115020110099100401001000010000000032102192313411400001001341513415134151341513415
5020413414101000000450255010040100100004010010000574757800001133851341413414612824673711950100402001000040200200001341413414115020110099100401001000010000000032102192213411400001001341513415134151341513415
502041341410000003990450255010040100100004010010000574757800001133851341413414613024563711950100402001000040200200001341413414115020110099100401001000010000000032102192213411400001001341513415134151341513415
5020413414101000000450255010040100100004010010000574757800001133851341413414613024673711950100402001000040200200001341413414115020110099100401001000010000000032102192213411400001001341513415134151341513415
5020413414100000000450255010040100100004010010000574757800000133851341413414613024673711950100402001000040200200001341413414115020110099100401001000010000000032102193213411400001001341513415134151341513415

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1i tlb fill (04)mmu table walk data (08)09l2 tlb miss data (0b)18191e1f3a3f4d51schedule 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 tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
5002413408101200000000450255001040010100004001010000573456800001133531338213382557737953710950010400201000040020200001338213382115002110910400101000010000000031417195171337940000101338313383133831338313383
5002413382100000030273004502550010400101000040010100005734568000001335313382133825577379537109500104002010000400202000013382133821150021109104001010000100000000314117197171337940000101338313383135561347713444
50024136141040000001500450255001040010100004011010000573456800000133531338213382557537843710950010400201000040020200001338213382115002110910400101000010000005100314161915181337940000101338313383133831338313383
50024133821000000009006602550010400101000040010100005734568000001335313382133825575379537109500104002010000400202000013382133821150021109104001010000100000000314117195171337940000101338313383133831338313383
5002413382100000000000450255001040010100004001010000573456800000133531338213382557737843710950010400201000040020200001338213382115002110910400101000010000000031415195171337940000101338313383133831338313383
50024133821000000000004502550102400101000040010100005734568000001335313382133825575323037109500104022110000400202000013382134411150021109104001010000100000000314117191751337940000101338313383133831338313383
5002413382100010000000450255001040010100004030010049573456800000134911338213382550437957720550010403121000040020200001355113439115002110910400101000010422001038031417425171337940214101344113383133831338313383
50024133821100000400006602550010400831000040010101175734568076001348813382136165575386237109501334002010000400202000013382133821150021109104001010000100020000314117191761337940000101338313383136161344113503
50024135581000000149016642550010400101000040010100005734568000001354013382135555575358937109501384030510023400202000013382133821150021109104001010000100000018300314114191771337940000101338313383133831338313383
50024133821000000000004502550010400101009840010100005829528000001335313382133825864378414710950010400201000040414200001338213382115002110910400101000010000000031417191751337940000101338313383133831338313383