Skip to content

Consider decomposing GetElement(memory, ...) into equivalent nodes #86345

@SingleAccretion

Description

@SingleAccretion

One motivating example from #85871:

***** BB02
STMT00005 ( 0x021[E-] ... 0x031 )
               [000025] -----------                         *  JTRUE     void  
               [000024] N--------U-                         \--*  NE        int   
               [000022] -----------                            +--*  CAST      double <- float
               [000053] -----------                            |  \--*  HWINTRINSIC float  float GetElement
               [000020] -----------                            |     +--*  LCL_VAR   simd16<System.Numerics.Vector4>(AX) V00 loc0         
               [000052] -----------                            |     \--*  CNS_INT   int    1
               [000023] -----------                            \--*  CNS_DBL   double 0.0000000000000000

We don't get containment for the complex GetElement tree. We could if we lowered it as a LCL_FLD.

Similar (but not identical) situation exists for GetElement sources that are INDs:

// Windows x64 ABI
[MethodImpl(MethodImplOptions.NoInlining)]
private static int Problem(Vector128<float> a)
{
    return (int)a.GetElement(1);
}

@tannergooding

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions