Apple M1 Microarchitecture Research by Dougall Johnson

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

SMAXP (vector, 16B)

Test 1: uops

Code:

  smaxp 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 (01)cycle (02)030b191e3f4e51inst 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)a8a9cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10042037160006616872510001000100026468002018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
10042037150006116872510001000100026468002018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
10042037150006116872510001000100026468002018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
10042037150006116872510001000100026468002018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
10042037150036116872510001000100026468002018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
10042037150006116872510001000100026468002018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
10042037150006116872510001000100026468002018203720371572318951000100020002037203711100110001073216221787100020382038203820382038
10042037150006116872510001000100026468012018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
10042037150006116872510001000100026468002018203720371572318951000100020002037203711100110000073216221787100020382038203820382038
10042037150006116872510001000100026468002018203720371572318951000100020002037203711100110000073216221787100020382038203820382038

Test 2: Latency 1->2

Code:

  smaxp 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 (01)cycle (02)031e3f4e51inst 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)9fa8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102042003715006119687251010010010000100100005002847680020018200372003718429618741101002001000820020016200372003711102011009910010010000100001117181161119802100001002003820038200382003820038
1020420037150025119687251010010010000100100005002847680120018200372003718429618741101002001000820020016200372003711102011009910010010000100001117181161119801100001002003820038200382003820038
102042003715006119687251010010010000100100005002847680120018200372003718429618740101002001000820020016200372003711102011009910010010000100001117171161119802100001002003820038200382003820038
102042003715006119687251010010010000100100005002847680020018200372003718429718740101002001000820020016200372003711102011009910010010000100001117171161119802100001002003820038200382003820038
102042003715006119687251010010010000100100005002847680120018200372003718429718740101002001000820020016200372003711102011009910010010000100001117181161119801100001002003820038200382003820038
102042003715006119687251010010010000100100005002847680120018200372003718429718741101002001000820020016200372003711102011009910010010000100001117181161119802100001002003820038200382003820038
102042003715006119687251010010010000100100005002847680020018200372003718429618741101002001000820020016200372003711102011009910010010000100001117171161119801100001002003820038200382003820038
102042003715006119687251010010010000100100005002847680120018200372003718429618740101002001000820020016200372003711102011009910010010000100001118121161119801100001002003820038200382003820038
102042003715006119687251010010010000100100005002847680020018200372003718429618741101002001000820020016200372003711102011009910010010000100001117171161119802100001002003820038200382003820038
102042003715006119687251010010010000100100005002847680120018200372003718429718741101002001000820020016200372003711102011009910010010000100001117171161119801100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)0308090a0b18191e1f3f4e51inst 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)9fa0a1a8acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100242003715000000000611968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000006402162219785010000102003820038200382003820038
100242003715000000000611968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000006402162219785010000102003820038200382003820038
100242003715000000000611968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000006402162219785010000102003820038200382003820038
100242003715000000000611968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000006402162219785010000102003820038200382003820038
1002420037150000000002511968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000006402162219785010000102003820038200382003820038
100242003715000000000611968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000006402162219785010000102003820038200382003820038
100242003715000000000611968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037111002110910101000010000006402162219785010000102003820038200382003820038
100242003715000000000611968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000006632162219785010000102003820038200382003820038
1002420037150000000001031968725100101010000101000050284768002001820037200371844431876710010201016820200002003720037111002110910101000010001006402332219785010000102003820038200382003820038
100242003715700000000611968725100101010000101000050285024612001820085200371844431876710010201000020200002003720037111002110910101000010000006402162219785010000102003820038200382003820038

Test 3: Latency 1->3

Code:

  smaxp 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 (01)cycle (02)03090b191e3f4e51inst 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)9fa0a1a6a8a9accfd0d5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102042003715000069611968725101001001000010010000500284768020018200372003718422318745101002001000020020000200372003711102011009910010010000100000000710011611197910100001002003820038200382003820038
10204200371500000611968725101001001000010010000500284768020018200372003718422318745101002001000020020000200372003711102011009910010010000100000000710011611197910100001002003820038200382003820038
10204200371500000611968725101001001000010010000500284768020018200372003718422318745101002001000020020000200372003711102011009910010010000100000000710011611197912100001002003820038200382003820038
1020420037150000213611968725101001001000010010000500284768020018200372003718422318745104352001000020020000200372003711102011009910010010000100420022020758011611197910100001002003820038200382003820038
10204200371501000611968725101001001001210010000500284768020018200372003718422318745101002001000020020000200372003711102011009910010010000100000000710011611197910100001002003820038200382003820038
1020420037156000186241968725101001001000010010000500284768020018200372003718422318745101002001000020020000200372003711102011009910010010000100000000710011611197910100001002003820038200382003820038
102042003715000091031968725101001001000010010000500284768020018200372003718422318745101002001000020020000200372003711102011009910010010000100000206710011611197910100001002003820038200382003820038
10204200371500000611968725101001001000010010000500284768020018200372003718422318745102772001000020020000200372003711102011009910010010000100000000710011611197910100001002003820038200382003820038
10204200371500000611968725101001001000010010000500284768020018200372003718422318745101002001000020020000200372003711102011009910010010000100000000710011611197910100001002003820038200382003820038
102042003715000048611968725101001001000010010000500284768020018200372003718422318745101002001000020020000200372003711102011009910010010000100000000710011611197910100001002003820038200382003820038

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0037

