X86: FrameIndex addressing modes do have a base register.
authorTim Northover <tnorthover@apple.com>
Thu, 19 Sep 2013 11:33:53 +0000 (11:33 +0000)
committerTim Northover <tnorthover@apple.com>
Thu, 19 Sep 2013 11:33:53 +0000 (11:33 +0000)
commitadadf887cb57f8281ec23f846a946fb59bd0a0d7
treef156053463832460ca53c51e9584350751d47afc
parentabe68f59174c7418ae73de0a87587abe0be1fb03
X86: FrameIndex addressing modes do have a base register.

When selecting the DAG (add (WrapperRIP ...), (FrameIndex ...)), X86 code had
spotted the FrameIndex possibility and was working out whether it could fold
the WrapperRIP into this.

The test for forming a %rip version is notionally whether we already have a
base or index register (%rip precludes both), but we were forgetting to account
for the register that would be inserted later to access the frame.

rdar://problem/15024520

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