* compare-elim.c (conforming_compare): Accept UNSPECs.
commit0690472235f0ccb152ca94c62f0f6bbcb01518c8
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Oct 2016 14:38:43 +0000 (20 14:38 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Oct 2016 14:38:43 +0000 (20 14:38 +0000)
treec13703e925a43cc187b4084c3218e2846b1c36d5
parentc3f852350fadf23ea459d4ce8df0212392af582a
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241379 138bc75d-0d04-0410-961f-82ee72b054a4
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]