[PATCH] D136544: [SLP] For vectorizing chains in basic block, decide order of PHI nodes based on their result use.

krishna chaitanya sankisa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 10:13:39 PDT 2022


skc7 added inline comments.


================
Comment at: llvm/test/Transforms/SLPVectorizer/AMDGPU/phi-result-use-order.ll:76
 ; CHECK-NEXT:    [[B3:%.*]] = extractelement <4 x half> [[IN2]], i64 3
-; CHECK-NEXT:    [[TMP4:%.*]] = insertelement <2 x half> poison, half [[B1]], i32 0
-; CHECK-NEXT:    [[TMP5:%.*]] = insertelement <2 x half> [[TMP4]], half [[B0]], i32 1
+; CHECK-NEXT:    [[TMP4:%.*]] = insertelement <2 x half> poison, half [[B0]], i32 0
+; CHECK-NEXT:    [[TMP5:%.*]] = insertelement <2 x half> [[TMP4]], half [[B1]], i32 1
----------------
ABataev wrote:
> skc7 wrote:
> > ABataev wrote:
> > > Do I understand it correct that you're trying to avoid reversing here and above?
> > Yes, the order here is dependent on the order of phinodes currently. 
> Then you need to do a bit different thing than you're doing. You need to extend the analysis in  BoUpSLP::getReorderingData to check that the buildvector sequence is built in the identity order.
Sorting of phis happen using PHICompare before building the tree and entries. Do we need to extend getReorderingData() for phis? And again do the analysis on the initially sorted phis from the tree entry.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136544/new/

https://reviews.llvm.org/D136544



More information about the llvm-commits mailing list