8214027: Reinstate testB_mem_imm pattern in x86_64.ad
authorbsrbnd
Sun, 18 Nov 2018 19:45:33 +0100
changeset 52602 4ea75a606797
parent 52601 d32e5b7100ee
child 52603 e89a4cbffba0
child 57029 750a23664c11
8214027: Reinstate testB_mem_imm pattern in x86_64.ad Reviewed-by: rkennke
src/hotspot/cpu/x86/x86_64.ad
--- a/src/hotspot/cpu/x86/x86_64.ad	Fri Nov 16 17:46:15 2018 -0800
+++ b/src/hotspot/cpu/x86/x86_64.ad	Sun Nov 18 19:45:33 2018 +0100
@@ -11930,7 +11930,17 @@
   match(Set cr (CmpI (AndI (LoadUB mem) imm) zero));
 
   ins_cost(125);
-  format %{ "testb   $mem, $imm" %}
+  format %{ "testb   $mem, $imm\t# ubyte" %}
+  ins_encode %{ __ testb($mem$$Address, $imm$$constant); %}
+  ins_pipe(ialu_cr_reg_mem);
+%}
+
+instruct testB_mem_imm(rFlagsReg cr, memory mem, immI8 imm, immI0 zero)
+%{
+  match(Set cr (CmpI (AndI (LoadB mem) imm) zero));
+
+  ins_cost(125);
+  format %{ "testb   $mem, $imm\t# byte" %}
   ins_encode %{ __ testb($mem$$Address, $imm$$constant); %}
   ins_pipe(ialu_cr_reg_mem);
 %}