]> granicus.if.org Git - llvm/commitdiff
Fix "left shift of negative value -1" introduced by r294805
authorVitaly Buka <vitalybuka@google.com>
Sat, 11 Feb 2017 12:44:03 +0000 (12:44 +0000)
committerVitaly Buka <vitalybuka@google.com>
Sat, 11 Feb 2017 12:44:03 +0000 (12:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294843 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Hexagon/HexagonHardwareLoops.cpp

index e477dcc0f64a8019c5cb26477d664daa5e022722..07e05c4b18dd505ec65e5cf14e6d30f4a39ffb10 100644 (file)
@@ -1511,7 +1511,7 @@ bool HexagonHardwareLoops::checkForImmediate(const MachineOperand &MO,
       int64_t V1, V2;
       if (!checkForImmediate(S1, V1) || !checkForImmediate(S2, V2))
         return false;
-      TV = V2 | (V1 << 32);
+      TV = V2 | (static_cast<uint64_t>(V1) << 32);
       break;
     }
     case TargetOpcode::REG_SEQUENCE: {