PR68264: Use unordered comparisons for tree-call-cdce.c
authorRichard Sandiford <richard.sandiford@arm.com>
Fri, 13 Nov 2015 14:43:38 +0000 (14:43 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Fri, 13 Nov 2015 14:43:38 +0000 (14:43 +0000)
commita054560d994d592b11f461447e4fafb0e51787d3
tree2f6517c44a62abaf9ed1d762d3e5050d360fda33
parentec8b536ffd7056c0f82c309da713352e6e4deed5
PR68264: Use unordered comparisons for tree-call-cdce.c

As reported in PR 68264, tree-call-cdce.c should be using unordered
comparisons for the range checks, in order to avoid raising FE_INVALID
for quiet NaNs.

Tested on x86_64-linux-gnu and aarch64-linux-gnu.  The test failed on
aarch64-linux-gnu before the patch, but it didn't on x86_64-linux-gnu
because it used unordered comparisons for the previous ordered tree codes.

gcc/
PR tree-optimization/68264
* tree-call-cdce.c (gen_one_condition): Update commentary.
(gen_conditions_for_pow_int_base): Invert the sense of the tests
passed to gen_one_condition.
(gen_conditions_for_domain): Likewise.  Use unordered comparisons.
(shrink_wrap_one_built_in_call): Invert the sense of the tests,
using EDGE_FALSE_VALUE for edges to the call block and
EDGE_TRUE_VALUE for the others.

gcc/testsuite/
PR tree-optimization/68264
* gcc.dg/torture/pr68264.c: New test.

From-SVN: r230323
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr68264.c [new file with mode: 0644]
gcc/tree-call-cdce.c