<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This patch breaks couple of tests on a Windows buildbot.<div><br></div><div><div>Failing Tests (2):</div><div>      Clang :: CodeGenCXX/for-range.cpp</div><div>      Clang :: CodeGenCXX/global-array-destruction.cpp</div><div><br></div><div>A sample of failure (with complete path replaced with … ) is below.</div><div><br></div><div>- Fariborz</div><div><br></div><div><br></div><div><pre style="font-family: 'Courier New', courier, monotype, monospace; "><span class="stdout">Command 1 Stderr:
  C:\...\src\tools\clang\test\CodeGenCXX\global-array-destruction.cpp:59:11: error: expected string not found in input
  // CHECK: getelementptr inbounds ([2 x [3 x {{.*}}]]* @_ZGR1u, i64 1, i64 0, i64 0)
            ^
  <stdin>:327:29: note: scanning from here
   %1 = call i32 @__cxa_atexit(void (i8*)* @__cxx_global_array_dtor18, i8* null, i8* @__dso_handle) #0
                              ^
  <stdin>:339:59: note: possible intended match here
   %4 = phi %struct.T* [ getelementptr inbounds (%struct.T* getelementptr inbounds ([2 x [3 x %struct.T]]* @_ZGR1u, i32 0, i32 0, i32 0), i64 6), %1 ], [ %5, %3 ]
                                                            <br></span></pre></div><div><br></div><div><div>On Nov 7, 2013, at 2:29 PM, David Majnemer <<a href="mailto:david.majnemer@gmail.com">david.majnemer@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Author: majnemer<br>Date: Thu Nov  7 16:29:42 2013<br>New Revision: 194221<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=194221&view=rev">http://llvm.org/viewvc/llvm-project?rev=194221&view=rev</a><br>Log:<br>IR: Properly canonicalize PointerType in ConstantExpr GEPs<br><br>No additional test was needed, Other/constant-fold-gep.ll detects this<br>just fine.<br><br>Modified:<br>    llvm/trunk/lib/IR/ConstantFold.cpp<br><br>Modified: llvm/trunk/lib/IR/ConstantFold.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/ConstantFold.cpp?rev=194221&r1=194220&r2=194221&view=diff">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/ConstantFold.cpp?rev=194221&r1=194220&r2=194221&view=diff</a><br>==============================================================================<br>--- llvm/trunk/lib/IR/ConstantFold.cpp (original)<br>+++ llvm/trunk/lib/IR/ConstantFold.cpp Thu Nov  7 16:29:42 2013<br>@@ -1966,11 +1966,12 @@ static Constant *ConstantFoldGetElementP<br>         else if (VectorType *VTy = dyn_cast<VectorType>(LastTy))<br>           NumElements = VTy->getNumElements();<br><br>-        if (ConstantInt *CI = dyn_cast<ConstantInt>(Idx0)) {<br>-          int64_t Idx0Val = CI->getSExtValue();<br>-          if (NumElements > 0 && Idx0Val >= 0 &&<br>-              (uint64_t)Idx0Val < NumElements)<br>-            IsSequentialAccessInRange = true;<br>+        if (NumElements > 0) {<br>+          if (ConstantInt *CI = dyn_cast<ConstantInt>(Idx0)) {<br>+            int64_t Idx0Val = CI->getSExtValue();<br>+            if (Idx0Val >= 0 && (uint64_t)Idx0Val < NumElements)<br>+              IsSequentialAccessInRange = true;<br>+          }<br>         } else if (PointerType *PTy = dyn_cast<PointerType>(LastTy))<br>           // Only handle pointers to sized types, not pointers to functions.<br>           if (PTy->getElementType()->isSized())<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></blockquote></div><br></div></body></html>