diff options
author | Craig Topper <craig.topper@intel.com> | 2017-12-06 17:54:07 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2017-12-06 17:54:07 +0000 |
commit | a7566ef3efff939ff93603d4fe9fabd3306b6d87 (patch) | |
tree | ce823d2a5da4658be35a4635b99c248da98ed625 /lib/IR | |
parent | 138b4f2021616956704bb8d9839abb1ce17bb8c9 (diff) |
[X86] Attempt to fix a ubsan failure in the autoupgrade of kunpck intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319911 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r-- | lib/IR/AutoUpgrade.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/IR/AutoUpgrade.cpp b/lib/IR/AutoUpgrade.cpp index 76af9a16f0c..3a364211a50 100644 --- a/lib/IR/AutoUpgrade.cpp +++ b/lib/IR/AutoUpgrade.cpp @@ -1068,7 +1068,7 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) { CI->getArgOperand(1)); } else if (IsX86 && (Name.startswith("avx512.kunpck"))) { uint64_t Shift = CI->getType()->getScalarSizeInBits() / 2; - uint64_t And = (1 << Shift) - 1; + uint64_t And = (1ULL << Shift) - 1; Value* LowBits = Builder.CreateAnd(CI->getArgOperand(0), And); Value* HighBits = Builder.CreateShl(CI->getArgOperand(1), Shift); Rep = Builder.CreateOr(LowBits, HighBits); |