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

TRN2 (vector, 16B)

Test 1: uops

Code:

  trn2 v0.16b, v0.16b, v1.16b
  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 uop (01)cycle (02)031e3f4e51schedule uop (52)schedule simd uop (54)dispatch simd uop (57)ldst uops in schedulers (5b)696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map simd uop (7e)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst simd alu (9a)l1d tlb miss (a1)l1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
10042037150120168725100010001000264680201820372037157231895100010002000203720371110011000000073216111787100020382038203820382038
1004203716061168725100010001000264680201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
1004203716061168725100010001000264680201820372037157231895100010002000203720371110011000010073116111787100020382038203820382038
10042037160166168725100010001000264680201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
1004203715061168725100010001000264680201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
1004203715061168725100010001000264680201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
1004203715099168725100010001000264680201820372037157231895100010002000203720371110011000003073116111787100020382038203820382038
1004203716061168725100010001000264680201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
1004203715082168725100010001000264680201820372037157231895100010002000203720371110011000000073116111787100020382038203820382038
1004203715061168725100010001000264680201820372037157231895100010002000203720371110011000020073116111787100020382038203820382038

Test 2: Latency 1->2

Code:

  trn2 v0.16b, v0.16b, v1.16b
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)03l2 tlb miss data (0b)1e3f4e51schedule 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)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 cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
102042003715000166196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000007102162219791100001002003820038200382003820038
102042003715000168196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000647103164219791100001002003820038200382008720038
102042003715000646196762510100100100001001000050028489631200182003720037184223187451010020010000200200002003720037211020110099100100100001000007102162219791100001002003820038200382003820038
1020420037150101024196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001001007102162219791100001002003820038200382003820038
102042003715000103196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000007102162219791100001002003820038200382003820038
102042003715000191196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000007102162219791100001002003820038200382003820038
10204200371500061196872510100100100001001000050028476801200182003720037184243187451010020010000200200002003720037111020110099100100100001000007102492219791100001002003820038200382003820038
10204200371500061196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000007102162219791100001002003820038200382003820038
102042003715000168196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000007102162219791100001002003820038200382003820038
102042003715000189196872510100100100001001000050028476800200182003720037184223187451010020010000200200002003720037111020110099100100100001000007102162219791100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)031e3f4e51schedule 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)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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002420037150081196872510010101000010100005028476800200182003720084184443187671001020100002020000200372003711100211091010100001000640416431978510000102003820038200382003820038
1002420037150061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000640416431978510000102003820038200382003820038
10024200371509196196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000640416431978510000102003820038200382003820038
1002420037150061196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640416341978510000102003820038200382003820038
1002420037150061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000640416441978510000102003820038200382003820038
1002420037150061196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640416441978510000102003820038200382003820038
1002420037150061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000640316441978510000102003820038200382003820038
1002420037150744145196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000640416431978510000102003820038200382003820038
1002420084150061196872510010101000010100005028476801200182003720037184443187671001020100002020000200372003711100211091010100001000640416441978510000102003820038200852003820038
1002420037150061196872510010101000010100005028476800200182003720037184443187671001020100002020000200372003711100211091010100001000640416441978510000102003820038200382003820038

Test 3: Latency 1->3

Code:

  trn2 v0.16b, v1.16b, v0.16b
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)03mmu table walk data (08)181e1f3f4e51schedule 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)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)9fld unit uop (a6)l1d cache writeback (a8)a9accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
102042003715000357061196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000003071011611197910100001002003820038200382003820038
102042003715000369061196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000071011611197910100001002003820038200382003820038
102042003715000321061196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000071011611197910100001002003820038200382003820038
102042003715000345061196872510100100100001241000050028476801200182003720037184223187451058520010000200200002003720037111020110099100100100001000000071011611198610100001002003820038200382003820038
102042003715000348061196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000006071011611197910100001002003820038200382003820038
102042003715000375061196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000071011611197910100001002003820038200382003820038
102042003715000294061196762510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000078211611197910100001002003820038200382003820038
102042003715000288061196872510100100100001051030450028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000071011611197910100001002003820038200382003820038
102042003715001267061196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000071011611197910100001002003820038200382003820038
102042003715000546061196872510100100100001001000050028476801200182003720037184223187451010020010000200200002003720037111020110099100100100001000000071011611197910100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire uop (01)cycle (02)03181e3f4e51schedule 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)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 cache writeback (a8)acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
10024200371500061196872510010101000010100005028476802001820037200371844431876710010201000020200002003720037111002110910101000010000640316331978510000102003820038200382003820038
10024200371500061196872510010101000010100005028476802001820037200371844431876710010201000020200002003720037111002110910101000010000640316331978510000102003820038200382003820038
100242003715000124196872510010101000010100005028476802001820037200371844431876710010201000020200002003720037111002110910101000010000640316331978510000102003820038200382003820132
10024200371500061196872510010101000010100005028476802001820037200371844431876710010201000020200002003720037111002110910101000010000640316331978510000102003820038200382003820038
100242003715000187196872510010101000010100005028476802001820037200371844431876710010201000020200002003720037111002110910101000010000640316431978510000102003820038200382003820038
10024200371500061196872510010101000010100005028476802001820037200371844431876710010201000020200002003720037111002110910101000010000640316331978510000102003820038200382003820038
10024200371500061196872510010101000010100005028476802001820037200371844431876710010201000020200002003720037111002110910101000010000640316331978510000102003820038200382003820038
100242003715000229196872510010101000010100005028476802001820037200371844431876710010201000020200002003720037111002110910101000010100640316331978510000102003820038200382003820038
10024200371500061196872510010101000010100005028476802001820037200371844431876710010201000020200002003720037111002110910101000010000640316331978510000102003820038200382003820038
10024200371500361196872510010101000010100005028476802001820037200371844431876710010201000020200002003720037111002110910101000010000640316431978510000102003820038200382003820038

