diff options
author | Bruce Forstall <brucefo@microsoft.com> | 2017-04-12 10:12:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-12 10:12:18 -0700 |
commit | cdb88f49038a7dd2f33f5ede0f519c00ff5be503 (patch) | |
tree | 66efade7c37614572e10ad39737defa90f910221 /src | |
parent | f1f5986528158533874cd1f4d4a90a15a374d68b (diff) | |
parent | e7d260afa524de441e119e8275bc54b38c6600c8 (diff) | |
download | coreclr-cdb88f49038a7dd2f33f5ede0f519c00ff5be503.tar.gz coreclr-cdb88f49038a7dd2f33f5ede0f519c00ff5be503.tar.bz2 coreclr-cdb88f49038a7dd2f33f5ede0f519c00ff5be503.zip |
Merge pull request #10243 from sdmaclea/PR-CALLI-LOWERING-ALLOWED
Allow target of calli to be lowered to ldc.i4
Diffstat (limited to 'src')
-rw-r--r-- | src/jit/importer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jit/importer.cpp b/src/jit/importer.cpp index 2cb191627a..54427ba4dd 100644 --- a/src/jit/importer.cpp +++ b/src/jit/importer.cpp @@ -5671,7 +5671,11 @@ GenTreeCall* Compiler::impImportIndirectCall(CORINFO_SIG_INFO* sig, IL_OFFSETX i /* Get the function pointer */ GenTreePtr fptr = impPopStack().val; - assert(genActualType(fptr->gtType) == TYP_I_IMPL); + + // The function pointer is typically a sized to match the target pointer size + // However, stubgen IL optimization can change LDC.I8 to LDC.I4 + // See ILCodeStream::LowerOpcode + assert(genActualType(fptr->gtType) == TYP_I_IMPL || genActualType(fptr->gtType) == TYP_INT); #ifdef DEBUG // This temporary must never be converted to a double in stress mode, |