changeset 52625:4ea75a606797

8214027: Reinstate testB_mem_imm pattern in x86_64.ad Reviewed-by: rkennke
author bsrbnd
date Sun, 18 Nov 2018 19:45:33 +0100
parents d32e5b7100ee
children e89a4cbffba0
files src/hotspot/cpu/x86/x86_64.ad
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);
 %}