# HG changeset patch # User rkennke # Date 1541706550 -3600 # Thu Nov 08 20:49:10 2018 +0100 # Node ID f8d9ced927d21b1b1b6c59350db785b02ebbf762 # Parent dc1f9dec2018a37fedba47d8a2aedef99faaec64 8213473: Prevent transformation of LoadB->AndI->CmpI pattern to facilitate testb instruction matching diff --git a/src/hotspot/cpu/x86/x86_64.ad b/src/hotspot/cpu/x86/x86_64.ad --- a/src/hotspot/cpu/x86/x86_64.ad +++ b/src/hotspot/cpu/x86/x86_64.ad @@ -11889,9 +11889,9 @@ 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)); +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" %}