<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - IR PGO Instr generation error for comdat + MSVC triple"
href="https://bugs.llvm.org/show_bug.cgi?id=36120">36120</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>IR PGO Instr generation error for comdat + MSVC triple
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Miscellaneous Instrumentation passes
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jbc.engelen@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Testcase:
```
; File: irpgo.ll
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-windows-msvc"
$_D4main3fooFZi = comdat any
define i32 @_D4main3fooFZi() #0 comdat {
ret i32 42
}
attributes #0 = { uwtable }
```
Opt errors when generating IR PGO instrumentation:
`opt -pgo-instr-gen -instrprof -verify irpgo.ll -S`
The reported error is:
```
comdat global value has private linkage
[1 x i64]* @__profc__D4main3fooFZi
LLVM ERROR: Broken module found, compilation aborted!
```
Tested with LLVM 6.0.0 and LLVM trunk</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>