aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-01-10 18:42:44 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-01-10 18:42:44 +0000
commitf0615c71fae8bf7d7aa81629fa92643d8cf65be7 (patch)
treefff17d2a03560e2e8dbcbb733f955887a4cd62c7 /llvm/lib/CodeGen/MachineInstr.cpp
parent4162c2d31ba23fcda2e8184b12f47590c5f16920 (diff)
downloadllvm-f0615c71fae8bf7d7aa81629fa92643d8cf65be7.zip
llvm-f0615c71fae8bf7d7aa81629fa92643d8cf65be7.tar.gz
llvm-f0615c71fae8bf7d7aa81629fa92643d8cf65be7.tar.bz2
Allow hasProperty() to be called on bundle-internal instructions.
When calling hasProperty() on an instruction inside a bundle, it should always behave as if IgnoreBundle was passed, and just return properties for the current instruction. Only attempt to aggregate bundle properties whan asked about the bundle header. The assertion fires on existing ARM test cases without this fix. llvm-svn: 172082
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index cdf46b6..df82a17a 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -752,6 +752,7 @@ void MachineInstr::addMemOperand(MachineFunction &MF,
}
bool MachineInstr::hasPropertyInBundle(unsigned Mask, QueryType Type) const {
+ assert(!isBundledWithPred() && "Must be called on bundle header");
for (MachineBasicBlock::const_instr_iterator MII = this;; ++MII) {
if (MII->getDesc().getFlags() & Mask) {
if (Type == AnyInBundle)