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, 4H)

Test 1: uops

Code:

  usqadd v0.4h, v1.4h
  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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
100430372406125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303725546125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372306125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372406125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372406125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372306125482510001000100039831313018303730372415328951000100020003037303711100110000373116112630100030383038303830383038
100430372406125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372308225482510001000100039831303018303730372415328951000100020003037303711100110001073116112630100030383038303830383038
100430372406125482510001000100039831313018303730372415328951000100020003037303711100110001073116112630100030383038303830383038
100430372306125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  usqadd v0.4h, v1.4h
  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)03181e3a3f4e51schedule 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1020430037232012061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007102162229634100001003003830038300383003830038
102043003723300061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007102162229634100001003003830038300383003830038
102043003723300061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007102162229634100001003003830038300383003830038
102043003723300061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007102162229634100001003003830038300383003830038
1020430037233000243295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007102162229634100001003003830038300383003830038
102043003723300061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007102162229634100001003003830038300383003830038
102043003723200061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007102162229634100001003003830038300383003830038
102043003723300061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007102162229634100001003003830038300383003830038
102043003723200061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007102162229634100001003003830038300383003830038
102043003723300082295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007102162229634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)0318191e1f3f4e51schedule 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)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
10024300372250000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372240422806129548251001010100001010000504277313030018300373003728287328767100102010168202033630081300371110021109101010000100300640216222963010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225003600612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
100243003722530300612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  usqadd v0.4h, v0.4h
  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)03l2 tlb miss data (0b)181e3a3f4e51schedule 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)5e60696d6emap 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)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1020430037233000016929547251010010010000100100005004277160013001830037300372827107287401010020010008200200163003730037111020110099100100100001000001117170160029646100001003003830038300383003830038
102043003723300006129547251010010010000100100005004277160003001830037300372827106287401010020010008200200163003730037111020110099100100100001000001117180160029646100001003003830038300383003830038
102043003723300006129547251010010010000100100005004277160013001830037300372827107287401010020010008200200163003730037111020110099100100100001001001117170160029645100001003003830038300383003830038
102043003723300008429547251010010010000100100005004277160013001830037300372827107287411010020010008200200163003730037111020110099100100100001000001117170160029645100001003003830038300383003830038
1020430037233000053629547251010010010000100100005004277160013001830037300372827106287411010020010008200200163003730037111020110099100100100001000001117180160029646100001003003830038300383003830038
10204300372320000980295472510100100100001001000050042771600130018300373003728271012287331010020010008200200163003730037111020110099100100100001000001117180160029645100001003003830038300383003830038
102043003723300006129547251010010010000100100005004277160013001830037300372827107287411010020010008200200163003730037111020110099100100100001000031117170160029645100001003003830038300383003830038
102043003723200906129547251010010010000100100005004277160013001830037300372827107287411010020010008200200163003730037111020110099100100100001000001117170160029645100001003003830038300383003830038
1020430037232000061295472510100100100001001000050042771600130018300373003728271072874110100200100082002001630037300371110201100991001001000010011001117180160029645100001003003830038300383003830038
102043003723200006129547251010010010000100100005004277160013001830037300372827106287411010020010008200200163003730037111020110099100100100001000001117170160029645100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03mmu table walk data (08)09l2 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)st unit uop (a7)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ec? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002430037232000000061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000005600064041644296290010000103003830038300383003830038
10024300372330000000612954725100101010000101000050427716003001830037300372828632876710010201000020200003003730037111002110910101000010000045012064041643296290010000103003830038300383003830038
100243003724200000006129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000200064041644296290010000103003830038300383003830038
100243003722500000006129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000100064031634296290010000103003830038300383003830038
1002430037225000000023229547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000000064041643296290010000103003830038300383003830038
100243003722500000006129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000300064031634296290010000103003830038300383003830038
100243003722500000006129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000100064041643296290010000103003830038300383003830038
100243003722500000006129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000000064031634296290010000103003830038300383003830038
100243003722500000008429547251001010100001010000504277160030054300373003728286328767100102010000202000030037300371110021109101010000100000406464052434296290010000103003830084300863003830038
1002430037225100000061295472510010101000010100005042771600300183003730037282903287671001022100002020000300373003711100211091010100001000003203064041643296290010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  usqadd v0.4h, v8.4h
  movi v1.16b, 0
  usqadd v1.4h, v8.4h
  movi v2.16b, 0
  usqadd v2.4h, v8.4h
  movi v3.16b, 0
  usqadd v3.4h, v8.4h
  movi v4.16b, 0
  usqadd v4.4h, v8.4h
  movi v5.16b, 0
  usqadd v5.4h, v8.4h
  movi v6.16b, 0
  usqadd v6.4h, v8.4h
  movi v7.16b, 0
  usqadd v7.4h, v8.4h
  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)031e3f5051schedule 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 cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)daddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
