[llvm] r217144 - Enable noalias metadata by default and swap the order of the SLP and Loop vectorizers by default.

Hal Finkel hfinkel at anl.gov
Fri Sep 26 09:24:16 PDT 2014


----- Original Message -----
> From: "Yi Kong" <kongy.dev at gmail.com>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: llvm-commits at cs.uiuc.edu, "James Molloy" <james.molloy at arm.com>
> Sent: Friday, September 26, 2014 9:41:54 AM
> Subject: Re: [llvm] r217144 - Enable noalias metadata by default and swap the order of the SLP and Loop vectorizers
> by default.
> 
> Hi Hal,
> 
> Loop vectorizer is found to cause the regression. The LLVM IR
> immediately after the loop vectorizer may be malformed, which is
> unveiled by EarlyCSE pass enabled by '-fslp-vectorize-aggressive'.

Okay, but BBVectorize runs before the EarlyCSE invocation. Are you sure that it is the loop vectorizer that is doing it?

Thanks again,
Hal

> 
> I've filed a bug report against it.
> 
> Thanks,
> Yi
> 
> On 26 September 2014 01:10, Hal Finkel <hfinkel at anl.gov> wrote:
> > Hi Yi,
> >
> > This is almost likely a bug in BBVectorize. Can you please file a
> > bug report.
> >
> > Out of curiosity, are there still cases where
> > -fslp-vectorize-aggressive provides additional speedup over -O3
> > (which should now include -fslp-vectorize)?
> >
> > Thanks again,
> > Hal
> >
> > ----- Original Message -----
> >> From: "Yi Kong" <kongy.dev at gmail.com>
> >> To: "James Molloy" <james.molloy at arm.com>
> >> Cc: llvm-commits at cs.uiuc.edu
> >> Sent: Thursday, September 25, 2014 6:58:24 PM
> >> Subject: Re: [llvm] r217144 - Enable noalias metadata by default
> >> and swap the order of the SLP and Loop vectorizers
> >> by default.
> >>
> >> Hi James,
> >>
> >> This patch is causing a bunch of failures in LNT test suite, when
> >> compiling with `-O3 -fslp-vectorize-aggressive`. Clang fails when
> >> trying to do the CSE after BBVectorize.
> >>
> >> -Yi
> >>
> >> New Failures - Compile Time
> >> MultiSource/Applications/ClamAV/clamscan
> >> MultiSource/Applications/JM/ldecod/ldecod
> >> MultiSource/Applications/JM/lencod/lencod
> >> MultiSource/Applications/oggenc/oggenc
> >> MultiSource/Benchmarks/7zip/7zip-benchmark
> >> MultiSource/Benchmarks/FreeBench/neural/neural
> >> MultiSource/Benchmarks/MallocBench/espresso/espresso
> >> MultiSource/Benchmarks/MiBench/consumer-lame/consumer-lame
> >> SingleSource/Benchmarks/CoyoteBench/lpbench
> >>
> >> Error message:
> >> $ clang lpbench.c --target=aarch64-linux-gnu -O3
> >> -fslp-vectorize-aggressive
> >> Instruction does not dominate all uses!
> >>   %cmp.zero241 = icmp eq i64 %n.vec239, 0
> >>   br i1 %cmp.zero241, label %middle.block, label %vector.memcheck
> >> Instruction does not dominate all uses!
> >>   %n.vec239 = and i64 %0, -4
> >>   %37 = icmp eq i64 %index.next, %n.vec239
> >> Instruction does not dominate all uses!
> >>   %n.vec239 = and i64 %0, -4
> >>   %resume.val = phi i64 [ 0, %overflow.checked ], [ 0,
> >> %vector.memcheck ], [ %n.vec239, %vector.body ]
> >> Instruction does not dominate all uses!
> >>   %cmp.zero241 = icmp eq i64 %n.vec239, 0
> >>   br i1 %cmp.zero241, label %middle.block184, label
> >>   %vector.memcheck205
> >> Instruction does not dominate all uses!
> >>   %n.vec239 = and i64 %0, -4
> >>   %56 = icmp eq i64 %index.next211, %n.vec239
> >> Instruction does not dominate all uses!
> >>   %n.vec239 = and i64 %0, -4
> >>   %resume.val206 = phi i64 [ 0, %overflow.checked192 ], [ 0,
> >> %vector.memcheck205 ], [ %n.vec239, %vector.body183 ]
> >> fatal error: error in backend: Broken function found, compilation
> >> aborted!
> >> clang: error: clang frontend command failed with exit code 70 (use
> >> -v
> >> to see invocation)
> >> clang version 3.6.0 (trunk 217400)
> >> Target: aarch64--linux-gnu
> >> Thread model: posix
> >> clang: note: diagnostic msg: PLEASE submit a bug report to
> >> http://llvm.org/bugs/ and include the crash backtrace,
> >> preprocessed
> >> source, and associated run script.
> >> clang: note: diagnostic msg:
> >> ********************
> >>
> >> PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
> >> Preprocessed source(s) and associated run script(s) are located
> >> at:
> >> clang: note: diagnostic msg: /tmp/lpbench-8701bf.c
> >> clang: note: diagnostic msg: /tmp/lpbench-8701bf.sh
> >> clang: note: diagnostic msg:
> >>
> >> ********************
> >>
> >> On 4 September 2014 14:23, James Molloy <james.molloy at arm.com>
> >> wrote:
> >> > Author: jamesm
> >> > Date: Thu Sep  4 08:23:08 2014
> >> > New Revision: 217144
> >> >
> >> > URL: http://llvm.org/viewvc/llvm-project?rev=217144&view=rev
> >> > Log:
> >> > Enable noalias metadata by default and swap the order of the SLP
> >> > and Loop vectorizers by default.
> >> >
> >> > After some time maturing, hopefully the flags themselves will be
> >> > removed.
> >> >
> >> > Modified:
> >> >     llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
> >> >     llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp
> >> >
> >> > Modified: llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
> >> > URL:
> >> > http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp?rev=217144&r1=217143&r2=217144&view=diff
> >> > ==============================================================================
> >> > --- llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
> >> > (original)
> >> > +++ llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp Thu Sep
> >> >  4
> >> > 08:23:08 2014
> >> > @@ -62,7 +62,7 @@ static cl::opt<bool> RunLoadCombine("com
> >> >
> >> >  static cl::opt<bool>
> >> >  RunSLPAfterLoopVectorization("run-slp-after-loop-vectorization",
> >> > -  cl::init(false), cl::Hidden,
> >> > +  cl::init(true), cl::Hidden,
> >> >    cl::desc("Run the SLP vectorizer (and BB vectorizer) after
> >> >    the
> >> >    Loop "
> >> >             "vectorizer instead of before"));
> >> >
> >> >
> >> > Modified: llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp
> >> > URL:
> >> > http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp?rev=217144&r1=217143&r2=217144&view=diff
> >> > ==============================================================================
> >> > --- llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp
> >> > (original)
> >> > +++ llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp Thu Sep
> >> >  4
> >> > 08:23:08 2014
> >> > @@ -42,7 +42,7 @@
> >> >  using namespace llvm;
> >> >
> >> >  static cl::opt<bool>
> >> > -EnableNoAliasConversion("enable-noalias-to-md-conversion",
> >> > cl::init(false),
> >> > +EnableNoAliasConversion("enable-noalias-to-md-conversion",
> >> > cl::init(true),
> >> >    cl::Hidden,
> >> >    cl::desc("Convert noalias attributes to metadata during
> >> >    inlining."));
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > llvm-commits mailing list
> >> > llvm-commits at cs.uiuc.edu
> >> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >> _______________________________________________
> >> llvm-commits mailing list
> >> llvm-commits at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >>
> >
> > --
> > Hal Finkel
> > Assistant Computational Scientist
> > Leadership Computing Facility
> > Argonne National Laboratory
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list