[llvm] [LV] Set the underlying value of VPInstruction::Reverse (PR #173856)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 30 08:19:06 PST 2025


Mel-Chen wrote:

@alexey-bataev @fhahn I think https://github.com/llvm/llvm-project/pull/125640 can address this issue. However, it involves more changes, so it’s unclear whether it can land soon.

For now, I have an alternative approach that doesn’t require setting the underlying instruction. We could collect exit recipes when constructing VPCostContext, and add VPCostContext::skipCostComputation(VPRecipeBase *R, bool IsVector) to indicate that all exit recipes should be skipped. This way, VPRecipeBase::cost can ignore reverse recipes that serve as exit instructions.

What do you think?

https://github.com/llvm/llvm-project/pull/173856


More information about the llvm-commits mailing list