<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Evgeniy,<div class=""><br class=""></div><div class="">This commit is causing a test failure on Darwin:</div><span class="">cfi-devirt :: anon-namespace.cpp<br class=""></span><span class=""><br class=""></span><span class="">Assertion failed: ((SymbolContents == SymContentsUnset || SymbolContents == SymContentsOffset) && "Cannot get offset for a common/variable symbol"), function getOffset, file /Users/buildslave/jenkins/sharedspace/phase1@2/llvm/include/llvm/MC/MCSymbol.h, line 323.<br class=""></span><span class=""><br class="">Do you have time to look at this today? If not, would you mind reverting to unblock our bots for the weekend?</span><div class=""><br class=""></div><div class="">Bot: <a href="http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/32075" class="">http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/32075</a><br class=""><div class=""><span class=""><br class=""></span></div><div class=""><span class="">thanks,</span></div><div class=""><span class="">vedant<br class=""></span><div class=""><font color="#ffffff" face="monospace" size="2" class=""><span style="white-space: pre-wrap; background-color: rgb(255, 0, 0);" class=""><br class=""></span></font><div><blockquote type="cite" class=""><div class="">On Jun 2, 2017, at 11:45 AM, Evgeniy Stepanov via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Author: eugenis<br class="">Date: Fri Jun  2 13:45:14 2017<br class="">New Revision: 304582<br class=""><br class="">URL: <a href="http://llvm.org/viewvc/llvm-project?rev=304582&view=rev" class="">http://llvm.org/viewvc/llvm-project?rev=304582&view=rev</a><br class="">Log:<br class="">[CFI] Remove LinkerSubsectionsViaSymbols.<br class=""><br class="">Since D17854 LinkerSubsectionsViaSymbols is unnecessary.<br class=""><br class="">It is interfering with ThinLTO implementation of CFI-ICall, where<br class="">the aliases used on the !LinkerSubsectionsViaSymbols branch are<br class="">needed to export jump tables to ThinLTO backends.<br class=""><br class="">Modified:<br class="">    llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp<br class="">    llvm/trunk/test/Transforms/LowerTypeTests/simple.ll<br class=""><br class="">Modified: llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp?rev=304582&r1=304581&r2=304582&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp?rev=304582&r1=304581&r2=304582&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp (original)<br class="">+++ llvm/trunk/lib/Transforms/IPO/LowerTypeTests.cpp Fri Jun  2 13:45:14 2017<br class="">@@ -235,7 +235,6 @@ class LowerTypeTestsModule {<br class="">   ModuleSummaryIndex *ExportSummary;<br class="">   const ModuleSummaryIndex *ImportSummary;<br class=""><br class="">-  bool LinkerSubsectionsViaSymbols;<br class="">   Triple::ArchType Arch;<br class="">   Triple::OSType OS;<br class="">   Triple::ObjectFormatType ObjectFormat;<br class="">@@ -475,13 +474,9 @@ void LowerTypeTestsModule::allocateByteA<br class="">     // Create an alias instead of RAUW'ing the gep directly. On x86 this ensures<br class="">     // that the pc-relative displacement is folded into the lea instead of the<br class="">     // test instruction getting another displacement.<br class="">-    if (LinkerSubsectionsViaSymbols) {<br class="">-      BAI->ByteArray->replaceAllUsesWith(GEP);<br class="">-    } else {<br class="">-      GlobalAlias *Alias = GlobalAlias::create(<br class="">-          Int8Ty, 0, GlobalValue::PrivateLinkage, "bits", GEP, &M);<br class="">-      BAI->ByteArray->replaceAllUsesWith(Alias);<br class="">-    }<br class="">+    GlobalAlias *Alias = GlobalAlias::create(<br class="">+        Int8Ty, 0, GlobalValue::PrivateLinkage, "bits", GEP, &M);<br class="">+    BAI->ByteArray->replaceAllUsesWith(Alias);<br class="">     BAI->ByteArray->eraseFromParent();<br class="">   }<br class=""><br class="">@@ -502,7 +497,7 @@ Value *LowerTypeTestsModule::createBitSe<br class="">     return createMaskedBitTest(B, TIL.InlineBits, BitOffset);<br class="">   } else {<br class="">     Constant *ByteArray = TIL.TheByteArray;<br class="">-    if (!LinkerSubsectionsViaSymbols && AvoidReuse && !ImportSummary) {<br class="">+    if (AvoidReuse && !ImportSummary) {<br class="">       // Each use of the byte array uses a different alias. This makes the<br class="">       // backend less likely to reuse previously computed byte array addresses,<br class="">       // improving the security of the CFI mechanism based on this pass.<br class="">@@ -680,17 +675,13 @@ void LowerTypeTestsModule::buildBitSetsF<br class="">                                       ConstantInt::get(Int32Ty, I * 2)};<br class="">     Constant *CombinedGlobalElemPtr = ConstantExpr::getGetElementPtr(<br class="">         NewInit->getType(), CombinedGlobal, CombinedGlobalIdxs);<br class="">-    if (LinkerSubsectionsViaSymbols) {<br class="">-      GV->replaceAllUsesWith(CombinedGlobalElemPtr);<br class="">-    } else {<br class="">-      assert(GV->getType()->getAddressSpace() == 0);<br class="">-      GlobalAlias *GAlias = GlobalAlias::create(NewTy->getElementType(I * 2), 0,<br class="">-                                                GV->getLinkage(), "",<br class="">-                                                CombinedGlobalElemPtr, &M);<br class="">-      GAlias->setVisibility(GV->getVisibility());<br class="">-      GAlias->takeName(GV);<br class="">-      GV->replaceAllUsesWith(GAlias);<br class="">-    }<br class="">+    assert(GV->getType()->getAddressSpace() == 0);<br class="">+    GlobalAlias *GAlias =<br class="">+        GlobalAlias::create(NewTy->getElementType(I * 2), 0, GV->getLinkage(),<br class="">+                            "", CombinedGlobalElemPtr, &M);<br class="">+    GAlias->setVisibility(GV->getVisibility());<br class="">+    GAlias->takeName(GV);<br class="">+    GV->replaceAllUsesWith(GAlias);<br class="">     GV->eraseFromParent();<br class="">   }<br class=""> }<br class="">@@ -1166,8 +1157,7 @@ void LowerTypeTestsModule::buildBitSetsF<br class="">             ArrayRef<Constant *>{ConstantInt::get(IntPtrTy, 0),<br class="">                                  ConstantInt::get(IntPtrTy, I)}),<br class="">         F->getType());<br class="">-    if (LinkerSubsectionsViaSymbols || F->isDeclarationForLinker()) {<br class="">-<br class="">+    if (F->isDeclarationForLinker()) {<br class="">       if (F->isWeakForLinker())<br class="">         replaceWeakDeclarationWithJumpTablePtr(F, CombinedGlobalElemPtr);<br class="">       else<br class="">@@ -1302,7 +1292,6 @@ LowerTypeTestsModule::LowerTypeTestsModu<br class="">     : M(M), ExportSummary(ExportSummary), ImportSummary(ImportSummary) {<br class="">   assert(!(ExportSummary && ImportSummary));<br class="">   Triple TargetTriple(M.getTargetTriple());<br class="">-  LinkerSubsectionsViaSymbols = TargetTriple.isMacOSX();<br class="">   Arch = TargetTriple.getArch();<br class="">   OS = TargetTriple.getOS();<br class="">   ObjectFormat = TargetTriple.getObjectFormat();<br class=""><br class="">Modified: llvm/trunk/test/Transforms/LowerTypeTests/simple.ll<br class="">URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LowerTypeTests/simple.ll?rev=304582&r1=304581&r2=304582&view=diff" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LowerTypeTests/simple.ll?rev=304582&r1=304581&r2=304582&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/test/Transforms/LowerTypeTests/simple.ll (original)<br class="">+++ llvm/trunk/test/Transforms/LowerTypeTests/simple.ll Fri Jun  2 13:45:14 2017<br class="">@@ -1,5 +1,5 @@<br class=""> ; RUN: opt -S -lowertypetests < %s | FileCheck %s<br class="">-; RUN: opt -S -lowertypetests -mtriple=x86_64-apple-macosx10.8.0 < %s | FileCheck -check-prefix=CHECK-DARWIN %s<br class="">+; RUN: opt -S -lowertypetests -mtriple=x86_64-apple-macosx10.8.0 < %s | FileCheck %s<br class=""> ; RUN: opt -S -O3 < %s | FileCheck -check-prefix=CHECK-NODISCARD %s<br class=""><br class=""> target datalayout = "e-p:32:32"<br class="">@@ -39,20 +39,6 @@ target datalayout = "e-p:32:32"<br class=""> ; CHECK: @c = protected alias i32, getelementptr inbounds ({ i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }, { i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }* [[G]], i32 0, i32 4)<br class=""> ; CHECK: @d = alias [2 x i32], getelementptr inbounds ({ i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }, { i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }* [[G]], i32 0, i32 6)<br class=""><br class="">-; CHECK-DARWIN: @aptr = constant i32* getelementptr inbounds ({ i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }, { i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }* [[G:@[^ ]*]], i32 0, i32 0)<br class="">-@aptr = constant i32* @a<br class="">-<br class="">-; CHECK-DARWIN: @bptr = constant [63 x i32]* getelementptr inbounds ({ i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }, { i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }* [[G]], i32 0, i32 2)<br class="">-@bptr = constant [63 x i32]* @b<br class="">-<br class="">-; CHECK-DARWIN: @cptr = constant i32* getelementptr inbounds ({ i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }, { i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }* [[G]], i32 0, i32 4)<br class="">-@cptr = constant i32* @c<br class="">-<br class="">-; CHECK-DARWIN: @dptr = constant [2 x i32]* getelementptr inbounds ({ i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }, { i32, [0 x i8], [63 x i32], [4 x i8], i32, [0 x i8], [2 x i32] }* [[G]], i32 0, i32 6)<br class="">-@dptr = constant [2 x i32]* @d<br class="">-<br class="">-; CHECK-DARWIN: [[G]] = private constant<br class="">-<br class=""> ; CHECK: @bits{{[0-9]*}} = private alias i8, getelementptr inbounds ([68 x i8], [68 x i8]* [[BA]], i32 0, i32 0)<br class=""> ; CHECK: @bits.{{[0-9]*}} = private alias i8, getelementptr inbounds ([68 x i8], [68 x i8]* [[BA]], i32 0, i32 0)<br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits<br class=""></div></div></blockquote></div><br class=""></div></div></div></body></html>