Skip to content

Instruction pmaxsw not generated #55013

Closed
@mariannems

Description

@mariannems

The code generated by 'x86-64 clang 13.0.1' in /O3 will generate pmaxsw instructions. With 'x86-64 clang 14.0.0' and 'x86-64 clang (trunk)', the pmaxw is not generated, and the code size is slightly bigger.

short vecreduce_smax_v2i16(int n, short* v)
{
  short p = 0;
  for (int i = 0; i < n; ++i)
    p = p < v[i] ? v[i] : p;
  return p;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions