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

USQADD (vector, 2D)

Test 1: uops

Code:

  usqadd v0.2d, v1.2d
  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 cache writeback (a8)accfd2d5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
100430372406125482510001000100039831330183037303724153289510001000200030373037111001100000730116112630100030383038303830383038
100430372406125482510001000100039831330183037303724153289510001000200030373037111001100010730116112630100030383038303830383038
100430372406125482510001000100039831330183037303724153289510001000200030373037111001100000730116112630100030383038303830383038
100430372406125482510001000100039831330183037303724153289510001000200030373037111001100000730116112630100030383038303830383038
100430372406125482510001000100039831330183037303724153289510001000200030373037111001100000730116112630100030383038303830383038
100430372406125482510001000100039831330183037303724153289510001000200030373037111001100000730116112630100030383038303830383038
100430372306125482510001000100039831330183037303724153289510001000200030373037111001100000730116112630100030383038303830383038
100430372306125482510001000100039831330183037303724153289510001000200030373037111001100000730116112630100030383038303830383038
100430372306125482510001000100039831330183037303724153289510001000200030373037111001100000730116112630100030383038303830383038
1004303724014425482510001000100039831330183037303724153289510001000200030373037111001100000730116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  usqadd v0.2d, v1.2d
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3f4e51schedule 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)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
102043003723200002106129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300853003741102011009910010010000100000000071011611296340100001003003830038300383003830038
10204300372320000006129548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000000071011611296340100001003003830038300383003830038
10204300372330000006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000000071011611296340100001003003830038300383003830038
102043003723300005406129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000000071011611296340100001003003830038300383003830038
10204300372330000906129548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000000071011611296340100001003003830038300383003830038
1020430037233000003526129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000000071011611296340100001003003830038300383003830038
102043003723300006022329548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000000071011611296340100001003003830038300383003830038
10204300372320000006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000000071011611296340100001003003830038300383003830038
10204300372330000606129548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000000071011611296340100001003003830038300383003830038
1020430037233000044706129548251010010010000100100005004277313030018300373003728265328745102632001000020020000300373003711102011009910010010000100000000071011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)031e1f3a3f4e51schedule 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)60696b6d6emap 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002430037233522008229548251001010100001010000504277313030018030037300372828732876710010201000020200003003730037111002110910101000010003640216222963010000103003830038300383003830038
1002430037233516006129548251001010100001010000504277313030018030037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037233498006129548251001010100001010000504277313030018030037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037232510006129548251001010100001010000504277313030018030037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
100243003723300010329548651001010100001310298504277313030018030037300372828732876710010201000020200003003730037111002110910101000010003640216222963010000103003830038300383003830038
1002430037233420006129548251001010100001010000504277313030018030037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372330006129548251001010100001010000504277313030018030037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037232540006129548251001010100001010000504277313030018030037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037233345006129548251001010100001010000504277313030018030037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372325250010429548251001010100001010000504277313030018030037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  usqadd v0.2d, v0.2d
  movi v0.16b, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)0318191e3f4e51schedule 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)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
102043003723300061295472510100100100001001000050042771600300183003730037282717287411010020010008200200163003730037111020110099100100100001000011171716296460100001003003830038300383003830038
102043003723300061295472510100100100001001000050042771600300183003730037282716287411010020010008200200163003730037111020110099100100100001000011171716296450100001003003830038300383003830038
102043003723300061295472510100100100001001000050042771600300183008430084282717287401010020010008200200163003730037111020110099100100100001000011171816296460100001003003830038300383003830038
102043003723200061295472510100100100001001000050042771600300183003730037282717287411010020010008200200163003730037111020110099100100100001000011171716296460100001003003830038300383003830038
102043003723300061295472510100100100001001000050042771600300183003730037282716287411010020010008200200163003730037111020110099100100100001000011171816296450100001003003830038300383003830038
1020430037233000103295472510100100100001001000050042771600300183003730037282717287411010020010008200200163003730037111020110099100100100001000011171716296450100001003003830038300383003830038
1020430037233000103295472510100100100001001000050042771600300183003730037282716287411010020010008200200163003730037111020110099100100100001000011171816296460100001003003830038300383003830038
102043003723300061295472510100100100001001000050042771600300183003730037282866287411010020010008200200163003730037111020110099100100100001000011171816296450100001003003830038300383003830038
102043003723300061295472510100100100001001000050042771600300183003730037282716287411010020010008200200163003730037111020110099100100100001000011171716296450100001003003830038300383003830038
102043003723300061295472510100100100001001000050042771600300183003730037282717287411010020010008200200163003730037111020110099100100100001000011171716296460100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03mmu table walk instruction (07)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e3a3f4e51schedule 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
10024300372410000000061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
10024300372330000020061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
10024300372330000000061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
10024300372330000000061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
10024300372250000000061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
10024300372250000000064295472510010101000010100005042771600300183003730037283093287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
10024300372250000000061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
100243003722500000000754295292510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
100243003722500000012061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
10024300372250000000061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  usqadd v0.2d, v8.2d
  movi v1.16b, 0
  usqadd v1.2d, v8.2d
  movi v2.16b, 0
  usqadd v2.2d, v8.2d
  movi v3.16b, 0
  usqadd v3.2d, v8.2d
  movi v4.16b, 0
  usqadd v4.2d, v8.2d
  movi v5.16b, 0
  usqadd v5.2d, v8.2d
  movi v6.16b, 0
  usqadd v6.2d, v8.2d
  movi v7.16b, 0
  usqadd v7.2d, v8.2d
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)0318191e1f3f51schedule 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)5f60696d6emap 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)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfl1i cache miss demand (d3)d5map dispatch bubble (d6)ddfetch restart (de)e0eaec? simd retires (ee)? int retires (ef)f5f6f7f8fd
160204200901560000292580116100800161008002850064019601200452006520065612801282008002820016005620065200651116020110099100100160000100000001111011900160020062001600001002006620066200662006620066
160204200651550000292580116100800161008002850064019600200452006520065612801282008002820016005620065200651116020110099100100160000100001001111011900160020062001600001002006620066200662006620066
160204200651550000292580116100800161008002850064019601200452006520065612801282008002820016005620065200651116020110099100100160000100001001111011900160020062001600001002006620066200662006620066
160204200651550000292580116100800161008002850064019600200452006520065612801282008002820016005620065200651116020110099100100160000100003001111011900160020062021600001002006620148200662006620066
16020420065155000013642580116100800161028002850064019600200452006520065612801282008002820016005620065200651116020110099100100160000100000001111011900160020062001600001002006620066200662006620066
160204200651560000292580116100800161008002850064019601200452006520065612801282008002820016005620065200651116020110099100100160000100000001111011900160020062001600001002006620066200662006620066
160204200651550000292580116100800161008002850064019600200452006520065612801282008002820016005620065200651116020110099100100160000100001001111011900160020062001600001002006620066200662006620066
160204200651550000292580116100800161008002850064019601200452006520065612801282008002820016005620065200651116020110099100100160000100000001111011900160020062001600001002006620066200662006620066
160204200651550000292580116100800161008002850064019600200452006520065612801282008002820016005620065200651116020110099100100160000100000001111011900160020062001600001002006620066200662038820066
160204200651550000292580116100800161008002850064019601200452006520065612801282008002820016005620065200651116020110099100100160000100001001111011900160020062001600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f3a3f51schedule 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)5f6061696d6emap 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)a9acbranch cond mispred nonspec (c5)cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)dfe0eaec? simd retires (ee)? int retires (ef)f5f6f7f8fd
160024200731560000000000235278001010800001080000506400001152003320051200513228001020800002016000020051200511116002110910101600001000001003583192521168320048201160000102005220052200522005220052
16002420051155000000000051278001010800001080000506400002152003220051200513228001020800002016000020060200511116002110910101600001000001003984172521164320048201160000102005220052200522005220052
160024200511560000000000452780010108000010800005064000021520032200512005132280010208000020160000200512005111160021109101016000010101501003731162521146320048201160000102005420052200522005220052
16002420051155100000000045298001010800001080000506400002052003220051200513228001020800002016000020051200511116002110910101600001000001003984182521188320048201160000102005220052200522005220052
160024200511550000000000111278001010800001080000506400001102003220051200513228001020800002016000020052200511116002110910101600001000001003934282521185320048201160000102005220052200522005220052
160024200511560000000000452780010108000010800005064000011520032200512005132280010208000020160000200512005111160021109101016000010000010037114182521189320048201160000102005220052200522005220052
16002420051156100000000045278001010800001080000506400001052004120051200513228001020800002016000020051200511116002110910101600001000001003931162521159320048201160000102005220052200522005220052
16002420051156000000000045278001010800001080000506400001152004120051200513228001020800002016000020051200511116002110910101600001000001003535162521288320048201160000102006120052200522005220052
16002420051155100000000045278001010800001080000506400001102003220051200513228001020800002016000020051200511116002110910101600001000001004131162521146320048201160000102005620052200522005220052
16002420051155000000000045278001010800001080000506400002152003220051200513228001020800002016000020060200601116002110910101600001000001003982243441288320057202160000102006120061200612006120052

