diff options
author | Zain Jaffal <z_jaffal@apple.com> | 2022-08-17 11:12:15 +0100 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2022-08-17 11:12:15 +0100 |
commit | f61f99a105914c7060baf4161ffacc96a0995764 (patch) | |
tree | 17392f9f6bc262a5814979e8a7c1f285cceef33f /clang/lib/Frontend/TestModuleFileExtension.cpp | |
parent | bcb2740f415b0f825402f656dda3271414121a0e (diff) | |
download | llvm-f61f99a105914c7060baf4161ffacc96a0995764.zip llvm-f61f99a105914c7060baf4161ffacc96a0995764.tar.gz llvm-f61f99a105914c7060baf4161ffacc96a0995764.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/Frontend/TestModuleFileExtension.cpp')
0 files changed, 0 insertions, 0 deletions