[llvm] [VPlan] Constant-fold ActiveLaneMask intrinsics (PR #208852)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 02:09:45 PDT 2026
================
@@ -0,0 +1,26 @@
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --filter "active.lane.mask" --version 6
+; RUN: opt -passes=loop-vectorize -tail-folding-policy=must-fold-tail -force-tail-folding-style=data -force-vector-width=4 -disable-output -vplan-print-after=printOptimizedVPlan %s 2>&1 | FileCheck %s --check-prefix=FIXED
+; RUN: opt -passes=loop-vectorize -tail-folding-policy=must-fold-tail -force-tail-folding-style=data -force-vector-width="vscale x 4" -disable-output -vplan-print-after=printOptimizedVPlan %s 2>&1 | FileCheck %s --check-prefix=SCALABLE
+
+; We never emit fixed-vector active.lane.masks foldable to false.
+define i16 @foldable_fixed_alm(i32 %x) {
+; FIXED-LABEL: VPlan for loop in 'foldable_fixed_alm'
----------------
david-arm wrote:
I realise the test is implicitly testing that there isn't an active lane mask, but it's quite subtle and a bit confusing at first. It would be good if we could see the result of the folding in the PHI or the lane mask being used somewhere.
https://github.com/llvm/llvm-project/pull/208852
More information about the llvm-commits
mailing list