PR target/82981
commit52a1f3ab417b27d4b215198d6dabe08a6b42cf6a
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Nov 2017 09:01:42 +0000 (15 09:01 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 15 Nov 2017 09:01:42 +0000 (15 09:01 +0000)
tree63d30374d3cf9bdc2b71e04db9d013a8c15c009c
parent6c973fb9dd8178fa8b0f6c3549ee8f2cf38fd730
PR target/82981
* internal-fn.c: Include gimple-ssa.h, tree-phinodes.h and
ssa-iterators.h.
(can_widen_mult_without_libcall): New function.
(expand_mul_overflow): If only checking unsigned mul overflow,
not result, and can do efficiently MULT_HIGHPART_EXPR, emit that.
Don't use WIDEN_MULT_EXPR if it would involve a libcall, unless
no other way works.  Add MULT_HIGHPART_EXPR + MULT_EXPR support.
(expand_DIVMOD): Formatting fix.
* expmed.h (expand_mult): Add NO_LIBCALL argument.
* expmed.c (expand_mult): Likewise.  Use OPTAB_WIDEN rather
than OPTAB_LIB_WIDEN if NO_LIBCALL is true, and allow it to fail.

* gcc.target/mips/pr82981.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254758 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/expmed.c
gcc/expmed.h
gcc/internal-fn.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/mips/pr82981.c [new file with mode: 0644]