make an array of constants explicitly const
authorSanjay Patel <spatel@rotateright.com>
Thu, 12 Mar 2015 16:29:58 +0000 (16:29 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 12 Mar 2015 16:29:58 +0000 (16:29 +0000)
Suggested by Craig Topper in D8184.

This goes with r232047.

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

lib/IR/AutoUpgrade.cpp

index fab6915a7a72eb5d0ac56d2a4fae4787222bbe6c..04852dfaf982421a406d32799025642a5961f99c 100644 (file)
@@ -568,7 +568,7 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) {
           CI->getArgOperand(0),
           PointerType::getUnqual(VectorType::get(Type::getInt64Ty(C), 2)));
       Value *Load = Builder.CreateLoad(Op);
-      int Idxs[4] = { 0, 1, 0, 1 };
+      const int Idxs[4] = { 0, 1, 0, 1 };
       Rep = Builder.CreateShuffleVector(Load, UndefValue::get(Load->getType()),
                                         Idxs);
     } else if (Name == "llvm.x86.sse2.psll.dq") {