Skip to content

Commit

Permalink
Temporarily disable the SLPVectorizer
Browse files Browse the repository at this point in the history
The SLPVectorizer vectorizes loads from a packed struct of i2s.

 {<i2, i2, i2, i2>}

The problem with that is that LLVM codegens scalar accesses to such a type as
if it where a packed i8 struct.
So when we emit a vector load of <4 x i2> (i.e one byte) and extract any non
zero index element we get garbage. Disable the SLPVectorizer until it is fixed.

rdar://22673382

Swift SVN r32299
  • Loading branch information
aschwaighofer committed Sep 29, 2015
1 parent 46b2de0 commit d430903
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/IRGen/IRGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ static bool performLLVM(IRGenOptions &Opts, DiagnosticEngine &Diags,
if (Opts.Optimize && !Opts.DisableLLVMOptzns) {
PMBuilder.OptLevel = 3;
PMBuilder.Inliner = llvm::createFunctionInliningPass(200);
PMBuilder.SLPVectorize = !Opts.DisableLLVMSLPVectorizer;
PMBuilder.SLPVectorize = false;
PMBuilder.LoopVectorize = true;
} else {
PMBuilder.OptLevel = 0;
Expand Down

0 comments on commit d430903

Please sign in to comment.