[PATCH] D35202: [X86] lea rdx, [rax - one] adds one instead of subtracts when one is a symbol that has been .set (PR33667)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 02:22:07 PDT 2017


RKSimon added inline comments.


================
Comment at: lib/Target/X86/AsmParser/X86AsmParser.cpp:1517
     else
       Disp = Imm;  // An immediate displacement only.
   }
----------------
What happens to the case where these is a Disp and ImmVal but the Disp isn't a symbol ref? That drops to the Disp = Imm case and we lose the displacement?


================
Comment at: test/MC/X86/intel-syntax.s:20
+  lea rdx, [rax + number]
+  lea rdx, [number + rax]
+
----------------
RKSimon wrote:
> Interleave the CHECKs with the relevant instruction
The rest of the test file capitalizes its REGISTER - match the style?


https://reviews.llvm.org/D35202





More information about the llvm-commits mailing list