Apple M1 Microarchitecture Research by Dougall Johnson

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

FRECPS (scalar, S)

Test 1: uops

Code:

  frecps s0, s0, s1
  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)031e3f4e51inst issue (52)~issue fp/simd (54)~dispatch fp/simd (57)huge thing fp/simd (5b)696d6edispatch 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)accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004403730061340725100010001000531908401840374037325833895100010002000403740371110011000073216113473100040384038403840384038
100440373001563407251000100010005319084018403740373258338951000100020004037403711100110003973116113473100040384038403840384038
100440373110861340725100010001000531908401840374037325833895100010002000403740371110011000073116113473100040384038403840384038
1004403730061340725100010001000531908401840374037325833895100010002000403740371110011000073116113473100040384038403840384038
10044037302761340725100010001000531908401840374037325833895100010002000403740371110011000073116113473100040384038403840384038
100440373019561340725100010001000531908401840374037325833895100010002000403740371110011000073116113473100040384038403840384038
10044037302161340725100010001000531908401840374037325833895100010002000403740371110011000973116113473100040384038403840384038
1004403730382340725100010001000531908401840374037325833895100010002000403740371110011000073116113473100040384038403840384038
10044037300240340725100010001000531908401840374037325833895100010002000403740371110011000073116113473100040384038403840384038
1004403730061340725100010001000531908401840374037325833895100010002000403740371110011000073116113473100040384038403840384038

Test 2: Latency 1->2

Code:

  frecps s0, s0, s1
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 4.0037

retire (01)cycle (02)0307080a0b18191e1f3a3f4e51inst 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)9fa0a6a8a9acc2cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204400373000000000006139407251010010010000100100005005706908140018400374003738108338745101002001000020020000400374003711102011009910010010000100000000071011611395490100001004003840038400384003840038
10204400373000000000006139407251010010010000100100005005706908040018400374003738108338745101002001000020020000400374003711102011009910010010000100000000071011611394790100001004003840038400384003840038
10204400372990000000006139407251010010010000100100006265706908140018400374003738108338745101002001000020020000400374003711102011009910010010000100000000071011611394790100001004003840229400384003840038
10204400373001000000006139407251010010010000127100006265706908040018400374003738108338745101002001000020020348400374003711102011009910010010000100000000071011611394790100001004003840038400384003840038
10204400372990000000006139407251010010010000100100005005706908040018400374003738108338745101002001000020020000400374003711102011009910010010000100000000071011611394790100001004003840038400384003840038
10204400372990000000006139407251010010010000100100005005706908040018400374003738108338745101002001000020020000400374003711102011009910010010000100000000071021755394790100001004013440038400384003840038
102044003729901010029400114739335141101941441005414711332785571807604033340425403213813944388891148423211490225216624045440422101102011009910010010000100031232348208903102663980237100001004046540421404664041740416
102044047130301119101200792072993937120410204154100541521044474657194720401584050440467381424138911114852301149023022908404684046751102011009910010010000100231232388009323112243969430100001004046540658405094051840515
102044046830300000000010339407251010010010000100100005005706908140018400374003738108338745101002001000020020000400374003711102011009910010010000100000000071011611394790100001004003840038400384003840038
10204400373000000000006139407251012510010000100100005005706908140018400374003738108338745101002001000020020000400374003711102011009910010010000100000000071011611394790100001004003840038400384003840038

1000 unrolls and 10 iterations

Result (median cycles for code): 4.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)9facc5branch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024400373000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
10024400373000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
10024400373000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
10024400373000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
10024400372990613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
10024400373000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
10024400372990613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
100244003730006139407251001010100001010000505706908040018400374003738130338767100102010000202000040037400841110021109101010000101500640216223947310000104003840038400384003840038
10024400373000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038
10024400373000613940725100101010000101000050570690814001840037400373813033876710010201000020200004003740037111002110910101000010000640216223947310000104003840038400384003840038

Test 3: Latency 1->3

Code:

  frecps s0, s1, s0
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 4.0037

retire (01)cycle (02)031e3a3f4e51inst 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)9fa8a9acc2c5cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020440037300240159339407251010010010000100100005005707439040018400374003738108338745101002001000020020000400374003711102011009910010010000100000007102162239479100001004003840038400384003840038
102044003729900132339407251010010010000100100005005706908040018400374003738108338745101002001000020020000400374003711102011009910010010000100000007102162239479100001004003840038400384003840038
1020440037300006139407251010010010000100100005005706908140018400374003738108338745101002001000020020000400374003711102011009910010010000100000007102162239479100001004003840038400384003840038
1020440037300006139407251010010010000100100005005706908140018400374003738108338745101002001000020020000400374003711102011009910010010000100000017102162239479100001004003840038400384003840038
1020440037300006139407251010010010000100100005005706908140018400374003738108338745101002001000020020000400374003711102011009910010010000100000007102162239479100001004003840038400384003840038
1020440037300006139407251010010010000100100005005706908140018400374003738108338745101002001000020020000400374003711102011009910010010000100000007102162239479100001004003840038400384003840038
102044003730000128539407251010010010000100100005005706908140018400374003738108338745101002001000020020000400374003711102011009910010010000100000007102162239479100001004003840038400384003840038
1020440037300006139407251010010010000100100005005706908140018400374003738108338745101002001000020020000400374003711102011009910010010000100000007102162239479100001004003840038400384003840038
10204400373000064239407251010010010000100100005005706908140018400374003738108338745101002001000020020000400374003711102011009910010010000100000007102162239479100001004003840038400384003840038
1020440037300006139407251010010010000100100005005706908140018400374003738108338745101002001000020020000400374003711102011009910010010000100000007102162239479100001004003840038400384003840038

