diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-06-30 21:15:52 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-06-30 21:15:52 +0000 |
commit | cfe5254cd34d9414d9f6b8aa02dc1239d71a703f (patch) | |
tree | 72d287c97fad89c6abf4b1268b1adccbc314c96f /include/llvm/CodeGen | |
parent | 77a2c372face15a302f4c9e5cb9acc035b8b3bd3 (diff) | |
download | external_llvm-cfe5254cd34d9414d9f6b8aa02dc1239d71a703f.zip external_llvm-cfe5254cd34d9414d9f6b8aa02dc1239d71a703f.tar.gz external_llvm-cfe5254cd34d9414d9f6b8aa02dc1239d71a703f.tar.bz2 |
Create a isFullCopy predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134189 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 07a14cf..788d149 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -278,6 +278,9 @@ public: bool isCopy() const { return getOpcode() == TargetOpcode::COPY; } + bool isFullCopy() const { + return isCopy() && !getOperand(0).getSubReg() && !getOperand(1).getSubReg(); + } /// isCopyLike - Return true if the instruction behaves like a copy. /// This does not include native copy instructions. |