pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@postgresql.org
Subject: pgsql: Improve configure test for the sse4.2 crc instruction.
Date: Mon, 17 Aug 2015 09:36:09 +0000
Message-ID: <E1ZRGpt-0006VV-Ek@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Improve configure test for the sse4.2 crc instruction.

With optimizations enabled at least one compiler, clang 3.7, optimized
away the crc intrinsics knowing that the result went on unused and has
no side effects. That can trigger errors in code generation when the
intrinsic is used, as we chose to use the intrinsics without any
additional compiler flag. Return the computed value to prevent that.

With some more pedantic warning flags (-Wold-style-definition) the
configure test failed to recognize the existence of _mm_crc32_u*
intrinsics due to an independent warning in the test because the test
turned on -Werror, but that's not actually needed here.

Discussion: 20150814092039.GH4955@awork2.anarazel.de
Backpatch: 9.5, where the use of crc intrinsics was integrated.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6cf72879e944f32b5b8232541cccd575de797fa4

Modified Files
--------------
config/c-compiler.m4 |    7 +++----
configure            |   10 ++++------
2 files changed, 7 insertions(+), 10 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (2+ messages)  latest in thread

Message-ID: <E1ZRGpt-0006VV-Ek@gemulon.postgresql.org>
Permalink:  ../E1ZRGpt-0006VV-Ek@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ZRGpt-0006VV-Ek@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de
  Subject: Re: pgsql: Improve configure test for the sse4.2 crc instruction.
  In-Reply-To: <E1ZRGpt-0006VV-Ek@gemulon.postgresql.org>
  References: <E1ZRGpt-0006VV-Ek@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox