[llvm-bugs] [Bug 45291] New: ValueMapper does not preserve inline assembly dialect when remapping the type
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Mar 24 06:52:49 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45291
Bug ID: 45291
Summary: ValueMapper does not preserve inline assembly dialect
when remapping the type
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: tomasz.miasko at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
Downstream bug report: https://github.com/rust-lang/rust/issues/70337
diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp
b/llvm/lib/Transforms/Utils/ValueMapper.cpp
index da68d3713b4..d6b01a12b93 100644
--- a/llvm/lib/Transforms/Utils/ValueMapper.cpp
+++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp
@@ -364,17 +364,18 @@ Value *Mapper::mapValue(const Value *V) {
if (const InlineAsm *IA = dyn_cast<InlineAsm>(V)) {
// Inline asm may need *type* remapping.
FunctionType *NewTy = IA->getFunctionType();
if (TypeMapper) {
NewTy = cast<FunctionType>(TypeMapper->remapType(NewTy));
if (NewTy != IA->getFunctionType())
V = InlineAsm::get(NewTy, IA->getAsmString(),
IA->getConstraintString(),
- IA->hasSideEffects(), IA->isAlignStack());
+ IA->hasSideEffects(), IA->isAlignStack(),
+ IA->getDialect());
}
return getVM()[V] = const_cast<Value *>(V);
}
if (const auto *MDV = dyn_cast<MetadataAsValue>(V)) {
const Metadata *MD = MDV->getMetadata();
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200324/76357884/attachment.html>
More information about the llvm-bugs
mailing list