[PowerPC] Add r2 as an operand for all calls under both PPC64 ELF V1 and V2
authorHal Finkel <hfinkel@anl.gov>
Mon, 19 Jan 2015 07:20:27 +0000 (07:20 +0000)
committerHal Finkel <hfinkel@anl.gov>
Mon, 19 Jan 2015 07:20:27 +0000 (07:20 +0000)
commitd1f16564477965263b231f953116f223159b8b4e
tree3443b3e7e6966fa149758e407886a3d3d70dfc03
parent6f91bd79f3782557186b6420eb6a331e154a4d9b
[PowerPC] Add r2 as an operand for all calls under both PPC64 ELF V1 and V2

Our PPC64 ELF V2 call lowering logic added r2 as an operand to all direct call
instructions in order to represent the dependency on the TOC base pointer
value. Restricting this to ELF V2, however, does not seem to make sense: calls
under ELF V1 have the same dependence, and indirect calls have an r2 dependence
just as direct ones. Make sure the dependence is noted for all calls under both
ELF V1 and ELF V2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226432 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCFastISel.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
test/CodeGen/PowerPC/ppc64-func-desc-hoist.ll