-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Open
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorsoptimization
Milestone
Description
GenTree* shiftConst = m_compiler->gtNewIconNode(31, TYP_INT);
GenTree* sar = m_compiler->gtNewOperNode(GT_RSH, select->TypeGet(), relopOp1, shiftConst);
CheckImmedAndMakeContained(sar, shiftConst); // falseCheckImmedAndMakeContained calls into IsContainableImmed which on arm doesn't handle shifts and returns false so that shiftConst doesn't get contained even though it could.
The weird thing is that the higher level function ContainCheckNode handles it. That's because it doesn't actually call into CheckImmedAndMakeContained. Meanwhile for other nodes like add the higher level function does call into lower level CheckImmedAndMakeContained:
Add:
ContainCheckNode -> ContainCheckBinary -> CheckImmedAndMakeContained -> IsContainableImmed -> MakeSrcContained
Rsh:
ContainCheckNode -> ContainCheckShiftRotate -> shiftBy->IsCnsIntOrI -> MakeSrcContained
Maybe ContainCheckShiftRotate should call CheckImmedAndMakeContained which should handle shifts?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIhelp wanted[up-for-grabs] Good issue for external contributors[up-for-grabs] Good issue for external contributorsoptimization