From d1b1402fc3b65efa756f746c8d20a56d99534be7 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Sat, 1 Dec 2012 23:43:51 +0000 Subject: [PATCH] Enable cltd for modern CPUs From-SVN: r194038 --- gcc/config/i386/i386.c | 2 +- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/i386/ifcvt-onecmpl-abs-1.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 812e6bf3cfd..a24e4071d85 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1822,7 +1822,7 @@ static unsigned int initial_ix86_tune_features[X86_TUNE_LAST] = { m_K6, /* X86_TUNE_USE_CLTD */ - ~(m_PENT | m_CORE2I7 | m_ATOM | m_K6 | m_GENERIC), + ~(m_PENT | m_ATOM | m_K6), /* X86_TUNE_USE_XCHGB: Use xchgb %rh,%rl instead of rolw/rorw $8,rx. */ m_PENT4, diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 40ba775c84e..3103cf131f9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-12-01 Xinliang David Li + + * gcc.target/i386/ifcvt-onecmpl-abs-1.c: Check for + cltd. + 2012-12-01 Paolo Carlini PR c++/55558 diff --git a/gcc/testsuite/gcc.target/i386/ifcvt-onecmpl-abs-1.c b/gcc/testsuite/gcc.target/i386/ifcvt-onecmpl-abs-1.c index c8caab5f1df..7d26f31c725 100644 --- a/gcc/testsuite/gcc.target/i386/ifcvt-onecmpl-abs-1.c +++ b/gcc/testsuite/gcc.target/i386/ifcvt-onecmpl-abs-1.c @@ -2,7 +2,7 @@ /* This test checks for if-conversion of one's complement * abs function. */ /* { dg-options "-O -mtune=generic" } */ -/* { dg-final { scan-assembler "sar" } } */ +/* { dg-final { scan-assembler "cltd" } } */ /* { dg-final { scan-assembler "xor" } } */ /* Check code generation for one's complement version of abs */