[llvm-dev] Remove some x86-64 addressing modes of IMUL and ADD instructions

Abhinav Jangda via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 10 10:01:14 PDT 2018


Hello everyone,

For some project, I need to remove some addressing modes of operands in
IMUL and ADD instructions. More specifically, I do not want LLVM to
generate instruction like:

*imull    (%r9,%r11), %r15d*

Instead I will like LLVM to generate code which first loads address into a
register and then multiply it, i.e., something like:

*movl (%r9, %r11), %r10d*
*imull %r10d, %r15d*

I have remove all *IMUL64rm *and *IMUL64rmi* instructions in
Target/X86/X86InstrArithmetic.td, but still *imull* instruction with memory
operand is generated. Can anyone please point me to the write place?
I will prefer a solution related to llvm6.0, however, solution for any llvm
version is welcome.

Thank You,

Abhinav Jangda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180910/77bbdc3f/attachment.html>


More information about the llvm-dev mailing list