]> gcc.gnu.org Git - gcc.git/commit
tree-ssa-mathopts: Use proper poly_int64 comparison with param_avoid_fma_max_bits...
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Thu, 21 Jan 2021 16:33:49 +0000 (16:33 +0000)
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>
Wed, 27 Jan 2021 14:41:38 +0000 (14:41 +0000)
commite753db89ddcc7f005fd54f861375bcdc85f23335
tree1633d7311bce529c82f97db7b01ac301fb555633
parentcf8f2d9f8b8519dba337f7e03f85b2fd4b08e952
tree-ssa-mathopts: Use proper poly_int64 comparison with param_avoid_fma_max_bits [PR 98766]

We ICE here because we end up comparing a poly_int64 with a scalar using
<= rather than maybe_le.
This patch fixes that in the way rich suggests in the PR.

gcc/ChangeLog:

PR tree-optimization/98766
* tree-ssa-math-opts.c (convert_mult_to_fma): Use maybe_le when
comparing against type size with param_avoid_fma_max_bits.

gcc/testsuite/ChangeLog:

PR tree-optimization/98766
* gcc.dg/pr98766.c: New test.

(cherry picked from commit 9d33785f57daf29dc0c106c919da319fe1906bc6)
gcc/testsuite/gcc.dg/pr98766.c [new file with mode: 0644]
gcc/tree-ssa-math-opts.c
This page took 0.060893 seconds and 5 git commands to generate.