]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/105368 - avoid overflow in powi_cost
authorRichard Biener <rguenther@suse.de>
Mon, 25 Apr 2022 08:55:21 +0000 (10:55 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 27 May 2022 13:14:21 +0000 (15:14 +0200)
commitebe6ffee1aa2d819e4fbdf4130e054a33c274b38
tree0274a6a4ca26b8c00675d918074bcb2738172024
parent6007449a1c3bd116e431fe53d4dfe2d1c67c1076
tree-optimization/105368 - avoid overflow in powi_cost

The following avoids undefined signed overflow when computing
the absolute of the exponent in powi_cost.

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

PR tree-optimization/105368
* tree-ssa-math-opts.c (powi_cost): Use absu_hwi.

(cherry picked from commit f0e170f72f8bfaa2a64e1d09ebdfd48f917420f1)
gcc/tree-ssa-math-opts.c