changeset 12259:622d3fe587f2

8168318: PPC64: Use cmpldi instead of li/cmpld Reviewed-by: goetz Contributed-by: igor.nunes@eldorado.org.br
author goetz
date Thu, 27 Oct 2016 12:22:28 +0200
parents d13e2c90fcef
children 5633d5463a8b
files src/cpu/ppc/vm/ppc.ad
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/ppc/vm/ppc.ad	Thu Oct 27 12:18:36 2016 +0200
+++ b/src/cpu/ppc/vm/ppc.ad	Thu Oct 27 12:22:28 2016 +0200
@@ -11237,6 +11237,17 @@
   ins_pipe(pipe_class_compare);
 %}
 
+instruct cmpP_reg_null(flagsReg crx, iRegP_N2P src1, immP_0or1 src2) %{
+  match(Set crx (CmpP src1 src2));
+  format %{ "CMPLDI   $crx, $src1, $src2 \t// ptr" %}
+  size(4);
+  ins_encode %{
+    // TODO: PPC port $archOpcode(ppc64Opcode_cmpl);
+    __ cmpldi($crx$$CondRegister, $src1$$Register, (int)((short)($src2$$constant & 0xFFFF)));
+  %}
+  ins_pipe(pipe_class_compare);
+%}
+
 // Used in postalloc expand.
 instruct cmpP_reg_imm16(flagsReg crx, iRegPsrc src1, immL16 src2) %{
   // This match rule prevents reordering of node before a safepoint.