From dc4be9066f30802bd18bf705d874a116040efa39 Mon Sep 17 00:00:00 2001 From: Bernard Blaser Date: Sun, 18 Nov 2018 19:45:33 +0100 Subject: [PATCH] 8214027: Reinstate testB_mem_imm pattern in x86_64.ad Reviewed-by: rkennke --- src/hotspot/cpu/x86/x86_64.ad | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/hotspot/cpu/x86/x86_64.ad b/src/hotspot/cpu/x86/x86_64.ad index cf292db9ade..412d42fd5a0 100644 --- a/src/hotspot/cpu/x86/x86_64.ad +++ b/src/hotspot/cpu/x86/x86_64.ad @@ -11930,7 +11930,17 @@ instruct testUB_mem_imm(rFlagsReg cr, memory mem, immU8 imm, immI0 zero) 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); %}