[llvm] [LV] Check if the VF is scalar by VFRange instead of VPlan in `handleUncountableEarlyExit` NFC. (PR #135294)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 14 13:24:55 PDT 2025


https://github.com/fhahn commented:

LGTM, thanks.

Please update the description/title before landing. Could also drop `instead of VPlan ` to have a more compact title.

> > This will need to clamp the range to only contain the scalar VF, otherwise we may end up with a plan that is missing the extract and VF > 1
> 
> That request means the PR would no longer be NFC, right? Is it possible to construct a test for this case? (also 'NFC' would need removing from the title)

I am not sure if it is possible to construct one at the moment, due to various restrictions for early-exit vectorization. Not generating the extract for a vector VF included in the range would lead to a silent mis-compile, as without clamping the range we cannot guarantee that the vector VF would not be selected.

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


More information about the llvm-commits mailing list