16020420090155029025801161008001610080028500640196012004520065200656128012820080028200160056200652006511160201100991001001600001000011110121116022200621600001002006620066200662006620066
160204200651551229025801161008001610080028500640196002004520065200656128012820080028200160056200702006511160201100991001001600001001011110121116021200621600001002006620066200662006620066
16020420065155029025801161008001610080028500640196002004520065200656128012820080028200160056200652006511160201100991001001600001000011110121216012200621600001002006620066200662006620066
16020420065156029025801161008001610080028500640196002004520065200656128012820080028200160056200652006511160201100991001001600001000311110120216022201291600001002006620066200662006620066
16020420065155029025801161008001610080028500640196112004520065200656128012820080028200160056200652006511160201100991001001600001000011110121216012200621600001002006620066200662006620066
16020420065156029025801161008001610080029500640196012004520065200656128012820080028200160056200652006511160201100991001001600001000011110121216021200621600001002006620071200662006620066
16020420065156043025801161008001610080028500640196002004520065200656128012820080028200160056200652006511160201100991001001600001000011110121216021200621600001002006620066200662006620066
16020420065156029025801161008001610080028500640196002004520065200656128012820080028200160056200652006511160201100991001001600001000011110121216022200621600001002006620066200662006620066
16020420065155029025801161008001610080028500640196002004520065200656128012820080028200160056200652006511160201100991001001600001000011110121216022200621600001002006620066200662006620066
16020420065155029025801161008001610080028500640196002004520065200656128012820080028200160056200652006511160201100991001001600001000011110120216012200621600001002006620066200662006620066

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)l2 tlb miss data (0b)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)5f6061696d6erob full (74)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)acc2cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaec? simd retires (ee)? int retires (ef)f5f6f7f8fd
160024200711550000000802780010108000010800005064000011102003220051200510322800102080000201600002005120051111600211091010160000100000001003313212125211321020061201160000102005220052200522005220052
160024200511550000000452780010108000010800005064000011102003220051200510322800102080000201600002005120051111600211091010160000100000001004313312125211102220048201160000102005220052200522005220052
160024200511550000000452780010108000010800005064000011102003220051200515322800102080000201600002005120051111600211091010160000100000001003313512125211281120048211160000102005220052200522006120061
16002420051155000000045278011510800001080000506400000110200322005120051032280010208000020160000200512005111160021109101016000010000000100431351925411182120048202160000102005220052200522006120052
16002420051156000000066278001010800001080000506400001110200412005120061032280010208000020160000200602005111160021109101016000010000000100331361934422212220048201160000102005220052200522005220052
16002420051155000000045278001010800001080000506400001110200322005120051032280010208000020160000200512005111160021109101016000010000000100431351925211231920048201160000102005220052200522005220052
1600242005115500000006627800101080000108000050640000111020032200512005103228001020800002016000020051200511116002110910101600001000000010043135172621128920048201160000102005320052200522005220052
160024200511550000000176288001010800001080000506400001110200322005120051032280010208000020160000200512005111160021109101016000010000000100431351934211261820048201160000102005320052200522005220052
16002420051161000000045278001010800001080000506400001110200322005120051032280010208000020160000200512005111160021109101016000010000000100431351725211231920048201160000102005220052200522005220052
160024200511550000000452780010108000010800005064092401102004220051200600322800102080000201600002006020051111600211091010160000100000001004313622025221112220048401160000102005220061200522005220061

