diff options
author | Sebastian Peryt <sebastian.peryt@intel.com> | 2018-01-17 10:02:13 +0100 |
---|---|---|
committer | Sebastian Peryt <speryt@gcc.gnu.org> | 2018-01-17 10:02:13 +0100 |
commit | a3ed8bc3e61db12571bee958812b850160bc18b9 (patch) | |
tree | d0f7ae971fd094b4bb24fdff16fb6049bb2fba5b /gcc | |
parent | 566588f1a25e6c9f7206e5874edfbba6eec6e1a7 (diff) | |
download | gcc-a3ed8bc3e61db12571bee958812b850160bc18b9.zip gcc-a3ed8bc3e61db12571bee958812b850160bc18b9.tar.gz gcc-a3ed8bc3e61db12571bee958812b850160bc18b9.tar.bz2 |
Re-enabling of RDRND for Silvermont.
2018-01-15 Sebastian Peryt <sebastian.peryt@intel.com>
gcc/
PR target/83546
* config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
to PTA_SILVERMONT.
2018-01-15 Sebastian Peryt <sebastian.peryt@intel.com>
gcc/testsuite/
PR target/83546
* gcc.target/i386/pr83546.c: New test.
From-SVN: r256777
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr83546.c | 18 |
4 files changed, 30 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9034ebe..4f83eb6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com> + + PR target/83546 + * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND + to PTA_SILVERMONT. + 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com> * config.gcc (powerpc*-linux*-*): Add support for 64-bit little diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index ea9c462..6dd6bfd 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3474,7 +3474,7 @@ ix86_option_override_internal (bool main_args_p, #define PTA_BONNELL \ (PTA_CORE2 | PTA_MOVBE) #define PTA_SILVERMONT \ - (PTA_WESTMERE | PTA_MOVBE) + (PTA_WESTMERE | PTA_MOVBE | PTA_RDRND) #define PTA_KNM \ (PTA_KNL | PTA_AVX5124VNNIW | PTA_AVX5124FMAPS | PTA_AVX512VPOPCNTDQ) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a4fc221..29b9cb8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com> + + PR target/83546 + * gcc.target/i386/pr83546.c: New test. + 2018-01-16 Eric Botcazou <ebotcazou@adacore.com> * c-c++-common/Warray-bounds-3.c (test_memmove_bounds): Fix mismatch. diff --git a/gcc/testsuite/gcc.target/i386/pr83546.c b/gcc/testsuite/gcc.target/i386/pr83546.c new file mode 100644 index 0000000..12fa2b8 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr83546.c @@ -0,0 +1,18 @@ +/* PR target/83546 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -march=silvermont" } */ + +int test (void) +{ + unsigned int number = 0; + int result0, result1, result2, result3; + + result0 = __builtin_ia32_rdrand32_step (&number); + result1 = __builtin_ia32_rdrand32_step (&number); + result2 = __builtin_ia32_rdrand32_step (&number); + result3 = __builtin_ia32_rdrand32_step (&number); + + return result0 + result1 +result2 + result3; +} + +/* { dg-final { scan-assembler-times "rdrand" 4 } } */ |