[llvm] [InstCombine] Fix for folding `select` into floating point binary operators. (PR #83200)

Paul Osmialowski via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 20 04:16:48 PDT 2024


pawosm-arm wrote:

> Testcase for this?

@arsenm I'm using the following code for testing this: https://github.com/dslarm/Financial-Services-Workload-Samples/blob/main/MonteCarloEuropeanOptions/MonteCarloInsideBlockingDP.cpp

With the commit introduced by this PR, the reduction loop cannot be vectorized:

```
MonteCarloInsideBlockingDP.cpp:258:5: warning: loop not vectorized: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning]
  258 |     #pragma omp simd reduction(+:v0) reduction(+:v1)
      |     ^
1 warning generated.
```

Normally, only a slight (yet consistent) change could be observed from that, unless veclib is used, in which case lack of the vectorization results in a dramatic performance degradation.


https://github.com/llvm/llvm-project/pull/83200


More information about the llvm-commits mailing list