Apple M1 Microarchitecture Research by Dougall Johnson

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

FCVTZS (vector, integer, 4S)

Test 1: uops

Code:

  fcvtzs v0.4s, v0.4s
  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)03081e3f4e51inst issue (52)~issue fp/simd (54)~dispatch fp/simd (57)huge thing fp/simd (5b)696d6edispatch 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)a8cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10043037220061254725100010001000398160301830373037241432895100010001000303730371110011000073116112629100030383038303830383038
10043037220061254725100010001000398160301830373037241432895100010001000303730371110011000073116112629100030383038303830383038
10043037230061254725100010001000398160301830373037241432895100010001000303730371110011000073116112629100030383038303830383038
100430372300649254725100010001000398160301830373037241432895100010001000303730371110011000073116112629100030383038303830383038
100430372209061254725100010001000398160301830373037241432895100010001000303730371110011000073116112629100030383038303830383038
10043037220061254725100010001000398160301830373037241432895100010001000303730371110011000073116112629100030383038303830383038
100430372302461254725100010001000398160301830373037241432895100010001000303730371110011000073116112629100030383038303830383038
10043037230061254725100010001000398160301830373037241432895100010001000303730371110011000073116112629100030383038303830383038
10043037230061254725100010001000398160301830373037241432895100010001000303730371110011000073116112629100030383038303830383038
10043037270061254725100010001000398160301830373037241432895100010001000303730371110011000173116112629100030383038303830383038

Test 2: Latency 1->2

Code:

  fcvtzs v0.4s, v0.4s
  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 (01)cycle (02)0318191e1f3f4e51inst 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)9fa8acc5branch mispredict (cb)cdcfd2d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250032706129547251010010010000119100005004277160300183003730037282643287451010020010000200100003003730037111020110099100100100001000000071002161129633100001003003830038300383003830038
102043003722500006129547251010010010000100100005004277160300183003730037282643287451010020010000200100003003730037111020110099100100100001000000071001161229633100001003003830038300383003830038
1020430084232000043929547251010010010000100100005004277160300183003730037282643287451010020010000200100003008030080111020110099100100100001000000071001161129633100001003003830038300383003830038
10204300372250010806129547251010010010000100100005004277160300183003730037282643287451010020010000200100003003730037111020110099100100100001000000071001161129633100001003003830038300383003830038
10204300372250026406129547251010010010000100100005004277160300183003730037282643287451010020010000200100003003730037111020110099100100100001000000071001161129633100001003003830038300383003830038
10204300372250029406129547251010010010000100100005004277160300183003730037282643287451010020010000200100003003730037111020110099100100100001000000071001161129633100001003003830038300383003830038
10204300372250030006129547251010010010000100100005004277160300183003730037282643287451010020010000200100003003730037111020110099100100100001000000071001161129633100001003003830085300383003830038
10204300372250031206129547251010010010000100100005004277160300183008430084282643287451010020010000200100003003730037111020110099100100100001000000071011161129633100001003003830038300383003830038
10204300372450027006129547251010010010000100100005004277160300183003730037282643287451010020010000200100003003730037111020110099100100100001000000071001161129633100001003003830038300383003830038
1020430037225002880286229547251010010010000100100005004277160300183003730037282643287451010020010000200100003003730037111020110099100100100001000000071001161129633100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)0308091e3f4e51inst 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)9fa6a7a8a9aaaccficache miss (d3)d5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003723102061295472510010101000010100005042771600300183003730037282863287671001020100002010000300373003711100211091010100001000000064003163329629010000103003830038300383003830038
100243003722500061295472510010101000010100005042771600300183003730037282863287671001020100002010000300373003711100211091010100001000000064003163329629010000103003830038300383003830038
100243003722500061295472510010101000010100005042771601300183003730037282863287671001020100002010000300373003711100211091010100001000100064003163329629010000103003830038300383003830038
1002430037225000726295472510010101000010100005042771601300183003730037282863287671001020100002010000300373003711100211091010100001000120064003163329629010000103003830038300383003830038
1002430037225000964295472510010101000010100005042771600300183003730037282863287671001020100002010000300373003711100211091010100001000200064003163329629010000103003830038300383003830038
100243003722500061295472510010101000010100005042771600300183003730037282863287671001020100002010000300373003711100211091010100001000100064003163329629010000103003830038300383003830038
100243003722400061295472510010101000010100005042771600300183003730037282863287671001020100002010000300373003711100211091010100001000200064003163329629010000103003830038300383003830038
1002430037225000612954725100101010000101000050427716003001830037300372828632876710010201000020100003003730037111002110910101000010002900064003163329629010000103003830038300383003830038
10024300372250006129547251001010100001010000504277160130018300373003728286328767100102010000201000030037300371110021109101010000100010015664003163329629010000103003830038300383003830038
100243003722510061295472510010101000010100005042771600300183003730037282863287671001020100002010000300373003711100211091010100001000200064003163329629010000103003830038300383003830038

