Apple M1 Microarchitecture Research by Dougall Johnson

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

FDIV (scalar, S)

Test 1: uops

Code:

  fdiv 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)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)a0a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10048037600616721251000100010002813000801880378037749437895100010002000803780371110011000005473216117677100080388038803880388038
100480376020161672125100010001000281300080188037803774943789510001000200080378037111001100000373116117677100080388038803880388038
1004803760061672125100010001000281300080188037803774943789510001000200080378037111001100000073116117677100080388038803880388038
1004803760061672125100010001000281300080188037803774943789510001000200080378037111001100000073116117677100080388038803880388038
10048037600616721251000100010002813000801880378037749437895100010002000803780371110011000032073116117677100080388038803880388038
1004803760061672125100010001000281300180188037803774943789510001000200080378037111001100000073116117677100080388038803880388038
10048037600616721251000100010002813000801880378037749437895100010002000803780371110011000002173116117677100080388038803880388038
1004803761061672125100010001000281300080188037803774943789510001000200080378037111001100000073116117677100080388038803880388038
1004803760061672125100010001000281300080188037803774943789510001000200080378037111001100000073116117677100080388038803880388038
1004803760061672125100010001000281300080188037803774943789510001000200080378037111001100010073116117677100080388038803880388038

Test 2: Latency 1->2

Code:

  fdiv 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): 8.0037

retire (01)cycle (02)03080b1e3f4e51inst 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)72scheduler 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)9fa0a1a6a8acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020480037599000616972145510203141100061001015250028643001800188003780037783440378772101482001000020020000800378003711102011009910010010000100000021307101161179677100001008003880038800388003880038
102048003760000061697212510100100100001001000050028643001800188003780037783440378745101002001000020020000800378003711102011009910010010000100000023107101161179677100001008003880038800388003880038
1020480037600000726697212510100100100001001000050028643000800188003780037783440378745101002001000020020000800378003711102011009910010010000100000012307101161179677100001008003880038800388003880038
102048003759900061697212510100100100001001000050028643000800188003780037783440378745101002001000020020000800378003711102011009910010010000100000010807101161179677100001008003880038800388003880038
102048003759900061697212510100100100001001000050028643000800188003780037783440378745101002001000020020000800378003711102011009910010010000100000010207101161179677100001008003880038800388003880038
102048003759900061697212510100100100001001015250028643000800188003780037783440378745101002001000020020000800378003711102011009910010010000100000010807101161179677100001008003880038800388003880038
1020480037599000616972125101001001000010010000500286430008001880037800377834403787451010020010000200200008003780037111020110099100100100001000000007101161179677100001008003880038800388003880038
102048003759900061697212510100100100001001000051128643000800658003780037783440378745101002001000020020000800378003711102011009910010010000100000018007101161179677100001008003880038800388003880038
10204800375990006169721251010010010000100100005002864300080018800378003778344037874510100200100002002000080037800371110201100991001001000010000009907101161179677100001008003880038800388003880038
102048003759900061697032510100100100001001000050028643000800188003780037783440378745101002001000020020140800378003711102011009910010010000100000010507101161179677100001008003880038800388003880038

1000 unrolls and 10 iterations

Result (median cycles for code): 8.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)91inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa8acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100248003759906169721251001010100001010000502864300080018800378003778366378767100102010000202000080037800371110021109010101000010000640316337967710000108003880038800388003880038
1002480037600072669721251001010100001110000502864300180018800378003778366378767100102010000202000080037800371110021109010101000010000640316337967710000108003880038800388003880038
100248003759906169721251001010100001010038502864300180018800378003778366378767100102010000202000080037800371110021109010101000010000640316337967710000108003880038800388003880038
1002480037600072669721251001010100001010000502864300080018800378003778366378767100102010000202000080037800371110021109010101000010000640316337967710000108003880038800388003880038
1002480037599069069721251001010100001010000502864300180018800378003778366378767100102010000202000080037800371110021109010101000010000640316337967710000108003880038800388003880070
1002480037600072669721251001010100001010000502864300080018800378003778366378767100102010000202000080037800371110021109010101000010000640316337967710000108003880038800388003880038
100248003760006169721251001010100001010000502864300080018800708003778366378767100102010000202000080037800371110022109010101000010000640316337967710000108003880038800388003880038
100248003759966169721251001010100001110000502864300080018800378003778366378767100102010000202000080037800371110021109010101000010000640316337967710000108003880038800388003880038
100248003759906169721251001010100001010000502864300080018800378003778366378767100102010000202000080037800371110021109010101000010000640316337967710000108003880038800388003880038
100248003759906169721251001010100001010000502864300080018800378003778366378767100102010000202000080037800371110021109010101000010000640316337967710000108003880038800388003880038

