]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/105431 - another overflow in powi handling
authorRichard Biener <rguenther@suse.de>
Fri, 29 Apr 2022 06:45:48 +0000 (08:45 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 29 Apr 2022 09:10:24 +0000 (11:10 +0200)
commit44b09adb9bad99dd7e3017c5ecefed7f7c9a1590
tree9f49abe44279c9265b38ccabaa433bb93fe96702
parent9eb38e88ce8003c0b852144da3c265b6785ede3c
tree-optimization/105431 - another overflow in powi handling

This avoids undefined signed overflow when calling powi_as_mults_1.

2022-04-29  Richard Biener  <rguenther@suse.de>

PR tree-optimization/105431
* tree-ssa-math-opts.cc (powi_as_mults_1): Make n unsigned.
(powi_as_mults): Use absu_hwi.
(gimple_expand_builtin_powi): Remove now pointless n != -n
check.
gcc/tree-ssa-math-opts.cc