Unoptimal codegen for Vector<T> init if Vector is not a localVar. #33617
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
enhancement
Product code improvement that does NOT require public API changes/additions
Milestone
For a method like this:
IL for these two Vector inits will look similar:
but the generated code will be different:
Of course, the first version is better (10 bytes against 16).
The problem happens because
fgMorphOneAsgBlockOp
doesn't do that optimization forLCL_FLD
nodes, only forLCL_VAR
.fieldUnoptimalVectorT.txt
That will be probably fixed during #1231.
Note: that is why we need to pass to
isBlkReqd == true
tofgMorphBlockOperand
forgtType != TYP_STRUCT
.The fix will cause diffs in ~10 pri1 tests like:
etc.
category:cq
theme:vector-codegen
skill-level:intermediate
cost:medium
The text was updated successfully, but these errors were encountered: