[llvm] [ConstantFolding] Fold scalable get_active_lane_masks (PR #156659)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 3 07:58:25 PDT 2025


================
@@ -4238,6 +4238,13 @@ static Constant *ConstantFoldScalableVectorCall(
 
     return ConstantInt::getFalse(SVTy);
   }
+  case Intrinsic::get_active_lane_mask: {
----------------
david-arm wrote:

I see yeah, and as it stands the code in `ConstantFoldFixedVectorCall` is broken because it should return poison if `Op1` is zero. Once the LangRef is fixed we can always revisit this.

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


More information about the llvm-commits mailing list