<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 - Usage of isKnownWindowsMSVCEnvironment in LLVM CodeGen causes issues for IR without an environment"
href="https://bugs.llvm.org/show_bug.cgi?id=42491">42491</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Usage of isKnownWindowsMSVCEnvironment in LLVM CodeGen causes issues for IR without an environment
</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>Windows NT
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Common Code Generator Code
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rnk@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Most tools (clang, llc, etc) normalize triples passed to them on the command
line. This mainly has the effect of defaulting in the "msvc" environment when a
triple like "x86_64-pc-win32" is passed, to produce "x86_64-pc-windows-msvc".
However, llc doesn't normalize triples from IR files, so the behavior between
an input with a triple and using the same input on the command line differs. We
use this triple predicate in a few places:
$ git grep isKnownWindowsMSVCEnvironment ../llvm
../llvm/include/llvm/ADT/Triple.h: bool isKnownWindowsMSVCEnvironment() const
{
../llvm/include/llvm/ADT/Triple.h: return isKnownWindowsMSVCEnvironment() ||
../llvm/lib/Analysis/TargetLibraryInfo.cpp: if
(T.isKnownWindowsMSVCEnvironment()) {
../llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp: if
(getSubtargetInfo().getTargetTriple().isKnownWindowsMSVCEnvironment()) {
../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp: if
(!TT.isKnownWindowsMSVCEnvironment())
../llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp: if
(T.isKnownWindowsMSVCEnvironment() || T.isWindowsItaniumEnvironment()) {
../llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp: if
(T.isKnownWindowsMSVCEnvironment() || T.isWindowsItaniumEnvironment()) {
../llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp: if
(!T.isKnownWindowsMSVCEnvironment() &&
../llvm/lib/IR/Mangler.cpp: if (TT.isKnownWindowsMSVCEnvironment())
../llvm/lib/IR/Mangler.cpp: if (TT.isKnownWindowsMSVCEnvironment())
../llvm/lib/IR/Mangler.cpp: if (!T.isKnownWindowsMSVCEnvironment())
../llvm/lib/MC/MCWinCOFFStreamer.cpp: if (T.isKnownWindowsMSVCEnvironment()) {
../llvm/lib/MC/MCWinCOFFStreamer.cpp: if (!T.isKnownWindowsMSVCEnvironment()
&& ByteAlignment > 1) {
../llvm/lib/Target/X86/X86Subtarget.h: return
TargetTriple.isKnownWindowsMSVCEnvironment();
Mainly, a user reported that the storage class of __real@XXX constant pool
entries was incorrect when they used llc, but not clang, which overrides the
module triple.</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>