[PATCH] D51596: Fixed bug in MachineInstr::hasPropertyInBundle
Mikael Nilsson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 3 07:50:46 PDT 2018
mikael created this revision.
mikael added a reviewer: spatel.
Herald added a subscriber: llvm-commits.
The MCID::Flag enumeration now has more than 32 items, this means that
the hasPropertyBundle argument 'Mask' can overflow.
This patch changed the argument to be 64 bits instead.
Repository:
rL LLVM
https://reviews.llvm.org/D51596
Files:
include/llvm/CodeGen/MachineInstr.h
lib/CodeGen/MachineInstr.cpp
Index: lib/CodeGen/MachineInstr.cpp
===================================================================
--- lib/CodeGen/MachineInstr.cpp
+++ lib/CodeGen/MachineInstr.cpp
@@ -517,7 +517,7 @@
return getFlags() | Other.getFlags();
}
-bool MachineInstr::hasPropertyInBundle(unsigned Mask, QueryType Type) const {
+bool MachineInstr::hasPropertyInBundle(uint64_t Mask, QueryType Type) const {
assert(!isBundledWithPred() && "Must be called on bundle header");
for (MachineBasicBlock::const_instr_iterator MII = getIterator();; ++MII) {
if (MII->getDesc().getFlags() & Mask) {
Index: include/llvm/CodeGen/MachineInstr.h
===================================================================
--- include/llvm/CodeGen/MachineInstr.h
+++ include/llvm/CodeGen/MachineInstr.h
@@ -1550,7 +1550,7 @@
void AddRegOperandsToUseLists(MachineRegisterInfo&);
/// Slow path for hasProperty when we're dealing with a bundle.
- bool hasPropertyInBundle(unsigned Mask, QueryType Type) const;
+ bool hasPropertyInBundle(uint64_t Mask, QueryType Type) const;
/// Implements the logic of getRegClassConstraintEffectForVReg for the
/// this MI and the given operand index \p OpIdx.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51596.163718.patch
Type: text/x-patch
Size: 1187 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180903/b85260c3/attachment.bin>
More information about the llvm-commits
mailing list