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

FCMP (scalar, S)

Test 1: uops

Code:

  fcmp s0, s1
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 0.001

Load/store unit issues: 0.000

SIMD/FP unit issues: 1.000

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch simd uop (57)ldst uops in schedulers (5b)dispatch uop (78)map simd uop (7e)map simd uop inputs (81)? int output thing (e9)
10041034100111000100040001000100020001
10041034100111000100040001000100020001
10041034100111000100040001000100020001
10041034100111000100040001000100020001
10041034100111000100040001000100020001
10041034100111000100040001000100020001
10041034100111000100040001000100020001
10041034100111000100040001000100020001
10041034100111000100040001000100020001
10041034100111000100040001000100020001

Test 2: Latency 3->1

Chain cycles: 2

Code:

  fcmp s0, s1
  fcsel d0, d2, d3, eq
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 2 chain cycles): 2.0033

retire uop (01)cycle (02)schedule 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)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)? int output thing (e9)? simd retires (ee)? int retires (ef)
20204400332010110120000100200003001019248201002002000620050115110000100
20204400332010110120000100200003001019248201002002000420050010110000100
20204400332010110120000100200003001019248201002002000420050010110000100
20204400332010110120000100200003001019248201002002000420050010110000100
20204400332010110120000100200003001019248201002002000420050010110000100
20204400332010110120000100200003001019248201002002000420050010110000100
20204400332010110120000100200003001019248201002002000420050010110000100
20204400332010110120000100200003001019248201002002000420050010110000100
20204400332010110120000100200003001019248201002002000420050010110000100
20204400332010110120000100200003001019248201002002000420050010110000100

1000 unrolls and 10 iterations

Result (median cycles for code, minus 2 chain cycles): 2.0033

retire uop (01)cycle (02)schedule 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)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)? int output thing (e9)? simd retires (ee)? int retires (ef)
20025400662001911200081020034301019248200102020004205000011000010
20024400332001111200001020000301019248200102020000205000011000010
20024400332001111200001020000301019248200102020000205000011000010
20024400332001111200001020000301019248200102020000205000011000010
20024400332001111200001020000301019248200102020000205000011000010
20024400332001111200001020000301019248200102020000205000011000010
20024400332001111200001020000301019248200102020000205000011000010
20024400332001111200001020000301019248200102020000205000011000010
20024400332001111200001020000301019248200102020000205000011000010
20024400332001111200001020000301019248200102020000205000011000010

Test 3: Latency 3->2

Chain cycles: 2

Code:

  fcmp s0, s1
  fcsel d1, d2, d3, eq
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 2 chain cycles): 2.0033

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)ldst uops in schedulers (5b)dispatch uop (78)map int uop (7c)map ldst uop (7d)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)? int output thing (e9)? simd retires (ee)? int retires (ef)
20204400332010110120000100200000300010192482010020002000420050015110000100
20204400332010110120000100200000307010195802013620202004620050010110000100
2020440033201011012000010020000731324311453810201312201117088462012820250123210000100
20204400332010110120000100200000300010192482010020002000620050010110000100
20204400332010110120000100200000300010192482010020002000420050010110000100
20204400332010110120000100200000300010192482010020002000420050010110000100
20204400332010110120000100200000300010192482010020002000420050010110000100
20204400332010110120000100200000300010192482010020002000420050010110000100
20204400332010110120000100200000300010192482010020002000420050010110000100
20204400332010110120000100200000300010195802013420002004420050010110000100

1000 unrolls and 10 iterations

Result (median cycles for code, minus 2 chain cycles): 2.0033

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)ldst uops in schedulers (5b)dispatch uop (78)map int uop (7c)map ldst uop (7d)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)? int output thing (e9)? simd retires (ee)? int retires (ef)
20024402392005911200481020144030010192482001020020006205000011000010
20024400332001111200001020000030010192482001020020000205000011000010
20024400332001111200001020000030010192482001020020000205000011000010
20024400332001111200001020000030010192482001020020000205000011000010
20024400332001111200001020000030010192482001020020000205000011000010
20024400332001111200001020000030010192482001020020000205000011000010
20024400332001111200001020000030010192482001020020000205000011000010
20024400332001111200001020000030010192482001020020000205000011000010
20024400332001111200001020000030010192482001020020000205000011000010
20024400332001111200001020000030010192482001020020000205000011000010

Test 4: throughput

Count: 8

Code:

  fcmp s0, s1
  fcmp s0, s1
  fcmp s0, s1
  fcmp s0, s1
  fcmp s0, s1
  fcmp s0, s1
  fcmp s0, s1
  fcmp 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 divided by count): 1.0004

retire uop (01)cycle (02)schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)dispatch ldst uop (58)int uops in schedulers (59)simd uops in schedulers (5a)ldst uops in schedulers (5b)dispatch uop (78)map int uop (7c)map ldst uop (7d)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)? int output thing (e9)? int retires (ef)
802048004880101101800001008000103000320014801032000800102001600201100
802048004180102101800011008000303000320005801012000800082001600161100
802048003480101101800001008000103000320005801012000800082001600161100
802048003480101101800001008000103000320005801012000800082001600161100
802048003480101101800001008000103000320005801012000800082001600161100
802048003480101101800001008000103000320005801012000800082001600201100
802048004180102101800011008000303000320005801012000800082001600161100
802048003480101101800001008000103000320005801012000800082001600161100
802048003480101101800001008000103000320005801012000800082001600161100
802058006880118101800171008002203000320005801012000800082001600161100

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)schedule 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)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)? int output thing (e9)? int retires (ef)
8002480049800212180000208000270320018800242080010201600001110
8002480034800212180000208000070320000800202080000201600001110
8002480034800212180000208000070320000800202080000201600001110
8002480034800212180000208000070320000800202080000201600001110
8002480034800212180000208000070320000800202080000201600721110
8002480034800212180000208000070320000800202080000201600001110
8002480034800212180000208000070320000800202080000201600001110
8002480034800212180000208000070320000800202080000201600001110
8002480034800212180000208000070320000800202080000201600001110
8002480034800212180000208000070320000800202080000201600001110