[llvm] r296575 - [SLP] Fixes the bug due to absence of in order uses of scalars which needs to be available

Shahid, Asghar-ahmad via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 19:36:30 PST 2017


Sure Michael.

From: Michael Kuperstein [mailto:mkuper at google.com]
Sent: Thursday, March 2, 2017 3:20 AM
To: Hans Wennborg <hans at chromium.org>
Cc: Shahid, Asghar-ahmad <Asghar-ahmad.Shahid at amd.com>; llvm-commits <llvm-commits at lists.llvm.org>; Daniel Jasper <djasper at google.com>; Steven Wu <stevenwu at apple.com>; Matthias Braun <matze at braunis.de>
Subject: Re: [llvm] r296575 - [SLP] Fixes the bug due to absence of in order uses of scalars which needs to be available

Shahid, I can't find your bugzilla username, so replying here.

I haven't dug too deeply, but it looks like the problem is that setting VectorizedValue to Shuf doesn't really do the right thing. If we sort the scalars, then the lanes for the external users are determined using the sorted order, so we really should be extracting from the loads. I'm pretty sure my original test in jumbled-same.ll was actually correct, the extract (from lane 1) really should have been from the load, not from the shuffle.

Can you please take a look?

Thanks,
  Michael

On Wed, Mar 1, 2017 at 11:14 AM, Hans Wennborg <hans at chromium.org<mailto:hans at chromium.org>> wrote:
This caused miscompiles in Chromium (PR32109). I've reverted in r296654.

On Tue, Feb 28, 2017 at 7:51 PM, Mohammad Shahid via llvm-commits
<llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>> wrote:
> Author: ashahid
> Date: Tue Feb 28 21:51:54 2017
> New Revision: 296575
>
> URL: http://llvm.org/viewvc/llvm-project?rev=296575&view=rev
> Log:
> [SLP] Fixes the bug due to absence of in order uses of scalars which needs to be available
> for VectorizeTree() API.This API uses it for proper mask computation to be used in shufflevector IR.
> The fix is to compute the mask for out of order memory accesses while building the vectorizable tree
> instead of actual vectorization of vectorizable tree.
>
> Reviewers: mkuper
>
> Differential Revision: https://reviews.llvm.org/D30159
>
> Change-Id: Id1e287f073fa4959713ba545fa4254db5da8b40d
>
> Added:
>     llvm/trunk/test/Transforms/SLPVectorizer/X86/jumbled-load-bug.ll
> Modified:
>     llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h
>     llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
>     llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
>     llvm/trunk/test/Transforms/SLPVectorizer/X86/jumbled-same.ll

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170302/857f2642/attachment.html>


More information about the llvm-commits mailing list