1000 unrolls and 10 iterations

Result (median cycles for code): 4.0037

retire (01)cycle (02)03081e3f4e51inst 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)60696b6d6edispatch 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)9fa0a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024400372990061394072510010101000010100005057069080400180400374003738130338767100102010000202000040037400371110021109101010000100000640216223947310000104003840038400384003840038
100244003729900613940725100101010000101000050570690804001804003740037381302438767100102010000202000040037400371110021109101010000100000669216223947310000104003840038400384003840038
1002440037300001127394072510010101000010100005057069080400180400374003738130338767100102010000202000040037400371110021109101010000100100640216223947310000104003840038400384003840038
10024400373000061394072510010101000010100005057069080400180400374003738130338767100102010000202000040037400371110021109101010000100000640216223947310000104003840038400384003840038
100244003730000536394072510010101000010100005057069080400180400374003738130338767100102010000202000040037400371110021109101010000100000640216223947310000104003840038400384003840038
10024400372990061394072510010101000010100005057069080400180400374003738130338767100102010000202000040037400371110021109101010000100000640216223947310000104003840038400384003840038
1002440037300001839394072510010101000010100005057069080400180400374003738130338767100102010000202000040037400371110021109101010000100000640216223947310000104003840038400384003840038
1002440037299001279394072510010101000010100005057069080400180400374003738130338767100102010000202000040037400371110021109101010000100000640216223947310000104003840038400384003840038
10024400373000061394072510010101000010100005057069080400180400374003738130338767100102010000202000040037400371110021109101010000100000640216223947310000104003840038400384003840038
10024400373000061394072510010101000010100005057069080400180400374003738130338767100102010000202000040037400371110021109101010000100000640216223947310000104003840038400384003840086

Test 4: throughput

Count: 8

Code:

  frecps s0, s8, s9
  frecps s1, s8, s9
  frecps s2, s8, s9
  frecps s3, s8, s9
  frecps s4, s8, s9
  frecps s5, s8, s9
  frecps s6, s8, s9
  frecps s7, s8, s9
  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)0307080a0b18191e1f3a3f51inst 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)9fa8acc5cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8020420058150000000000422580100100800001008000050064000002002120040200409973399988010020080000200160000200402004011802011009910010080000100000511021611200370800001002004120041200412004120041
80204200401500000000006562580100100800001008000050064000002002120040200409973399988010020080000200160000200402004011802011009910010080000100000511011611200370800001002004120041200412004120041
8020420040150100000000422580100100800001008000050064000002002120040200409973399978012520080000200160000200402004011802011009910010080000100000511011611200370800001002004120041200412004120041
8020420040150000000300422580125125800001008000050064000002002120040200409973399978012520080000200160000200402004011802011009910010080000100000511011611200370800001002004120041200412004120041
80204200401500000000001072580100100800001008000050064000002002120040200409973399988010020080000200160000200402004011802011009910010080000100000511011611200370800001002004120041200412004120041
8020420040150000000000642580100100800001008000050064000002002120040200409973399988010020080000200160000200402004011802011009910010080000100000511011611200370800001002004120041200412004120041
8020420040150000000000422580100100800001008000050064000002002120040200409973399988012520080000200160000200402004011802011009910010080000100000511011611200370800001002004120041200412004120041
8020420040150000000000422580100100800001008000050064000002002120040200409973399988010020080000200160000200402004011802011009910010080000100001511011611200370800001002004120041200412004120041
8020420040150000000000422580100100800001008000050064000002002120040200409973399988010020080000200160000200402004011802011009910010080000100000511011611200370800001002004120041200412004120041
8020420040150000000000422580100100800001008000050064000002002120040200409973399988010020080000200160000200402004011802011009910010080000100000511011611200370800001002004120041200412004120041

1000 unrolls and 10 iterations

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

retire (01)cycle (02)031e3f51inst 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)9fa8accficache miss (d3)d5d6daddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420049150041258001010800001080000506400000200212004020040999631002080010208000020160000200402004011800211091010800001000502001716016152003780000102004120041200412004120041
8002420040150041258001010800001080000506400001200212009120040999631002080010208000020160000200402004011800211091010800001000502001616011182003780000102004120041200412004120041
8002420040150041258001010800001080000506400000200212004020040999631002080010208000020160000200402004011800211091010800001000502001616016162003780000102004120041200412004120041
8002420040150041258001010800001080000506400000200212004020040999631002080010208000020160000200402004011800211091010800001000502001816016172003780000102004120041200412004120041
8002420040150041258001010800001080000506400000200212004020040999631002080010208000020160000200402004011800211091010800001000502001716017172003780000102004120041200412004120041
8002420040150083258001010800001080000506400000200212004020040999631002080010208000020160000200402004011800211091010800001000502001616016162003780000102004120041200412004120041
80024200401500508258001010800001080000506400001200212004020040999631002080010208000020160000200402004011800211091010800001000502001816017162003780000102004120041200412004120041
80024200401500150258001010800001080000506400000200212004020040999631002080010208000020160000200402004011800211091010800001003502001716017172003780000102004120041200412004120041
8002420040150041258001010800001080000506400001200212004020040999631002080010208000020160000200402004011800211091010800001000502001616017162003780000102004120041200412004120041
80024200401500412580010108000010800005064000002002120040200409996310047800102080000201600002004020040118002110910108000010363502001616016162003780000102004120041200412004120041