llvm-project
f8358275 - [InstCombine] Fix incorect `foldPowiReassoc` on signed overflow (#197172)

Commit
1 day ago
[InstCombine] Fix incorect `foldPowiReassoc` on signed overflow (#197172) Reproducer: ``` #include <math.h> #include <stdio.h> __attribute__((noinline)) double f(double x) { return __builtin_powi(x, 1073741824) * __builtin_powi(x, 1073741824); } int main(void) { double r = f(2.0); printf("%f\n", r); return r == 0.0; // 0 = correct, 1 = miscompile } ``` https://llvm.godbolt.org/z/sjK1EsGhx
Author
Parents
Loading