nvptx.c (nvptx_gen_shuffle): Add support for QImode and HImode registers.
gcc/ * config/nvptx/nvptx.c (nvptx_gen_shuffle): Add support for QImode and HImode registers. libgomp/ * testsuite/libgomp.oacc-c-c++-common/vprop.c: New test. From-SVN: r233607
This commit is contained in:
parent
c4e360f44f
commit
d5ace3b55d
4 changed files with 57 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2016-02-22 Cesar Philippidis <cesar@codesourcery.com>
|
||||
|
||||
* config/nvptx/nvptx.c (nvptx_gen_shuffle): Add support for QImode
|
||||
and HImode registers.
|
||||
|
||||
2016-02-22 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/69882
|
||||
|
|
|
@ -1306,6 +1306,20 @@ nvptx_gen_shuffle (rtx dst, rtx src, rtx idx, nvptx_shuffle_kind kind)
|
|||
end_sequence ();
|
||||
}
|
||||
break;
|
||||
case QImode:
|
||||
case HImode:
|
||||
{
|
||||
rtx tmp = gen_reg_rtx (SImode);
|
||||
|
||||
start_sequence ();
|
||||
emit_insn (gen_rtx_SET (tmp, gen_rtx_fmt_e (ZERO_EXTEND, SImode, src)));
|
||||
emit_insn (nvptx_gen_shuffle (tmp, tmp, idx, kind));
|
||||
emit_insn (gen_rtx_SET (dst, gen_rtx_fmt_e (TRUNCATE, GET_MODE (dst),
|
||||
tmp)));
|
||||
res = get_insns ();
|
||||
end_sequence ();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2016-02-22 Cesar Philippidis <cesar@codesourcery.com>
|
||||
|
||||
* testsuite/libgomp.oacc-c-c++-common/vprop.c: New test.
|
||||
|
||||
2016-02-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR driver/69805
|
||||
|
|
34
libgomp/testsuite/libgomp.oacc-c-c++-common/vprop.c
Normal file
34
libgomp/testsuite/libgomp.oacc-c-c++-common/vprop.c
Normal file
|
@ -0,0 +1,34 @@
|
|||
#include <assert.h>
|
||||
|
||||
#define test(type) \
|
||||
void \
|
||||
test_##type () \
|
||||
{ \
|
||||
type b[100]; \
|
||||
type i, j, x = -1, y = -1; \
|
||||
\
|
||||
_Pragma("acc parallel loop copyout (b)") \
|
||||
for (j = 0; j > -5; j--) \
|
||||
{ \
|
||||
type c = x+y; \
|
||||
_Pragma("acc loop vector") \
|
||||
for (i = 0; i < 20; i++) \
|
||||
b[-j*20 + i] = c; \
|
||||
b[5-j] = c; \
|
||||
} \
|
||||
\
|
||||
for (i = 0; i < 100; i++) \
|
||||
assert (b[i] == -2); \
|
||||
}
|
||||
|
||||
test(char)
|
||||
test(short)
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
test_char ();
|
||||
test_short ();
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue