Skip to content

Performance regression from defining signed int overflow in -fms-compatibility mode #208221

Description

@AaronBallman

From #198538 (comment)

Our downstream testing at Intel ran into some performance differences that seem to come from these changes. For example, some code can no longer be vectorized (https://godbolt.org/z/7oeETzfY6) because compiler is unable to form the trip count of the loop due to the -fwrapv behavior:

int x[40];
void doit1(int l, int u) {
  int i;
  #pragma clang loop vectorize(assume_safety)
  for (i = l; i < u; i+= 3) x[i] += 1;
}

We also saw an 18% performance regression in SPEC2026 benchmarks such as cpu2026ref 772.marian_r.

CC @pankaj-chawla

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions