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, 2S)

Test 1: uops

Code:

  usqadd v0.2s, v1.2s
  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)60696d6emap 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
1004303723061254825100010001000398313130183037303724153289510001000200030373084111001100000730116112630100030383038303830383038
10043037230128254825100010001000398313130183037303724153289510001000200030373037111001100000730116112630100030383038303830383038
1004303723061254825100010001000398313130183037303724153289510001000200030373037111001100000730116112630100030383038303830383038
1004303724061254825100010001000398313130183037303724153289510001000200030373037111001100020730116112630100030383038303830383038
10043037230168254825100010001000398313130183037303724153289510001000200030373037111001100000730116112630100030383038303830383038
1004303724061254825100010001000398313130183037303724153289510001000200030373037111001100000730116112630100030383038303830383038
1004303723061254825100010001000398313130183037303724153289510001000200030373037111001100000730116112630100030383038303830383038
1004303725061254825100010001000398313030183037303724153289510001000200030373037111001100000730116112630100030383038303830383038
1004303723061254825100010001000398313030183037303724153289510001000200030373037111001100010730116112630100030383038303830383038
1004303723061254825100010001000398313030183037303724153289510001000200030373037111001100000730116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  usqadd v0.2s, v1.2s
  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 instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)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 miss (a1)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
102043003723210010000253295482510100100100001001000050042773131300183003730037282726287401010020010008200200163003730037111020110099100100100001000001117171161129651100001003003830038300383003830038
10204300372331001000061295482510100100100001001000050042773131300183003730037282727287401010020010008200200163003730037111020110099100100100001000001117171161129650100001003003830038300383003830038
10204300372321001000061295482510100100100001001000050042773131300183003730037282727287411010020010008200200163003730037111020110099100100100001000001117181161129650100001003003830038300383003830038
10204300372331001000061295482510100100100001001000050042773131300183003730037282726287401010020010008200200163003730037111020110099100100100001000001117181161129650100001003003830038300383003830038
10204300372321001000061295482510100100100001001000050042773131300183003730037282726287411010020010008200200163003730037111020110099100100100001000001117171161129651100001003003830038300383003830038
10204300372321001000061295482510100100100001001000050042773131300183003730037282727287401010020010008200200163003730037111020110099100100100001000001117181161129650100001003003830038300383003830038
102043003723310010000861295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000007102162229634100001003003830038300383003830038
10204300372330000000061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000000007102162229634100001003003830038300383003830038
102043003723300000012061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000007102162229634100001003003830038300383003830038
10204300842340010000061295482510100100100001001000050042773130300183003730037282653287651010020010000200200003003730037111020110099100100100001000000007102162229634100001003003830038300383003830038

1000 unrolls and 10 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 tlb access (a0)l1d tlb miss (a1)st unit uop (a7)l1d cache writeback (a8)a9cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
100243003723200123612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006613162229630010000103003830038300383003830038
1002430037233009712954825100101010000101000050427731313001830037300372830432876710010201000020200003003730037111002110910101000010000026402162229630010000103003830038300383003830038
1002430037233000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
10024300372320007172954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383008630038
10024300372330018612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
1002430037233003612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
100243003723300375612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010400006402162229630310000103003830038300383007630085
100243003723300474612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
10024300372410005362954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000106402162229630010000103003830038300383003830038
1002430037225000612954845100101010032101000066427731313001830037300372828732876710010201000020200003003730037211002110910101000010001006402162229630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  usqadd v0.2s, v0.2s
  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)031e3a3f4e51schedule 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)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)eaec? simd retires (ee)? int retires (ef)f5f6f7f8fd
1020430037232006129547251010010010000100100005004277160030018300373003728271628741101002001000820020016300373003711102011009910010010000100001117180160029646000100001003003830038300383003830038
1020430037233006129547251010010010000100100005004277160130018300373003728271628741101002001000820020016300373003711102011009910010010000100001117170160029646000100001003003830038300383003830038
1020430037233006129547251010010010000100100005004277160130018300373003728271728740101002001000820020016300373003711102011009910010010000100001117170160029645000100001003003830038300383003830038
1020430037233019729547251010010010000100100005004277160130018300373003728271628740101002001000820020016300373003711102011009910010010000100001117180160029646000100001003003830038300383003830038
1020430037233006129547251010010010000100100005004281216130018300373003728271728740101002001000820020016300373003711102011009910010010000100001117180160029646000100001003003830038300383003830038
1020430037233006129547251010010010000100100005004277160130018300373003728271628741101002001000820020016300373003711102011009910010010000100001117170160029646000100001003003830038300383003830038
1020430037232006129547251010010010000100100005004277160030018300373003728271628741101002001000820020016300373003711102011009910010010000100001117180160029646000100001003003830038300383003830038
1020430037232001172954725101001001000010010000500427716013001830037300372825262873310100200100002002000030037300371110201100991001001000010001591117222242229629000100001003003830038300383003830038
102043003723301972954725101001001000010010000500427716013001830037300372825262873310100200100002002000030037300371110201100991001001000010001621117222242229629042100001003003830038300383003830038
102043003723201972953825101101001002410010000511427716013001830037300372825262873310100200100002002000030037300371110201100991001001000010001561117222242229629000100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)033f4e51schedule 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)a9acc2cfl1i cache miss demand (d3)d5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
100243003722561295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000006400216222962910000103003830038300383003830038
100243003722561295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000006400216222962910000103003830038300383003830038
100243003722561295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000006400216222962910000103003830038300383003830038
100243003722561295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000006400216222962910000103003830038300383003830038
100243003722461295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000006401216222962910000103003830038300383003830038
100243003722561295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000006400216222962910000103003830038300383003830038
100243003723461295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000006400216222962910000103003830038300383003830038
100243003722561295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000006400216222962910000103003830038300383003830038
100243003722561295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000006400216222962910000103003830038300383003830038
100243003722561295472510010101000010100005042771601300183003730037282863287671001020100002020000300373003711100211091010100001000006400216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  usqadd v0.2s, v8.2s
  movi v1.16b, 0
  usqadd v1.2s, v8.2s
  movi v2.16b, 0
  usqadd v2.2s, v8.2s
  movi v3.16b, 0
  usqadd v3.2s, v8.2s
  movi v4.16b, 0
  usqadd v4.2s, v8.2s
  movi v5.16b, 0
  usqadd v5.2s, v8.2s
  movi v6.16b, 0
  usqadd v6.2s, v8.2s
  movi v7.16b, 0
  usqadd v7.2s, v8.2s
  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)031e3f51schedule 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 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)cdcfd5map dispatch bubble (d6)e0eaec? simd retires (ee)? int retires (ef)f5f6f7f8fd
16020420088156029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100661111011931620062001600001002006620066200662006620066
1602042006515501104258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901620062001600001002006620066200662006620066
16020420065155029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100061111011901620062001600001002006620066200662006620066
16020420065155029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100301111011901620062001600001002006620066200662006620066
16020420065155029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901620062001600001002006620066200662006620066
16020420065155029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100101111011901620062001600001002006620066200662006620066
16020420065155085258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100031111011901620062001600001002006620066200662006620066
160204200651560292580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001006101111011901620062001600001002006620066200662006620066
16020420065155029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100061111011901620062101600001002006620066200662006620066
160204200651610694258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011901620062001600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3f51schedule 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 access (a0)l1d cache writeback (a8)accdcfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaec? simd retires (ee)? int retires (ef)f5f6f7f8fd
1600242009315594525800101080000108000050641672212003120050200463228001020800002016000020050200461116002110910101600001040150100353111520211121220043150160000102004720047200472004720047
1600242005015509925800101080000108000050640000112003220050200503228001020800002016000020050200501116002110910101600001000601003262252042161120047300160000102004720051200512005120051
160024200501550512580010108000010800005064000001200312005020050322800102080000201600002005020050111600211091010160000100012010038622112442211520047300160000102005120051200512005120051
1600242005015605125800101080000108000050640000012003120050200503228001020800002016000020050200501116002110910101600001000150100386221024422101120047300160000102005120051200532005120051
1600242005015505125800101080000108000050640000012003120050200503228001020800002016000020050200501116002110910101600001000120100333111120421111020043150160000102004720047200472004720047
16002420046155073258001010800001080000506400001120027200462004632280010208000020160000200472004611160021109101016000010000010032621112021151020043150160000102004720047200472004720047
16002420046156045258001010800001080000506400001120027200462004632280010208000020160000200462004611160021109101016000010000010034311122021151120043150160000102004720047200472004720047
16002420046155093278001010800001080000506400001120032200512005132280010208000020160000200512005111160021109101016000010003010034311122521171120048201160000102005220052200522005220286
160024200601560452780010108000010800005064000001200412006020060322800102080000201600002005120060111600211091010160000100609010029311122542151120057201160000102006120052200522005220287
16002420051156045278001010800001080000506400001120032200512005132280010208000020160000200512006011160021109101016000010000010030311112521110520048201160000102005220052200612005220295

