nvptx: Define TARGET_TRULY_NOOP_TRUNCATION to false
Many thanks to Richard Biener for approving the midde-end
patch that cleared the way for this one. This nvptx patch
defines the target hook TARGET_TRULY_NOOP_TRUNCATION to
false, indicating that integer truncations require explicit
instructions. nvptx.c already defines TARGET_MODES_TIEABLE_P
and TARGET_CAN_CHANGE_MODE_CLASS to false, and as (previously)
documented that may require TARGET_TRULY_NOOP_TRUNCATION to
be defined likewise.
This patch decreases the number of unexpected failures in
the testsuite by 10, and increases the number of expected
passes by 4, including these previous FAILs/ICEs:
gcc.c-torture/compile/opout.c
gcc.dg/torture/pr79125.c
gcc.dg/tree-ssa/pr92085-1.c
Unfortunately there is one testsuite failure that used to
pass gcc.target/nvptx/v2si-cvt.c, but this isn't an ICE or
incorrect code. This regression has been filed as PR96403,
and the failing scan-assembler directives have been replaced
by a reference to the PR.
This patch has been tested on nvptx-none hosted on
x86_64-pc-linux-gnu with "make" and "make check" with
fewer ICEs and no wrong code regressions.
2020-07-31 Roger Sayle <roger@nextmovesoftware.com>
Tom de Vries <tdevries@suse.de>
gcc/ChangeLog:
PR target/90928
* config/nvptx/nvptx.c (nvptx_truly_noop_truncation): Implement.
(TARGET_TRULY_NOOP_TRUNCATION): Define.
gcc/testsuite/ChangeLog:
* gcc.target/nvptx/v2si-cvt.c: Simplify source. Remove
scan-assembler directives. Mention PR96403.