[x86] Rewrite getAddressFromInstr helper function
authorNikolai Bozhenov <nikolai.bozhenov@intel.com>
Thu, 24 Nov 2016 13:05:43 +0000 (13:05 +0000)
committerNikolai Bozhenov <nikolai.bozhenov@intel.com>
Thu, 24 Nov 2016 13:05:43 +0000 (13:05 +0000)
commita2dabed3b6f343d26877e92219d87ad7050b7971
tree4f6ebbe4a13dcf0e9d4c617689b8b668c4f90d10
parent85f5bfcf0d2e93c17a3cb3308561930adc0021a3
[x86] Rewrite getAddressFromInstr helper function

- It does not modify the input instruction
- Second operand of any address is always an Index Register,
  make sure we actually check for that, instead of a check for
  an immediate value

Patch by Alexander Ivchenko <alexander.ivchenko@intel.com>

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

llvm-svn: 287873
llvm/lib/Target/X86/X86InstrBuilder.h