[Patch] [AArch64] Implement getMaximumUnrollFactor()

Zhaoshi zhaoshiz at codeaurora.org
Wed Apr 9 10:26:34 PDT 2014


Jiangning,

Hal is right. So far only the loop vectorizer queries this function, getMaximumUnrollFactor(). As a result, -loop-vectorize exercises this opt.

Zhaoshi

-----Original Message-----
From: Hal Finkel [mailto:hfinkel at anl.gov] 
Sent: Tuesday, April 08, 2014 23:45
To: Jiangning Liu
Cc: llvm-commits at cs.uiuc.edu for LLVM; Zhaoshi
Subject: Re: [Patch] [AArch64] Implement getMaximumUnrollFactor()

----- Original Message -----
> From: "Jiangning Liu" <liujiangning1 at gmail.com>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "llvm-commits at cs.uiuc.edu for LLVM" <llvm-commits at cs.uiuc.edu>, 
> "Zhaoshi" <zhaoshiz at codeaurora.org>
> Sent: Wednesday, April 9, 2014 1:15:47 AM
> Subject: Re: [Patch] [AArch64] Implement getMaximumUnrollFactor()
> 
> 
> 
> Hi Hal,
> 
> 
> Ah, I see. Do you mean the test is using -loop-vectorize rather than 
> -loop-unroll?

Essentially, yes.

 -Hal

> Then I'm OK with the original CHECK sequence.
> 
> 
> Thanks,
> -Jiangning
> 
> 
> 
> 
> 
> 2014-04-09 13:50 GMT+08:00 Hal Finkel < hfinkel at anl.gov > :
> 
> 
> 
> ----- Original Message -----
> > From: "Jiangning Liu" < liujiangning1 at gmail.com >
> > To: "Zhaoshi" < zhaoshiz at codeaurora.org >
> > Cc: " llvm-commits at cs.uiuc.edu for LLVM" < llvm-commits at cs.uiuc.edu
> > >
> > Sent: Wednesday, April 9, 2014 12:30:25 AM
> > Subject: Re: [Patch] [AArch64] Implement getMaximumUnrollFactor()
> > 
> > 
> > 
> > 
> > Hi Zhaoshi,
> > 
> > 
> > 
> > +;CHECK-LABEL: array_add
> > +;CHECK: load <4 x i32>
> > +;CHECK: load <4 x i32>
> > +;CHECK: load <4 x i32>
> > +;CHECK: load <4 x i32>
> > +;CHECK: add nsw <4 x i32>
> > +;CHECK: add nsw <4 x i32>
> > +;CHECK: store <4 x i32>
> > +;CHECK: store <4 x i32>
> > +;CHECK: ret
> > 
> > 
> > Since we don't really have out-of-order CHECK,
> 
> Do you mean CHECK-DAG?
> 
> 
> > this CHECK ordering
> > could fail after loop unrolling in theory, right?
> 
> FWIW, I think that the form above is better because it makes it clear 
> that you're looking for the vectorizer's interleaved unrolling (and 
> not the concatenation unrolling from the generic unroller).
> 
> -Hal
> 
> 
> 
> > Maybe simply
> > checking there are only two stores like below is enough?
> > 
> > 
> > 
> > ;CHECK: store <4 x i32>
> > ;CHECK: store <4 x i32>
> > ;CHECK-NOT: store
> > 
> > 
> > Thanks,
> > -Jiangning
> > 
> > 
> > 
> > 
> > 
> > 2014-04-08 9:26 GMT+08:00 < zhaoshiz at codeaurora.org > :
> > 
> > 
> > Hello,
> > 
> > This patch allows vectorized loops to be unrolled by a factor of 2 
> > on AArch64. Please help review
> > 
> > Thanks,
> > Zhaoshi
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> > 
> > 
> > 
> > 
> > 
> > --
> > 
> > Thanks,
> > -Jiangning
> > _______________________________________________
> > 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
> 
> 
> 
> 
> --
> 
> Thanks,
> -Jiangning

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





More information about the llvm-commits mailing list