[PATCH] D157062: [ValueTracking] Improve the coverage of isKnownToBeAPowerOfTwo for vscale
Allen zhong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 3 18:11:53 PDT 2023
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9c837b7d0e2e: [ValueTracking] Improve the coverage of isKnownToBeAPowerOfTwo for vscale (authored by Allen).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157062/new/
https://reviews.llvm.org/D157062
Files:
llvm/lib/Analysis/ValueTracking.cpp
Index: llvm/lib/Analysis/ValueTracking.cpp
===================================================================
--- llvm/lib/Analysis/ValueTracking.cpp
+++ llvm/lib/Analysis/ValueTracking.cpp
@@ -2018,7 +2018,8 @@
return true;
if (match(V, m_Power2()))
return true;
- if (Q.CxtI && match(V, m_VScale())) {
+ if (Q.CxtI &&
+ (match(V, m_VScale()) || match(V, m_Shl(m_VScale(), m_Value())))) {
const Function *F = Q.CxtI->getFunction();
// The vscale_range indicates vscale is a power-of-two.
return F->hasFnAttribute(Attribute::VScaleRange);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157062.547074.patch
Type: text/x-patch
Size: 579 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230804/7b4c47f8/attachment.bin>
More information about the llvm-commits
mailing list