retire (01)cycle (02)03191e3f4e51inst 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)9fa0a1a8a9acafcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100242003715000611968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000000640416221978510000102003820038200382003820038
1002420037150001241968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037111002110910101000010000000640216221978510000102003820038200382003820038
100242003715000611968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037111002110910101000010000000640216221978510000102003820038200382003820038
100242003715000611968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000000640216221978510000102003820038200382003820038
100242003715000611968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000000640216221978510000102003820038200382003820038
100242003715000611968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037111002110910101000010000000640216221978510000102003820038200382003820038
100242003715001054411968725100101010000101015250284768012001820037200371844431876710010201000020200002003720037111002110910101000010000000640216221978510000102003820038200382003820038
100242003715000611968725100101010000101000050284768012001820037200371844431876710010201000020200002003720037111002110910101000010000000640216221978510000102003820038200382003820038
1002420037155021611968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037111002110910101000010000000640216221978510000102003820038200382003820038
100242003715000611968725100101010000101000050284768002001820037200371844431876710010201000020200002003720037111002110910101000010001400640216221978510000102003820038200382003820038

Test 4: throughput

Count: 8

Code:

  smaxp v0.16b, v8.16b, v9.16b
  smaxp v1.16b, v8.16b, v9.16b
  smaxp v2.16b, v8.16b, v9.16b
  smaxp v3.16b, v8.16b, v9.16b
  smaxp v4.16b, v8.16b, v9.16b
  smaxp v5.16b, v8.16b, v9.16b
  smaxp v6.16b, v8.16b, v9.16b
  smaxp 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 (01)cycle (02)0309191e3f51inst 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)9facc2c5cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802042004715000124025801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000051103162220035800001002003920039200392003920039
80204200381500004025801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000051102162220035800001002003920039200392003920039
80204200381500004025801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000051102162220035800001002003920039200392003920039
80204200381500004025801001008000010080000625640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000051102162220035800001002003920039200392003920039
8020420038150006184025801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000051102162220035800001002003920039200392003920039
802042003815000244025801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000051102162220035800001002003920039200392003920039
8020420038150001842025801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000051102162220035800001002003920039200392003920039
80204200381500006125801001008000010080000500640000200192003820038997339996801002008000020016000020089200381180201100991001008000010000051102162220035800001002003920039200392003920039
80204200381500094025801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000051102162220035800001002003920039200392003920039
802042003815000184025801001008000010080000500640000200192003820038997339996801002008000020016000020038200381180201100991001008000010000051102163220035800001002003920039200392003920039

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0308090b18191e1f3f51inst 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)9fa0a1a6a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420047150000000039258001010800001080000506400001200192003820038999631001880010208000020160000200382003811800211091010800001000000305020916111120035080000102003920039200392003920039
800242003815000000003925800101080000108000050640000020019200382003899963100188001020800002016000020038200381180021109101080000100200000502011169720035080000102003920039200392003920039
8002420038150000000039258001010800001080000506400000200192003820038999631001880010208000020160000200382003811800211091010800001000000005020916101020035080000102003920039200392003920039
800242003815000000003925800101080000108000050640772120019200382003899963100188001020800002016000020038200881180021109101080000100000000502091611920035080000102003920039200392003920039
8002420038150000001503925800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100000000502091691120035080000102003920039200882003920039
800242003815000000003925800101080000108000050640000020019200382003899963100188001020800002016000020038200381180021109101080000100000000502091610920035080000102003920039200392003920039
80024200381500000000356258001010800001080000506400001200192003820038999631001880010208000020160000200382003811800211091010800001000000005020101610720035080000102003920039200392003920039
800242003815000000003925800101080000108000050640000020019200382003899963100188001020800002016000020038200381180021109101080000100000000502091671120035080000102003920039200392003920039
800242003815000000003925800101080000108000050640000120019200382003899963100188001020800002016000020038200381180021109101080000100000000502010169720035080000102003920039200392003920039
8002420038150000000039258001010800001080000506400000200192003820038999631001880010208000020160000200382003811800211091010800001000000005020101610820035080000102003920039200392003920039