Test 5: throughput

Count: 16

Code:

  usqadd v0.2s, v16.2s
  usqadd v1.2s, v16.2s
  usqadd v2.2s, v16.2s
  usqadd v3.2s, v16.2s
  usqadd v4.2s, v16.2s
  usqadd v5.2s, v16.2s
  usqadd v6.2s, v16.2s
  usqadd v7.2s, v16.2s
  usqadd v8.2s, v16.2s
  usqadd v9.2s, v16.2s
  usqadd v10.2s, v16.2s
  usqadd v11.2s, v16.2s
  usqadd v12.2s, v16.2s
  usqadd v13.2s, v16.2s
  usqadd v14.2s, v16.2s
  usqadd v15.2s, v16.2s
  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)l2 tlb miss instruction (0a)1e3f51schedule 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)acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
16020440059311000302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118021600400361600001004004040040400404004040040
16020440039322000129725160108100160008100160020500128013204002040039400391997762001516012020016003220032006440039400391311602011009910010016000010050011110118011600400361600001004004040040400404004040040
16020440039311000722516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118001600400361600001004004040040400404004040040
16020440039310000302516010810016011610016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118001600400361600001004004040040400404004040040
160204400393100002202516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118001600400361600001004004040040400404004040040
16020440039310000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118001600400361600001004004040040400404004040040
16020440039310000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000211110118031600400361600001004004040040400404004040040
16020440039310000302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010003011110120001602400361600001004004040040400404004040040
16020440039310000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118001600400361600001004004040040400404004040040
16020440039311000302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010010011110118001600400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3a3f51schedule 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)5f6061696b6d6emap 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)accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaebec? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002440051310004625160010101600001016000050128000011540020040039400391999632001916001020160000203200004003940039111600211091010160000100001002231191642233134003630100160000104004040040400404004040040
160024400393100052251600101016000010160000501280000015400200400394003919996320019160010201600002032000040039400391116002110910101600001000010024114281642227144003630100160000104004040040400404004040040
160024400393100152251600101016000010160000501280000105400200400394003919996320019160010201600002032000040039400391116002110910101600001000010024114291642227134003630100160000104004040040400404004040040
1600244003931000462516001010160000101600005012800001154002004003940039199963200191600102016000020320000400394003911160021109101016000010000100241142101642227124003630100160000104004040040400404004040040
160024400393100046251600101016000010160000501280000115400200400394003919996320019160010201600002032000040039400391116002110910101600001000310024114210164223114400363050160000104004040040400404004040040
1600244003931000522516001010160000101600005012800000154002004003940039199963200191600102016000020320000400394003911160021109101016000010000100221141101642214134003630100160000104004040040400404004040040
16002440039311004625160010101600001016000050128000011104002004003940039199963200191600102016000020320000400394003911160021109101016000010000100221341101622135114003630100160000104004040040400404004040040
1600244003931000522516001010160000101600005012800000110400200400394003919996320019160010201600002032000040039400391116002110910101600001000010024165210164224312400361550160000104004040040400404004040040
160024400393101508025160010101600001016000050128000001104002004003940039199963200191600102016000020320000400394003911160021109101016000010000100221341101621129144003631100160000104004040040400404004040040
16002440039310009525160010101600001016000050128000011104002004003940039199963200191600102016000020320000400394003911160021109101016000010010100241652101642229134003630100160000104004040040400404004040040