Test 3: Latency 1->3

Code:

  fdiv 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): 8.0037

retire (01)cycle (02)030b1e3a3f4e51inst 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)9fa6a8accdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204800375990006169721251010010010000100100005002864300180018800378003778344378745101602001000020020000800378003711102011009910010010000100000071011611796770100001008003880038800388003880083
10204800376000006169721251010010010000100100005002864300180018800378003778344378745101002001000020020000800378003711102011009910010010000100000171011611796770100001008003880038800388003880038
10204800375990006169721251010010010000100100005002864300180018800378003778344378745101002001000020020000800378003711102011009910010010000100000071011611796770100001008003880038800388003880038
10204800376000006169721251010010410015100100005002864300080018800378003778344378745101002001000020020000800378003711102011009910010010000100000071011611796770100001008003880038800388003880038
10204800376000006169721251010010010000100100005002864300080018800378003778344378745101002001000020020000800378003711102011009910010010000100000071011611796770100001008003880038800388003880038
10204800375990006169721251010010010000100100005002864300080018800378003778344378745101002001000020020000800378003711102011009910010010000100000071011611796770100001008003880038800388003880038
10204800375990006169721251010010010000100100005002864300180018800378003778344378745101002001000020020000800378003711102011009910010010000100000071011611796770100001008003880038800388003880038
10204800375990006169721251010010010000100100005002864300180018800378003778344378745101002001000020020000800378003711102011009910010010000100000071011611796770100001008003880038800388003880038
10204800375990006169721251010010010000100100005622864300080018800378003778344378745101002001000020020000800378003711102011009910010010000100000071011611796770100001008003880072800388003880038
10204800376000006169721251010010010000100100005002864300080018800378003778344378745101002001000020020000800378003711102011009910010010000100000071011611796770100001008003880038800388003880038

1000 unrolls and 10 iterations

Result (median cycles for code): 8.0037

retire (01)cycle (02)030b1e1f3f4e51inst 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)9fa8acc2c5cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002480037599070507686972125100101010000101000050286430008001808003780037783668787671001020100002020000800378003711100211091010100001000000640316337967710000108003880038800388003880038
100248003759903210616972125100101010000101000050286430018001808003780037783663787671001020100002020000800378003711100211091010100001000200640316337967710000108003880038800388003880038
100248003759904680616972125100101010000101000050286430008001808003780037783663787671001020100002020000800378003711100221091010100001000000640316337967710000108003880038800388003880038
10024800376000351072669721251001010100001010000502864300080018080037800377836637876710010201000020200008003780037111002110910101000010463000640316337967710000108003880038800388003880038
1002480072599028807266972125100101010000101000050286430008001808003780037783663787671001020100002020000800378003711100211091010100001000000640316337967710000108003880038800388003880038
1002480037600057007646972125100101010000101000050286430008001808003780037784153787671001020100002020000800378003711100211091010100001000000640316337967710000108003880038800388003880038
100248003760008700616972125100101010000101000050286430008001808003780037783663787671001020100002020000800378003711100211091010100001000000640316327967710000108003880038800388003880038
100248003759903300616972125100101010000101000050286430008001808003780037783663787671001020100002020000800378003711100211091010100001000000640316337967710000108003880038800388003880038
100248003760005160616972125100101010000101000050286430008001808003780037783663787671001020100002020000800378003711100211091010100001000000640316337967710000108003880038800388003880038
100248003759903930616972125100101010000101000050286430008001838003780037783663787671001020100002020000800378003711100211091010100001000000640316337967710000108003880038800388003880038

