Baffling USE in x86_64.ad
Andrew Haley
aph at redhat.com
Thu Jan 21 10:22:13 UTC 2016
In this pattern:
instruct compI_rReg(rFlagsReg cr, rRegI op1, rRegI op2)
%{
match(Set cr (CmpI op1 op2));
effect(DEF cr, USE op1, USE op2);
format %{ "cmpl $op1, $op2" %}
opcode(0x3B); /* Opcode 3B /r */
ins_encode(REX_reg_reg(op1, op2), OpcP, reg_reg(op1, op2));
ins_pipe(ialu_cr_reg_reg);
%}
why does the USE appear in the effect? And the DEF? The operands
appear in the match expression in the normal way, so I would have
thought the effect expression unnecessary. It's this pattern: others
don't have the effect:
instruct compL_rReg(rFlagsReg cr, rRegL op1, rRegL op2)
%{
match(Set cr (CmpL op1 op2));
format %{ "cmpq $op1, $op2" %}
opcode(0x3B); /* Opcode 3B /r */
ins_encode(REX_reg_reg_wide(op1, op2), OpcP, reg_reg(op1, op2));
ins_pipe(ialu_cr_reg_reg);
%}
Thanks,
Andrew.
More information about the hotspot-compiler-dev
mailing list