[llvm] [VPlan] Compute scalar cost based on VPlan0 instead of legacy CM. (PR #196845)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 12 02:21:09 PDT 2026
================
@@ -1077,12 +1076,14 @@ InstructionCost VPRecipeWithIRFlags::getCostForRecipeWithOpcode(
case Instruction::Xor: {
// Certain instructions can be cheaper if they have a constant second
// operand. One example of this are shifts on x86.
- VPValue *RHS = getOperand(1);
- TargetTransformInfo::OperandValueInfo RHSInfo = Ctx.getOperandInfo(RHS);
-
- if (RHSInfo.Kind == TargetTransformInfo::OK_AnyValue &&
- getOperand(1)->isDefinedOutsideLoopRegions())
- RHSInfo.Kind = TargetTransformInfo::OK_UniformValue;
+ TargetTransformInfo::OperandValueInfo RHSInfo = {
+ TargetTransformInfo::OK_AnyValue, TargetTransformInfo::OP_None};
----------------
lukel97 wrote:
I think this is the same as the default constructor
```suggestion
TargetTransformInfo::OperandValueInfo RHSInfo;
```
https://github.com/llvm/llvm-project/pull/196845
More information about the llvm-commits
mailing list