Test 3: throughput

Count: 8

Code:

  fcvtzs v0.4s, v8.4s
  fcvtzs v1.4s, v8.4s
  fcvtzs v2.4s, v8.4s
  fcvtzs v3.4s, v8.4s
  fcvtzs v4.4s, v8.4s
  fcvtzs v5.4s, v8.4s
  fcvtzs v6.4s, v8.4s
  fcvtzs v7.4s, v8.4s
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)030b18191e1f3f51inst 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)9fa0a1a6a8a9acc5branch mispredict (cb)cdcfitlb miss (d4)d5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8020420058155000120722580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000001115118001600200360800001002004020040200402004020040
802042003915500000302580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000031115118001600200360800001002004020040200402004020040
802042003915500000302580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000001115118001600200360800001002004020040200402004020040
802042003915500000302580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000001115118001600200360800001002004020040200402004020040
802042003915500000302580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000001115118001600200360800001002004020040200402004020040
802042003915600000302580108100800081008002050064013202002020039200399977699908012020080032200800322003920039118020110099100100800001000000001115118001600200360800001002004020040200402838520040
802042003916103454044017151188050710080507100805545116442380202302026020301999929101148054420280142200805532030220308618020110099100100800001000220023601115204028123202501800001002035720311203002030720304
8020420261157145276440468412080587104804861028031650564488802023920354203511002833101288061920480508200805172025520306618020110099100100800001002222221631115200008500202420800001002029620240203032035020040
80204202991571575404407213880703104806071008064150064502202030320295203031002310101238064320280562200806632029920146418020110099100100800001002221237551115120022422200450800001002004920049200492004920049
8020420048155000002242780100100800001008000050064000002002920048200489971699948010020080000200800002004820048118020110099100100800001000000001115120022422200450800001002004920049200492004920049

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0318191e3f51inst 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)5f6061696d6edispatch 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)9fa8acbranch mispredict (cb)cfd0d2d5d6dadbddinst fetch restart (de)e0eb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
8002420051156001240258001010800001080000506400001102002020039200399996031001980010208000020800002003920039118002110910108000010100502000916004420036080000102004020040200402004020040
800242003915600040258001010800001080000506400001102002020039200399996031001980010208000020800002003920039118002110910108000010100502000616004420036080000102004020040200402004020040
800242003915500040258001010800001080000506400000102002020039200399996031001980010208000020800002003920039118002110910108000010030502000850007620036080000102004020040200402004020040
800242003915500040258001010800001080000506400000102002020039200399996031001980010208000020800002003920039118002110910108000010000502000616004720036080000102004020040200402004020040
800242003915500040258001010800001080000506400000132002020039200399996031001980010208000020800002003920039118002110910108000010030502000716004420036080000102004020040200402004020040
800242003915500040258001010800001080000506400000132002020039200399996031001980010208000020800002003920039118002110910108000010000502000416004520036080000102004020040200402004020040
8002420039155000314258001010800001080000506400007132002020039200399996031001980010208000020800002003920039118002110910108000010000502033316004320036080000102004020040200402004020040
800242003915500040258001010800001080000506400007132002020039200399996031001980010208000020800002003920039118002110910108000010100502033716003420036080000102004020040200402004020040
800242003915500082258001010800001080000506400007032002020039200399996031001980010208000020800002003920039118002110910108000010000502033416004420036080000102004020040200402004020040
800242003915600040258001010800001080000506400008132002020039200399996031001980010208000020800002003920039118002110910108000010000502033316004620036080000102004020040200402004020040