@@ -2722,7 +2722,6 @@ InstructionCost VPWidenMemoryRecipe::computeCost(ElementCount VF,
2722
2722
}
2723
2723
2724
2724
void VPWidenLoadRecipe::execute (VPTransformState &State) {
2725
- auto *LI = cast<LoadInst>(&Ingredient);
2726
2725
2727
2726
Type *ScalarDataTy = getLoadStoreType (&Ingredient);
2728
2727
auto *DataTy = VectorType::get (ScalarDataTy, State.VF );
@@ -2752,7 +2751,7 @@ void VPWidenLoadRecipe::execute(VPTransformState &State) {
2752
2751
NewLI = Builder.CreateAlignedLoad (DataTy, Addr, Alignment, " wide.load" );
2753
2752
}
2754
2753
// Add metadata to the load, but setVectorValue to the reverse shuffle.
2755
- State.addMetadata (NewLI, LI );
2754
+ State.addMetadata (NewLI, cast<LoadInst>(&Ingredient) );
2756
2755
if (Reverse)
2757
2756
NewLI = Builder.CreateVectorReverse (NewLI, " reverse" );
2758
2757
State.set (this , NewLI);
@@ -2780,7 +2779,6 @@ static Instruction *createReverseEVL(IRBuilderBase &Builder, Value *Operand,
2780
2779
}
2781
2780
2782
2781
void VPWidenLoadEVLRecipe::execute (VPTransformState &State) {
2783
- auto *LI = cast<LoadInst>(&Ingredient);
2784
2782
2785
2783
Type *ScalarDataTy = getLoadStoreType (&Ingredient);
2786
2784
auto *DataTy = VectorType::get (ScalarDataTy, State.VF );
@@ -2812,7 +2810,7 @@ void VPWidenLoadEVLRecipe::execute(VPTransformState &State) {
2812
2810
}
2813
2811
NewLI->addParamAttr (
2814
2812
0 , Attribute::getWithAlignment (NewLI->getContext (), Alignment));
2815
- State.addMetadata (NewLI, LI );
2813
+ State.addMetadata (NewLI, cast<LoadInst>(&Ingredient) );
2816
2814
Instruction *Res = NewLI;
2817
2815
if (isReverse ())
2818
2816
Res = createReverseEVL (Builder, Res, EVL, " vp.reverse" );
@@ -2855,8 +2853,6 @@ void VPWidenLoadEVLRecipe::print(raw_ostream &O, const Twine &Indent,
2855
2853
#endif
2856
2854
2857
2855
void VPWidenStoreRecipe::execute (VPTransformState &State) {
2858
- auto *SI = cast<StoreInst>(&Ingredient);
2859
-
2860
2856
VPValue *StoredVPValue = getStoredValue ();
2861
2857
bool CreateScatter = !isConsecutive ();
2862
2858
const Align Alignment = getLoadStoreAlignment (&Ingredient);
@@ -2888,7 +2884,7 @@ void VPWidenStoreRecipe::execute(VPTransformState &State) {
2888
2884
NewSI = Builder.CreateMaskedStore (StoredVal, Addr, Alignment, Mask);
2889
2885
else
2890
2886
NewSI = Builder.CreateAlignedStore (StoredVal, Addr, Alignment);
2891
- State.addMetadata (NewSI, SI );
2887
+ State.addMetadata (NewSI, cast<StoreInst>(&Ingredient) );
2892
2888
}
2893
2889
2894
2890
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
@@ -2900,7 +2896,6 @@ void VPWidenStoreRecipe::print(raw_ostream &O, const Twine &Indent,
2900
2896
#endif
2901
2897
2902
2898
void VPWidenStoreEVLRecipe::execute (VPTransformState &State) {
2903
- auto *SI = cast<StoreInst>(&Ingredient);
2904
2899
2905
2900
VPValue *StoredValue = getStoredValue ();
2906
2901
bool CreateScatter = !isConsecutive ();
@@ -2935,7 +2930,7 @@ void VPWidenStoreEVLRecipe::execute(VPTransformState &State) {
2935
2930
}
2936
2931
NewSI->addParamAttr (
2937
2932
1 , Attribute::getWithAlignment (NewSI->getContext (), Alignment));
2938
- State.addMetadata (NewSI, SI );
2933
+ State.addMetadata (NewSI, cast<StoreInst>(&Ingredient) );
2939
2934
}
2940
2935
2941
2936
InstructionCost VPWidenStoreEVLRecipe::computeCost (ElementCount VF,
0 commit comments