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>
Fri, 22 Jan 2021 16:40:57 +0000 (16:40 +0000)
commit9d33785f57daf29dc0c106c919da319fe1906bc6
tree5ef5cda41196b8498b67440934cc6cf83cec8f57
parenteee8ed2f22b36dfe64a9516171871476e8ede477
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.
gcc/testsuite/gcc.dg/pr98766.c [new file with mode: 0644]
gcc/tree-ssa-math-opts.c