Test 5: throughput

Count: 16

Code:

  usqadd v0.2d, v16.2d
  usqadd v1.2d, v16.2d
  usqadd v2.2d, v16.2d
  usqadd v3.2d, v16.2d
  usqadd v4.2d, v16.2d
  usqadd v5.2d, v16.2d
  usqadd v6.2d, v16.2d
  usqadd v7.2d, v16.2d
  usqadd v8.2d, v16.2d
  usqadd v9.2d, v16.2d
  usqadd v10.2d, v16.2d
  usqadd v11.2d, v16.2d
  usqadd v12.2d, v16.2d
  usqadd v13.2d, v16.2d
  usqadd v14.2d, v16.2d
  usqadd v15.2d, v16.2d
  movi v16.16b, 17

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)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)l1d cache writeback (a8)acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd2d5map dispatch bubble (d6)d9dbddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
16020440059310000000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118041600134003601600001004004040040400404004040040
16020440039310000000302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118031600334003601600001004004040092401584004040040
16020440039310000000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118041600334003601600001004004040040400404004040040
16020440039311000000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118041600544003601600001004004040040400404004040040
16020440039310000000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118031600434003601600001004004040040400404004040040
160204400393100000001252516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118021600234003601600001004004040040400404004040040
16020440039311000090302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118031600444003601600001004004040040400404004040040
16020440039311000000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118041600514003601600001004004040040400404004040040
16020440039310000000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118041600224003601600001004004040040400404004040040
16020440039311000000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118021600314003601600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)191e1f3f51schedule 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)5f60696b6d6emap stall dispatch (70)simd prf full (72)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)accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
1600244005130000004625160010101600001016000050128000001400200400394003919996032001916001020160000203200004003940039111600211091010160000100010027311111621147400363010160000104004040040400404004040040
16002440039299000046251600101016000010160000501280000114002004003940039199960320019160010201600002032000040039400391116002110910101600001000100223114164117440036155160000104004040040400404004040040
160024400393000000522516001010160000101600005012800000140020040039400391999603200191600102016000020320000400394003911160021109101016000010001002231161621177400363010160000104004040040400404004040040
160024400393000000462516001010160000101600005012800001140020340039400391999603200191600102016000020320000400394003911160021109101016000010201002261171621176400363010160000104004040040400404004040040
160024400393000068412322295251600101016000010160000501280000114002004003940039199960320019160010201600002032000040039400391116002110910101600001000100223217162114740036305160000104004040040400404004040040
160024400393000000947251600101016000010160000501280000114002004003940039199960320019160010201600002032000040039400391116002110910101600001000100223117162114840154155160000104004040040400404004040040
160024400393000000462516001010160000101600005012800001140020040039400391999603200191600102016000020320000400394003911160021109101016000010001002561141621158400363010160000104004040040400404004040040
160024400393000000293251600101016000010160000501280000114002004003940039199960820019160010201600002032000040039400391116002110910101600001000100223214162114740036155160000104004040040400404004040040
16002440039299000046251600101016000010160000501280000114002004003940039199960320019160010201600002032000040039400391116002110910101600001000100223116162116740036155160000104004040040400404004040040
16002440039300000088251600101016000010160000501280000114002004003940039199960320019160010201600002032000040039400391116002110910101600001000100223117162114740036155160000104004040040400404004040040