Skip to content

Conversation

rampitec
Copy link
Collaborator

Needed for future patch to access vector as an integer mask.

Needed for future patch to access vector as an integer mask.
@rampitec rampitec requested review from akyrtzi and Sisyph July 15, 2024 18:47
@llvmbot
Copy link
Member

llvmbot commented Jul 15, 2024

@llvm/pr-subscribers-llvm-adt

Author: Stanislav Mekhanoshin (rampitec)

Changes

Needed for future patch to access vector as an integer mask.


Full diff: https://github.com/llvm/llvm-project/pull/98944.diff

1 Files Affected:

  • (modified) llvm/include/llvm/ADT/PackedVector.h (+2)
diff --git a/llvm/include/llvm/ADT/PackedVector.h b/llvm/include/llvm/ADT/PackedVector.h
index b448685ab6163..e837e140c03fc 100644
--- a/llvm/include/llvm/ADT/PackedVector.h
+++ b/llvm/include/llvm/ADT/PackedVector.h
@@ -141,6 +141,8 @@ class PackedVector : public PackedVectorBase<T, BitNum, BitVectorTy,
     Bits |= RHS.Bits;
     return *this;
   }
+
+  operator BitVectorTy() const { return Bits; }
 };
 
 // Leave BitNum=0 undefined.

Copy link
Contributor

@akyrtzi akyrtzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rampitec rampitec merged commit 466c1b6 into llvm:main Jul 15, 2024
@rampitec rampitec deleted the packedvector-raw-bits branch July 15, 2024 21:35
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
Summary: Needed for future patch to access vector as an integer mask.

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60251582
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants