]> granicus.if.org Git - llvm/commitdiff
MCInstrDesc: this fixes an issue setting/getting member Flags, which
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Wed, 14 Sep 2016 14:32:17 +0000 (14:32 +0000)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Wed, 14 Sep 2016 14:32:17 +0000 (14:32 +0000)
is an uint64_t. However, getter function getFlags returned an unsigned,
and in function hasProperty (1 << MCFlag) was used instead of (1ULL << MCFlag).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@281483 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineInstr.h
include/llvm/MC/MCInstrDesc.h

index 3870a1ffc9ca72e1b5edf6a1d1082454127af141..3da62a3378125af65427661a4007b0c14301ec4c 100644 (file)
@@ -391,10 +391,10 @@ public:
   bool hasProperty(unsigned MCFlag, QueryType Type = AnyInBundle) const {
     // Inline the fast path for unbundled or bundle-internal instructions.
     if (Type == IgnoreBundle || !isBundled() || isBundledWithPred())
-      return getDesc().getFlags() & (1 << MCFlag);
+      return getDesc().getFlags() & (1ULL << MCFlag);
 
     // If this is the first instruction in a bundle, take the slow path.
-    return hasPropertyInBundle(1 << MCFlag, Type);
+    return hasPropertyInBundle(1ULL << MCFlag, Type);
   }
 
   /// Return true if this instruction can have a variable number of operands.
index d7887efbbf678e76f0b90d3dc362625c3fb91974..340d8253b8c99f5506195b9c64f57fb668f6ad64 100644 (file)
@@ -216,7 +216,7 @@ public:
   unsigned getNumDefs() const { return NumDefs; }
 
   /// \brief Return flags of this instruction.
-  unsigned getFlags() const { return Flags; }
+  uint64_t getFlags() const { return Flags; }
 
   /// \brief Return true if this instruction can have a variable number of
   /// operands.  In this case, the variable operands will be after the normal