Skip to content
Unverified Commit f61f99a1 authored by Zain Jaffal's avatar Zain Jaffal Committed by Florian Hahn
Browse files

[instcombine] Optimise for zero initialisation of product given fast flags are enabled

Currently, clang ignores the 0 initialisation in finite math
For example:

```
double f_prod = 0;
double arr[1000];
for (size_t i = 0; i < 1000; i++) {
  f_prod *= arr[i];
 }
```
Clang will ignore that `f_prod` is set to zero and it will generate assembly to iterate over the loop.

Reviewed By: fhahn, spatel

Differential Revision: https://reviews.llvm.org/D131672
parent bcb2740f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment