< prev index next >
src/cpu/ppc/vm/ppc.ad
Print this page
rev 12107 : 8168318: PPC64: Use cmpldi instead of li/cmpld
Reviewed-by: goetz
@@ -11233,10 +11233,22 @@
__ cmpld($crx$$CondRegister, $src1$$Register, $src2$$Register);
%}
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.
// This only makes sense if this instructions is used exclusively
// for the expansion of EncodeP!
< prev index next >