[llvm-commits] [llvm] r151374 - in /llvm/trunk: lib/Target/PowerPC/PPCInstr64Bit.td test/CodeGen/PowerPC/ppc64-ind-call.ll
Hal Finkel
hfinkel at anl.gov
Fri Feb 24 09:54:01 PST 2012
Author: hfinkel
Date: Fri Feb 24 11:54:01 2012
New Revision: 151374
URL: http://llvm.org/viewvc/llvm-project?rev=151374&view=rev
Log:
X11/X2 loads around indirect calls on ppc64 should not be deleted.
Modified:
llvm/trunk/lib/Target/PowerPC/PPCInstr64Bit.td
llvm/trunk/test/CodeGen/PowerPC/ppc64-ind-call.ll
Modified: llvm/trunk/lib/Target/PowerPC/PPCInstr64Bit.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCInstr64Bit.td?rev=151374&r1=151373&r2=151374&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCInstr64Bit.td (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCInstr64Bit.td Fri Feb 24 11:54:01 2012
@@ -106,7 +106,7 @@
(outs), (ins aaddr:$func, variable_ops),
"bla $func", BrB, [(PPCcall_SVR4 (i64 imm:$func))]>;
}
- let Uses = [CTR8, RM] in {
+ let Uses = [X11, CTR8, RM] in {
def BCTRL8_ELF : XLForm_2_ext<19, 528, 20, 0, 1,
(outs), (ins variable_ops),
"bctrl", BrB,
@@ -575,7 +575,8 @@
"",
[(set G8RC:$rD,
(PPCtoc_entry tglobaladdr:$disp, G8RC:$reg))]>, isPPC64;
-
+
+let hasSideEffects = 1 in {
let RST = 2, DS_RA = 0 in // FIXME: Should be a pseudo.
def LDinto_toc: DSForm_1<58, 0, (outs), (ins G8RC:$reg),
"ld 2, 8($reg)", LdStLD,
@@ -585,6 +586,7 @@
def LDtoc_restore : DSForm_1<58, 0, (outs), (ins),
"ld 2, 40(1)", LdStLD,
[(PPCtoc_restore)]>, isPPC64;
+}
def LDX : XForm_1<31, 21, (outs G8RC:$rD), (ins memrr:$src),
"ldx $rD, $src", LdStLD,
[(set G8RC:$rD, (load xaddr:$src))]>, isPPC64;
Modified: llvm/trunk/test/CodeGen/PowerPC/ppc64-ind-call.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PowerPC/ppc64-ind-call.ll?rev=151374&r1=151373&r2=151374&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/PowerPC/ppc64-ind-call.ll (original)
+++ llvm/trunk/test/CodeGen/PowerPC/ppc64-ind-call.ll Fri Feb 24 11:54:01 2012
@@ -9,4 +9,8 @@
}
; CHECK: @test1
+; CHECK: ld 11, 0(3)
+; CHECK: ld 2, 8(3)
+; CHECK: bctrl
+; CHECK: ld 2, 40(1)
More information about the llvm-commits
mailing list