Skip to content

Codegen optimization of (a << 4) | (b >> 4) #69983

@deeprobin

Description

@deeprobin

@deeprobin feel free to file an issue. Related one is #13816 (you can use PR that closed it as a foundation for your PR if you want to contribute 🙂)

Originally posted by @EgorBo in #69884 (comment)


See https://godbolt.org/z/T8eqE9chv

LLVM

        shr     sil, 4
        shl     dil, 4
        or      dil, sil
        movzx   eax, dil
        ret

.NET JIT

       movzx    rax, dil
       shl      eax, 4
       movzx    rdi, sil
       sar      edi, 4
       or       eax, edi
       ret      

Metadata

Metadata

Assignees

Labels

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

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions