Mercurial > hg > graal-compiler
diff src/cpu/x86/vm/x86_64.ad @ 403:b744678d4d71
6752257: Use NOT instead of XOR -1 on x86
Summary: add match rule for xor -1
Reviewed-by: never, kvn
author | rasbold |
---|---|
date | Fri, 10 Oct 2008 09:47:56 -0700 |
parents | dc7f315e41f7 |
children | 4d9884b01ba6 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/x86_64.ad Mon Oct 06 13:11:32 2008 -0700 +++ b/src/cpu/x86/vm/x86_64.ad Fri Oct 10 09:47:56 2008 -0700 @@ -9309,6 +9309,17 @@ ins_pipe(ialu_reg_reg); %} +// Xor Register with Immediate -1 +instruct xorI_rReg_im1(rRegI dst, immI_M1 imm) %{ + match(Set dst (XorI dst imm)); + + format %{ "not $dst" %} + ins_encode %{ + __ notl($dst$$Register); + %} + ins_pipe(ialu_reg); +%} + // Xor Register with Immediate instruct xorI_rReg_imm(rRegI dst, immI src, rFlagsReg cr) %{ @@ -9529,6 +9540,17 @@ ins_pipe(ialu_reg_reg); %} +// Xor Register with Immediate -1 +instruct xorL_rReg_im1(rRegL dst, immL_M1 imm) %{ + match(Set dst (XorL dst imm)); + + format %{ "notq $dst" %} + ins_encode %{ + __ notq($dst$$Register); + %} + ins_pipe(ialu_reg); +%} + // Xor Register with Immediate instruct xorL_rReg_imm(rRegL dst, immL32 src, rFlagsReg cr) %{