Test 4: throughput

Count: 8

Code:

  trn2 v0.16b, v8.16b, v9.16b
  trn2 v1.16b, v8.16b, v9.16b
  trn2 v2.16b, v8.16b, v9.16b
  trn2 v3.16b, v8.16b, v9.16b
  trn2 v4.16b, v8.16b, v9.16b
  trn2 v5.16b, v8.16b, v9.16b
  trn2 v6.16b, v8.16b, v9.16b
  trn2 v7.16b, v8.16b, v9.16b
  movi v8.16b, 9
  movi v9.16b, 10

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3f51schedule 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)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)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
802042005915000000040258010010080000100800006046400001200192003820038997339996801002008000020016000020038200381180201100991001008000010000000000511021611200350800001002003920039200392003920039
802042003815000000040258010010080000100800005006400001200192003820038997339996801002008000020016000020038200381180201100991001008000010000001000511011611200350800001002003920039200392003920039
802042003815000000040258010010080000100800005006400001200192003820038997339996801002008000020016000020038200381180201100991001008000010000000000511011611200350800001002003920039200392003920039
802042003815000000040258010010080000100800005006400001200192003820038997339996801002008000020016000020038200381180201100991001008000010000000000511011611200350800001002003920039200392003920039
8020420038150000000402580100100800001008000050064000012001920038200389973399968010020080000200160000200382003811802011009910010080000100000030120511011611200350800001002003920039200392003920039
802042003815000000040258010010080000113800005006400001200192003820038997339996801002008000020016000020038200381180201100991001008000010000000000511011611200350800001002003920039200392003920039
80204200381500000004025801001008000010080000500640000120019200382003899733999680100200800002001600002003820038118020110099100100800001000000001230511011611200350800001002003920039200392003920039
80204200381500000004025801001008000010080000500640000120019200382003899733999680100200800002001600002003820038118020110099100100800001000000001410511011611200350800001002003920039200392003920039
802042003815000000040258010010080000100800005006400001200192003820038997339996801002008000020016000020038200381180201100991001008000010000000030511011611200350800001002003920039200392003920039
802042003815000000040258010010080000100800005006400001200192003820038997339996801002008000020016000020038200381180201100991001008000010000000000511011611200350800001002003920039200392003920039

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f3f51schedule 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)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 miss (a1)ld unit uop (a6)l1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ea? simd retires (ee)? int retires (ef)f5f6f7f8fd
800242004815000000312039258001010800001080000506400001200192003820038999631001880010208000020160000200382003811800211091010800001000000502023161526200350080000102003920039200392003920039
800242003815000000237039258001010800001080000506400000200192003820038999631001880010208000020160000200382003811800211091010800001000032505414162327200350080000102003920039200392003920039
800242003815000000300039258001010800001080000506400000200192003820038999631001880010208000020160000200382003811800211091010800001000000502027162727200350080000102003920039200392003920039
80024200381500000030039258001010800001080099506400000200192009420038999671001880010208009720160000200972009111800211091010800001000000502025162626200350080000102003920039200392003920039
80024200381500010190817258001010800001080000506400001200192003820038999631001880010208000020160000200382003811800211091010800001000000502020492716200350080000102003920039200392003920039
80024200381500000027081258001010800001080000506400000200192003820241999631001880010208000020160000200382003811800211091010800001000000502027162828200350080000102003920039200392003920039
800242003815000000378081258001010800001080000506400000200192003820038999631001880010208000020160000200382003811800211091010800001000000502028162827200350080000102003920039200392003920039
800242003815000000438081258001010800001080000506400001200192003820038999631001880010208000020160000200382003811800211091010800001000000502016162726200350080000102008820039200392003920088
80024200381500001030363258001010800931080000506400001200192003820038999631001880109208009820160196200382003811800211091010800001040000502014162714200350080000102003920039200392003920039
800242003815000000237039258001010800001080000506400001200192003820038999631001880401208000020160000200382003811800211091010800001000000502028162819200350080000102003920039200392003920039