Fix R0 use in PowerPC VSX store for FastIsel.
authorSamuel Antao <sfantao@us.ibm.com>
Tue, 17 Mar 2015 15:00:57 +0000 (15:00 +0000)
committerSamuel Antao <sfantao@us.ibm.com>
Tue, 17 Mar 2015 15:00:57 +0000 (15:00 +0000)
commit7684e7d9875d87137dd43dd9c477a8b8f2156383
treecc4ed067d1b1981daf89fd04eaf12efe91e54d3e
parent6fe99b7d5cdd27008bf9d9c65e740b2b623fc1b5
Fix R0 use in PowerPC VSX store for FastIsel.

The VSX stores are sometimes generated with a undefined index register, causing %noreg to be used and R0 to be emitted later on. The semantics of the VSX store (e.g. stdsdx) requires R0 to be used as base if we want zero to be used in the computation of the effective address instead of the content of R0. This patch checks if no index register was generated and forces R0 to be used as base address.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232486 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCFastISel.cpp
test/CodeGen/PowerPC/fast-isel-load-store-vsx.ll [new file with mode: 0644]