Skip to content

Add peephole optimization to replace x86 SIMD instructions with smaller equivalents #112880

Open
@saucecontrol

Description

@saucecontrol

As pointed out in #112728 (comment), there are some SIMD instructions that have equivalents with smaller encoding.

For example, pupcklpd can be replaced with movlhps, which is 1 byte smaller, under the following conditions:

  1. both operands are from register
  2. VEX encoding is not supported

Similarly, vpermilps can be replaced with the smaller vpshufd if mixing float and integer domain instructions is not a concern.

llvm has logic that identifies some of these replacements here

cc @tannergooding

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions