@@ -24,6 +24,9 @@ using namespace llvm;
2424
2525#define DEBUG_TYPE " ppctti"
2626
27+ static cl::opt<bool > Pwr9EVL (" ppc-pwr9-evl" ,
28+ cl::desc (" Allow vp.load and vp.store for pwr9" ), cl::init(false ), cl::Hidden);
29+
2730static cl::opt<bool > VecMaskCost (" ppc-vec-mask-cost" ,
2831cl::desc (" add masking cost for i1 vectors" ), cl::init(true ), cl::Hidden);
2932
@@ -1037,7 +1040,8 @@ PPCTTIImpl::getVPLegalizationStrategy(const VPIntrinsic &PI) const {
10371040 using VPLegalization = TargetTransformInfo::VPLegalization;
10381041 unsigned Directive = ST->getCPUDirective ();
10391042 VPLegalization DefaultLegalization = BaseT::getVPLegalizationStrategy (PI);
1040- if (Directive != PPC::DIR_PWR10 && Directive != PPC::DIR_PWR_FUTURE)
1043+ if (Directive != PPC::DIR_PWR10 && Directive != PPC::DIR_PWR_FUTURE &&
1044+ (!Pwr9EVL || Directive != PPC::DIR_PWR9))
10411045 return DefaultLegalization;
10421046
10431047 unsigned IID = PI.getIntrinsicID ();
@@ -1047,7 +1051,7 @@ PPCTTIImpl::getVPLegalizationStrategy(const VPIntrinsic &PI) const {
10471051 bool IsLoad = IID == Intrinsic::vp_load;
10481052 Type* VecTy = IsLoad ? PI.getType () : PI.getOperand (0 )->getType ();
10491053 EVT VT = TLI->getValueType (DL, VecTy, true );
1050- dbgs () << " &&& Typecheck " << VT << " \n " ;
1054+ // dbgs() << "&&& Typecheck " << VT << "\n";
10511055 if (VT != MVT::v2i64 && VT != MVT::v4i32 && VT != MVT::v8i16 &&
10521056 VT != MVT::v16i8)
10531057 return DefaultLegalization;
0 commit comments