Test 4: throughput

Count: 8

Code:

  fdiv s0, s8, s9
  fdiv s1, s8, s9
  fdiv s2, s8, s9
  fdiv s3, s8, s9
  fdiv s4, s8, s9
  fdiv s5, s8, s9
  fdiv s6, s8, s9
  fdiv 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): 1.0006

retire (01)cycle (02)030b18191e1f3f5051inst 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)9fa0a6a8a9acc2cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
802048004659900013807200258010010080000100800005006400008002580044800446996437000280100200800002001600008004480044118020110099100100800001000000000511021611800360800001008004580045800458004580045
8020480044600000462012520258010010080000100800005006400008002580044800446996437000280100200800002001600008004480044118020110099100100800001000000000511011611800360800001008004580045800458004580045
802048004460000032707480258010010080000100800005006400008002580044800446996437000280100200800002001600008004480044118020110099100100800001000000001511011611800360800001008004580045800458004580045
802048004460000047407200258010010080000100800005006400008002580044800446996437000280100200800002001600008004480044118020110099100100800001000000000511011611800360800001008004580045800458004580045
802048004460000030002450258010010080000100800005006400008002580044800446996437000280100200800002001600008004480044118020110099100100800001000000000511011611800360800001008004580045800458004580045
802048004460000023707200258010010080000100800005006400008002580044800446996437000280100200800002001600008004480044118020110099100100800001000000000511011611800360800001008004580045800458004580045
80204800445990005760550258010010080000100800005006400008002580044800446996437000280100200800002001600008004480044118020110099100100800001000000000511011601800360800001008004580045800998004580045
80204800445990007620550258010010080000100800005006400008002580044800446996437000280100200800002001600008004480044118020110099100100800001000000000511011611800360800001008004580045800458004580045
802048004459900000550258010010080000100800005006400008002580044800446996437000280100200800002001600008004480044118020110099100100800001000000000511011611800360800001008004580045800458004580045
802048004459900000760258010010080000100800005006400008002580044800446996437000280100200800002001600008004480044118020110099100100800001000050600511011611800360800001008004580045800458004580045

1000 unrolls and 10 iterations

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

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)9fa7a8a9acc5cfd2d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002480044599955258001010800001080000506400001800258004480044699863700248001020800002016000080044800442180021109101080000100000050200916858003580000108004580045800458004580045
8002480044600055258001010800001080000506400000800258004480044699863700248001020800002016000080044800441180021109101080000100000050200616568003580000108004580045800458004580045
80024800446000720258001010800001080000506400000800258004480044699863700248001020801692016000080044800441180021109101080000100000050200516778003580000108004580045800458004580045
80024800446000530258001010800001080000506400000800258004480044699863700248001020800002016000080044800441180021109101080000100000050200816778003580000108004580045800458004580045
8002480044599055258001010800001080000506400000800258004480044699863700248001020800002016000080044800441180021109101080000100000050200616868003580000108004580045800458004580045
8002480044599055258001010800001080000506400000800258004480044699863700248001020800002016000080044800441180021109101080000100000050201816658003580000108004580045800458004580045
8002480044599055258001010800001080000506400000800258004480044699863700248001020800002016000080044800441180021109101080000100000050410516888003580000108004580045800458009980045
8002480044600055258001010800001080000506400000800258004480044699863700248001020801662016000080044800441180021109101080000100003050200716658003580000108004580045800458004580045
8002480044599055258001010800001080000506400000800258004480044699863700688001020800002016000080044800441180021109101080000100000050200716658003580000108004580045800458004580045
8002480044599055258001010800001080000506400000800258004480044699863700248001020800002016000080044800441180021109101080000100000050200816888003580000108004580045800458004580045