Test 5: throughput

Count: 16

Code:

  usqadd v0.4h, v16.4h
  usqadd v1.4h, v16.4h
  usqadd v2.4h, v16.4h
  usqadd v3.4h, v16.4h
  usqadd v4.4h, v16.4h
  usqadd v5.4h, v16.4h
  usqadd v6.4h, v16.4h
  usqadd v7.4h, v16.4h
  usqadd v8.4h, v16.4h
  usqadd v9.4h, v16.4h
  usqadd v10.4h, v16.4h
  usqadd v11.4h, v16.4h
  usqadd v12.4h, v16.4h
  usqadd v13.4h, v16.4h
  usqadd v14.4h, v16.4h
  usqadd v15.4h, v16.4h
  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)03l2 tlb miss data (0b)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)9fld unit uop (a6)l1d cache writeback (a8)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1602044003931100000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010001031111011821622400361600001004004040040400404004040040
160204400393100006906952516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000031111011821622400361600001004007640040400404004040040
1602044003931000000302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010001001111011821622400361600001004004040040400404004040040
1602044003931000000302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011821622400361600001004004040040400404004040040
16020440039310000006952516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011821622400361600001004004040040400404004040040
1602044003931000000302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039211602011009910010016000010000001111011841634400361600001004004040040400404004040040
1602044003931000000302516010810016011010016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011821622400361600001004004040040400404004040040
16020440039310000003025160108100160008100160020500128013204002040039400391997761999016012020016003220032006440039400391116020110099100100160000100000151111011821622400361600001004004040040400404004040040
1602044003931000000302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011811622400361600001004004040040400404004040040
1602044003931000000722516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001111011821621400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1i tlb fill (04)mmu table walk instruction (07)l2 tlb miss instruction (0a)1e1f3a3f51schedule 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)5e5f60696d6emap 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)a9accfd0d2l1i cache miss demand (d3)l1i tlb miss demand (d4)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
160024400513100011201462516001010160000101600005012800000014002040039400391999632001916001020160000203200004003940039111600211091010160000100300100233110391613112920400360165160000104004040040400404004040040
16002440039310001000582516001010160000101600005012800000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000100233110261638212926400360165160000104004040040400404004040040
1600244003931011100046251600101016000010160000501280000011400204003940039199963200191600102016000020320000400394003911160021109101016000010000010024311124161112727400360165160000104004040040400404004040040
1600244003931110000058251600101016000010160000501280000011400204003940039199963200191600102016000020320000400504003911160021109101016000010000010024311125161112425400360165160000104004040040400404004040040
1600244003931011100186251600101016000010160000501280000211400204003940039199963200191600102016000020320000400544003911160021109101016000010000010024311121161111525400360165160000104004040040400404004040040
1600244003931011190146251600101016000010160000501280000011400204003940039199963200191600102016000020320000400394003911160021109101016000010000010024311129591112819400360165160000104004040040400404004040040
1600244003931110000146251600101016000010160000501280000011400204003940039199963200191600102016000020320000400394003911160021109101016000010000010023311116381112327400360165160000104004040040400404004040040
16002440039310101001582516001010160000101600005012800000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000100256220273132228194003603110160000104004040040400404004040040
16002440039310011001642516001010160000101600005012800000014002040039400391999632001916001020160000203200004003940039111600211091010160000100000100256220263132222294003603110160000104004040040400404004040040
16002440039310001001522516001010160000101600005012800000014002040039400391999632001916001020160000203200004003940039111600211091010160000100100100246220263132224304003603110160000104004040040400404004040040