llvm-project
d18eca0c - [LLVM][LangRef] Remove "n > 0" restriction from get.active.lanes.mask. (#152140)

Commit
59 days ago
[LLVM][LangRef] Remove "n > 0" restriction from get.active.lanes.mask. (#152140) The specification for get.active.lanes.mask says a limit value of zero results in poison. This seems like an artificial restriction and means you cannot use the intrinsic to create minimal loops of the form: ``` foo(int count, ....) { int i = 0; while (mask = get.active.lane.mask(i, count)) { ; do work i += count_bits(mask); } } ``` I cannot see any code that generates poison in this case, in fact ConstantFoldFixedVectorCall returns the logical result (i.e. an all false vector). There are also cases like `can_overflow_i64_induction_var` in sve-tail-folding-overflow-checks.ll that look broken by the current definition? for the case when "%N <= vscale * 4".
Parents
Loading