[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)
commitaf51993ee12e7bb729ae8fffd97c2376adc4b784
treebbfc1d1883d9f5b170b34e92f3ca77d2a0061dc3
parente954fd4cfa91253040d558b56d0380fb95712ab3
[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.

llvm-svn: 226432
llvm/lib/Target/PowerPC/PPCFastISel.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/test/CodeGen/PowerPC/ppc64-func-desc-hoist.ll