From abe3295cbdf7234c9417003752801b380d2990e1 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Thu, 6 Sep 2018 10:25:59 +0000 Subject: Fix argument type in MachineInstr::hasPropertyInBundle The MCID::Flag enumeration now has more than 32 items, this means that the hasPropertyBundle argument 'Mask' can overflow. This patch changes the argument to be 64 bits instead. Patch by Mikael Nilsson. Differential Revision: https://reviews.llvm.org/D51596 llvm-svn: 341536 --- llvm/lib/CodeGen/MachineInstr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/MachineInstr.cpp') diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index d004fa9b76a..4c0d53ce9aa 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -517,7 +517,7 @@ uint16_t MachineInstr::mergeFlagsWith(const MachineInstr &Other) const { 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) { -- cgit v1.2.3