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

TST (register, lsl, 32-bit)

Test 1: uops

Code:

  tst w0, w1, lsl #17
  mov x0, 1
  mov x1, 2

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 2.000

Integer unit issues: 2.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)031e3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)606d6emap 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 int alu (97)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982135611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982135611000100020007097811100110000073122116842000710710710710710
100470960611000304252000200010004087717097094982135611000100020007097811100110000673122116842000710710710710710
100470950611000304252000200010004087717097094982135611000100020007097811100110001073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710

Test 2: Latency 3->1

Chain cycles: 1

Code:

  tst w0, w1, lsl #17
  cset x0, cc
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03l2 tlb miss data (0b)191e3f4c4d51schedule 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 tlb miss (a1)st unit uop (a7)l1d cache writeback (a8)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20204300352240006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100001013101231222995430000101003003630036300363003630036
20204300352250006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
20204300352250006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
20204300352250006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
20204300352250006110000298932530100301002010019561984926955300353003527369327478201002020030368300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522500072610000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
20204300352250006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
20204300352250006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522500034610000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522500015610000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)0918191e3f4c4d51schedule 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 tlb access (a0)ld unit uop (a6)a9accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200243003522500001176110000298912530010300102001019562894926955300353003527391327498200102002030020300351451120021109102001010010000001270233122995830000100103003630036300363003630036
2002430035224000066110000298912530010300102001019562894926955300353003527391327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
2002430035225000066110000298912530010300102001019562894926955300353003527391327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
200243003522500002721010000298912530025300102001019562894926955300353003527391327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
2002430035225000006110000298912530010300102001019562894926955300353003527391327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
2002430035225000006110000298912530010300102001019562894926955300353003527391327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
2002430035225000006110000298912530010300102001019562894926955300353003527391327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
2002430035225000006110000298912530010300102001019562894926955300353003527391327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
2002430035224000006110000298912530010300102001019562894926955300353003527391327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
20024300352250000019410000298912530010300102001019562894926955300353003527391327498200102002030020300351451120021109102001010010000001270133212995830000100103003630036300363003630036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  tst w0, w1, lsl #17
  cset x1, cc
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)0309181e1f3f4c4d51schedule 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)a9accdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522500006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522400006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522400006110000298932530100301002010019561984926955300353003527369327478201002031230200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100100013101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002018319569134926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430015101003003630036300363003630036
202043003522400006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3f4c4d51schedule 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)9faccfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2002430035225336110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001001270133112995830000100103003630036300363003630036
2002430035225010510000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001001270233132995830000100103003630036300363003630036
200243003522506110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001001270133112995830000100103003630036300363003630036
200243003522506110000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001001270133112995830000100103003630036300363003630036
200243003522506110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001001270133112995830000100103003630036300363003630036
200243003522506110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001001270133122995830000100103003630036300363003630036
200243003522506110000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001001270133212995830000100103003630036300363003630036
200243003522566110000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001001270133112995830000100103003630036300363003630036
200243003522506110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001001270133212995830000100103003630036300363003630036
2002430035225216110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001001270133112995830000100103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  tst w0, w1, lsl #17
  tst w0, w1, lsl #17
  tst w0, w1, lsl #17
  tst w0, w1, lsl #17
  tst w0, w1, lsl #17
  tst w0, w1, lsl #17
  tst w0, w1, lsl #17
  tst w0, w1, lsl #17
  mov x0, 1
  mov x1, 2

(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)181e3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6b6d6emap 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)9fld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020453457400000105800004874125160100160100801003440005149503300534105341043298205034336080100802001602005341078118020110099100801001000000511052433533921600001005341153411534115341153411
8020453410400000304800004874125160100160100801003440005149503300534105341043298206034336080100802001602005341078118020110099100801001000000511022423533921603701005341153411534115341153411
8020453410400000580800004874125160100160100801003440005149503300534105341043298206034336080100802001602005341078118020110099100801001000000511032423533921600001005341153411534115341153411
8020453410399000587800004874125160100160100801003440005149503300534105341043298206334336080100802001602005341078118020110099100801001000000511032432533921600001005341153411534115341153411
8020453410400000462800004874125160100160100801003440005149503300534105341043298206334336080100802001602005341078118020110099100801001000000511032433533921600001005341153411534115341153411
8020453410400000539800004874125160100160100801003440005149503300534105341043298206334336080100802001602005341078118020110099100801001000000511032423533921600001005341153411534115341153411
8020453410400000403800004874125160100160100801003440005149503300534105341043298206334336080100802001602005341078118020110099100801001000000511032433533921600911005341153411534115341153411
8020453410400000442800004874125160100160100801003440005149503300534105341043298206334336080100802001602005341078118020110099100801001000000511032433533921600001005341153411534115341153411
8020453410400000477800004874125160100160100801003440005149503300534105341043298206034336080100802001602005341078118020110099100801001000000511022423533921600001005341153411534115341153411
8020453410400000418800004874125160100160100801003440005149503300534105341043298206334336080100802001602005341078118020110099100801001000010511022432533921600001005341153411534115341153411

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1i tlb fill (04)183f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)5f60696a6d6emap 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 cache writeback (a8)acc2branch mispred nonspec (cb)cfd5map dispatch bubble (d6)daddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8002453401399106180000479462516001016001080010343813000495030053380533804329027073433528001080020160020533807811800211091080010100000502072404553359160000105338153381533815338153381
8002453380400006180000479462516001016001080010344070801495030053380533804329027073433528001080020160020533807811800211091080010100000502052405553359160000105338153381533815338153381
80024533804000019380000479462516001016001080010343813000495030053380533804329027073433528001080020160020533807811800211091080010100000502042406553363160000105338153381533815338153381
8002453380400006180000479462516001016001080010343813001495030053380533804329025623433528001080020160020533807811800211091080010100000502052407553359160000105338153381533815338153381
8002453380400006180000479462516001016001080010343813000495030053380533804329025623433528001080020160020533807811800211091080010100000502062404553359160000105338153381533815338153435
8002453380400006180000479462516001016001080010343813001495030053380533804329025623433618001080020160020533807811800211091080010100000502062405753359160000105338153381533815338153381
8002453380400006180000479462516001016001080010343813001495030053380533804329027073433528001080020160020533807811800211091080010100000502042405653359160000105338153381533815338153381
80024533804000082800004794625160010160010800103438130014950300533805338043290270734335280010800201600205338015711800211091080010100000502052404553359160000105338153381533815338153381
8002453380400006180000479462516001016001080010343813001495030053380533804329027073433528001080020160020533807811800211091080010100000502052405653359160000105338153381533815338153381
8002453380400006180000479462516001016001080010343813001495030053380533804329027073433528001080020160020533807811800211091080010100000502042407653359160000105338153381533815343553381