[cfe-dev] Disabling vectorisation at '-O3'

Martin J. O'Riordan via cfe-dev cfe-dev at lists.llvm.org
Thu Mar 1 10:01:57 PST 2018


Thanks Richard, I’ll do that - and I can add it as a bug.  It’s almost certainly easy enough to fix, but I wanted to be sure that I wasn’t just making a naïve mistake.

 

            MartinO

 

From: Richard Smith [mailto:richard at metafoo.co.uk] 
Sent: 01 March 2018 17:44
To: Martin J. O'Riordan <MartinO at theheart.ie>
Cc: Clang Dev <cfe-dev at lists.llvm.org>
Subject: Re: [cfe-dev] Disabling vectorisation at '-O3'

 

On 1 Mar 2018 09:16, "Martin J. O'Riordan via cfe-dev" <cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org> > wrote:

Hi CFE-Devs,

While debugging a problem in our back-end, I want to temporarily remove JUST ‘-vectorize’ and ‘-vectorize-slp’ from the flags passed with ‘-cc1’, but I want to leave all the other command-line options the same.  But when I use:

clang -S -O3 -fno-vectorize -fno-slp-vectorize foo.c

it is still inserting ‘-vectorize -vectorize-slp’.  The code in ‘Clang.cpp’ for this is at line #4858 (on the v6.0 branch):

This looks like a bug to me; I'd expect -fno-* to override the -O flag rather than meaning "use the default for this -O level". I'd suggest you look up who added these flags and check with them to make sure this wasn't the intent (it it was, we'll need further discussion), then fix the driver to do the "obvious" thing.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180301/e5dfd7c7/attachment.html>


More information about the cfe-dev mailing list