Skip to content

Commit 5d3ff20

Browse files
committed
allow p9 testing
1 parent d451b76 commit 5d3ff20

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
2730
static cl::opt<bool> VecMaskCost("ppc-vec-mask-cost",
2831
cl::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

Comments
 (0)