[llvm] [RISCV] Don't set AVL if only zeroness is demanded (PR #74049)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 12 00:24:41 PST 2023
================
@@ -1086,6 +1095,14 @@ void RISCVInsertVSETVLI::transferBefore(VSETVLIInfo &Info,
IncomingInfo.getTailAgnostic(),
(Demanded.MaskPolicy ? IncomingInfo : Info).getMaskAgnostic() ||
IncomingInfo.getMaskAgnostic());
+
+ // If we only knew the sew/lmul ratio previously, replace the VTYPE but keep
----------------
lukel97 wrote:
We have to handle the case where the AVL might be preserved so we can't bail before the AVL gets set on line 1084. We could maybe do an early exit after that though, before we set VTYPE.
As a side note, this is a bit awkward because calling `setVTYPE` isn't enough to clear the hasSEWLMULRatioOnly bit. Hence why we need to copy over incoming info.
https://github.com/llvm/llvm-project/pull/74049
More information about the llvm-commits
mailing list