vcpop and vfirst are still useful when VL=0.
vcpop equivalents to li 0 and vfirst equivalents to li -1,
since no mask elements are active.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This should be done as a DAGCombine not isel. You want the constant folding to enable other optimizations.
Even better would be instcombine so we can fold away branches. SelectionDAG can’t remove a branch even if the condition becomes constant.
You can use isNullConstant(VL)