diff options
author | Chris Lattner <sabre@nondot.org> | 2006-04-08 04:04:54 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-04-08 04:04:54 +0000 |
commit | fa495844a6b78db0d8e39ca4fe94f4b2a76aad81 (patch) | |
tree | c46d9c409edec34a78f03a050e8d04b4a5e052d9 | |
parent | d25db20f1a4e2ae10e22da6a1ca24d7ac6d87b16 (diff) |
Add methods to check insert/extract element instructions for validity
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27522 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Instructions.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 3922cd3e9f..eecc32c533 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -738,6 +738,10 @@ public: ExtractElementInst(Value *Vec, Value *Idx, const std::string &Name, BasicBlock *InsertAtEnd); + /// isValidOperands - Return true if an extractelement instruction can be + /// formed with the specified operands. + static bool isValidOperands(const Value *Vec, const Value *Idx); + virtual ExtractElementInst *clone() const; virtual bool mayWriteToMemory() const { return false; } @@ -785,6 +789,11 @@ public: InsertElementInst(Value *Vec, Value *NewElt, Value *Idx, const std::string &Name, BasicBlock *InsertAtEnd); + /// isValidOperands - Return true if an insertelement instruction can be + /// formed with the specified operands. + static bool isValidOperands(const Value *Vec, const Value *NewElt, + const Value *Idx); + virtual InsertElementInst *clone() const; virtual bool mayWriteToMemory() const { return false; } @@ -832,7 +841,7 @@ public: ShuffleVectorInst(Value *V1, Value *V2, Value *Mask, const std::string &Name, BasicBlock *InsertAtEnd); - /// isValidOperands - Return true if a value shufflevector instruction can be + /// isValidOperands - Return true if a shufflevector instruction can be /// formed with the specified operands. static bool isValidOperands(const Value *V1, const Value *V2, const Value *Mask); |