OSDN Git Service

[inline asm] dot operator while using imm generates wrong ir + asm - llvm part
authorMarina Yatsina <marina.yatsina@intel.com>
Mon, 26 Jun 2017 16:03:42 +0000 (16:03 +0000)
committerMarina Yatsina <marina.yatsina@intel.com>
Mon, 26 Jun 2017 16:03:42 +0000 (16:03 +0000)
Inline asm dot operator while using imm generates wrong ir and asm

This also fixes bugzilla 32987:
https://bugs.llvm.org//show_bug.cgi?id=32987

The clang part of the review that contains the test can be found here:
https://reviews.llvm.org/D33040

commit on behald of zizhar

Differential Revision:
https://reviews.llvm.org/D33039

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306300 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/AsmParser/X86AsmParser.cpp

index e5d3209..d30cc72 100644 (file)
@@ -1705,8 +1705,7 @@ bool X86AsmParser::ParseIntelDotOperator(const MCExpr *Disp,
   if (isParsingInlineAsm() && Tok.is(AsmToken::Identifier)) {
     SMLoc Loc = SMLoc::getFromPointer(DotDispStr.data());
     unsigned Len = DotDispStr.size();
-    unsigned Val = OrigDispVal + DotDispVal;
-    InstInfo->AsmRewrites->emplace_back(AOK_DotOperator, Loc, Len, Val);
+    InstInfo->AsmRewrites->emplace_back(AOK_DotOperator, Loc, Len, DotDispVal);
   }
 
   NewDisp = MCConstantExpr::create(OrigDispVal + DotDispVal, getContext());