[PATCH] Fix for 9807. Avoid over-relaxation of 8-bit immediates in integer arithmetic instructions.

David Kreitzer david.l.kreitzer at intel.com
Fri Jun 26 06:38:47 PDT 2015


Hi ddunbar, rafael, mkuper,

During some code size experimentation, I observed that ~0.25% of total code size was attributable to this problem. The bug predominantly affects CMP, but I saw a few instances where it affected the other arithmetic ops like ADD, AND, etc.

I opted for this simple localized fix after considering other options that add new infrastructure to be able to tell from the MCFixup itself whether it needs to be relaxed. Note that I removed the mc-x86-disable-arith-relaxation flag, as I think it should no longer be necessary.

http://reviews.llvm.org/D10766

Files:
  lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
  test/MC/ELF/relax-arith2.s

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10766.28558.patch
Type: text/x-patch
Size: 4938 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150626/bd9af98b/attachment.bin>


More information about the llvm-commits mailing list