summaryrefslogtreecommitdiffstats
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)
downloadbcm5719-llvm-f0615c71fae8bf7d7aa81629fa92643d8cf65be7.tar.gz
bcm5719-llvm-f0615c71fae8bf7d7aa81629fa92643d8cf65be7.zip
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 cdf46b631f9..df82a17a2b2 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)
OpenPOWER on IntegriCloud