Skip to content

RyuJIT x86: Lowering sometimes replaces ADD with LEA when ADD is required to set flags #6112

Description

@mikedn

Found in dotnet/coreclr#4986. JIT\Methodical\fp\exgen\10w5d_cs_do\10w5d_cs_do.cmd fails because an ADD used by low part of a long ADD operation was replaced with a LEA:

81EA3BD6A42A sub      edx, 0x2AA4D63B
B90087947F   mov      ecx, 0x7F948700
1BC1         sbb      eax, ecx
8D0C16       lea      ecx, [esi+edx]  ; the carry flag is required by the adc below
8BD7         mov      edx, edi
13D0         adc      edx, eax
8BC1         mov      eax, ecx

Metadata

Metadata

Assignees

Labels

arch-x86area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIbug

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions