]> granicus.if.org Git - llvm/commit
[X86] Don't convert 8 or 16 bit ADDs to LEAs on Atom in FixupLEAPass.
authorCraig Topper <craig.topper@intel.com>
Thu, 11 Jul 2019 01:01:39 +0000 (01:01 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 11 Jul 2019 01:01:39 +0000 (01:01 +0000)
commit1b8408cc62f2cb2f6d35cefe77bb5037cc10328f
tree3b293eedd45ab0d7eaec70f4ed3aa99ced32460f
parentcd0b4e315f21d21a4e1f60e5ba4c878cf41093d4
[X86] Don't convert 8 or 16 bit ADDs to LEAs on Atom in FixupLEAPass.

We use the functions that convert to three address to do the
conversion, but changing an 8 or 16 bit will cause it to create
a virtual register. This can't be done after register allocation
where this pass runs.

I've switched the pass completely to a white list of instructions
that can be converted to LEA instead of a blacklist that was
incorrect. This will avoid surprises if we enhance the three
address conversion function to include additional instructions
in the future.

Fixes PR42565.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365720 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86FixupLEAs.cpp
test/CodeGen/X86/pr42565.ll [new file with mode: 0644]