[llvm] r267974 - Fix build by casting to the proper int type.

Ivan Krasin via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 19:09:58 PDT 2016


Author: krasin
Date: Thu Apr 28 21:09:57 2016
New Revision: 267974

URL: http://llvm.org/viewvc/llvm-project?rev=267974&view=rev
Log:
Fix build by casting to the proper int type.

Reviewers: eugenis

Differential Revision: http://reviews.llvm.org/D19706

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp?rev=267974&r1=267973&r2=267974&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/MemorySanitizer.cpp Thu Apr 28 21:09:57 2016
@@ -2137,7 +2137,7 @@ struct MemorySanitizerVisitor : public I
   // Given a vector, extract its first element, and return all
   // zeroes if it is zero, and all ones otherwise.
   Value *LowerElementShadowExtend(IRBuilder<> &IRB, Value *S, Type *T) {
-    Value *S1 = IRB.CreateExtractElement(S, (int)0);
+    Value *S1 = IRB.CreateExtractElement(S, (uint64_t)0);
     Value *S2 = IRB.CreateICmpNE(S1, getCleanShadow(S1));
     return CreateShadowCast(IRB, S2, T, /* Signed */ true);
   }




More information about the llvm-commits mailing list