compare-elim.c (conforming_compare): Accept UNSPECs.
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 20 Oct 2016 14:38:43 +0000 (14:38 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 20 Oct 2016 14:38:43 +0000 (14:38 +0000)
commit2c35bbe14a830f58e121a6bd59c7088de93fc155
treec13703e925a43cc187b4084c3218e2846b1c36d5
parent40b8428e2e586d89cce4fbafb8ef333a062a53f8
compare-elim.c (conforming_compare): Accept UNSPECs.

* compare-elim.c (conforming_compare): Accept UNSPECs.
(find_comparison_dom_walker::before_dom_children): Deal with
instructions both using and killing the flags register.
(equivalent_reg_at_start): New function extracted from...
(try_eliminate_compare): ...here.  Use it and add support for
registers and UNSPECs as second operand of the compare.
* config/visium/visium-modes.def (CCV): New.
* config/visium/predicates.md (visium_v_comparison_operator): New.
(visium_branch_operator): Deal with CCV mode.
* config/visium/visium.c (visium_select_cc_mode): Likewise.
(output_cbranch): Likewise.
* config/visium/visium.md (UNSPEC_{ADD,SUB,NEG}V): New constants.
(uaddv<mode>4): New expander.
(addv<mode>4): Likewise.
(add<mode>3_insn_set_carry): New instruction.
(add<mode>3_insn_set_overflow): Likewise.
(addsi3_insn_set_overflow): Likewise.
(usubv<mode>4): New expander.
(subv<mode>4): Likewise.
(sub<mode>3_insn_set_carry): New instruction.
(sub<mode>3_insn_set_overflow): Likewise.
(subsi3_insn_set_overflow): Likewise.
(unegv<mode>3): New expander.
(negv<mode>3): Likewise.
(neg<mode>2_insn_set_overflow): New instruction.
(addv_tst<mode>): Likewise.
(subv_tst<mode>): Likewise.
(negv_tst<mode>): Likewise.
(cbranch<mode>4_addv_insn): New splitter and instruction.
(cbranch<mode>4_subv_insn): Likewise.
(cbranch<mode>4_negv_insn): Likewise.

From-SVN: r241379
gcc/ChangeLog
gcc/compare-elim.c
gcc/config/visium/predicates.md
gcc/config/visium/visium-modes.def
gcc/config/visium/visium.c
gcc/config/visium/visium.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/visium/overflow16.c [new file with mode: 0644]
gcc/testsuite/gcc.target/visium/overflow32.c [new file with mode: 0644]
gcc/testsuite/gcc.target/visium/overflow8.c [new file with mode: 0644]