[PATCH] D81448: [CostModel] Unify Shuffle and InsertElement Costs

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 10 04:52:54 PDT 2020


samparker marked an inline comment as done.
samparker added inline comments.


================
Comment at: llvm/test/CodeGen/SystemZ/splitMove_undefReg_mverifier.ll:213
 CF254:                                            ; preds = %CF254, %CF267, %CF264, %CF240
-  %Shuff113 = shufflevector <2 x i32> %I68, <2 x i32> zeroinitializer, <2 x i32> undef
+  %Shuff113 = shufflevector <2 x i32> %I68, <2 x i32> zeroinitializer, <2 x i32><i32 undef, i32 0>
   %I114 = insertelement <4 x i16> zeroinitializer, i16 27357, i32 3
----------------
dfukalov wrote:
> samparker wrote:
> > dfukalov wrote:
> > > If the change is refactoring, why it affects codegen test?
> > I think this instruction was just broken, the ShuffleVectorInst class hit an assert on it.
> But how it was not asserted before the change? Why change in cost model can change ShuffleVectorInst behavior in codegen test?
Well the program flow has now completely changed. I would expect a pass run by llc has queried getUserCost which now queries the ShuffleCost where it wouldn't have before. It was only accessible when called directly or when a client queried getInstructionThroughput, which are really only things that the vectorizer does, and the vectorizer wouldn't have been running on this test.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81448





More information about the llvm-commits mailing list