RFR (M): 6443505: Ideal() function for CmpLTMask
David Chase
david.r.chase at oracle.com
Mon Apr 8 11:23:33 PDT 2013
On 2013-04-08, at 1:52 PM, Christian Thalinger <christian.thalinger at oracle.com> wrote:
> src/cpu/x86/vm/x86_32.ad:
>
> ! format %{ "XOR ECX,ECX\t# cadd_LTMaskA\n\t"
> + format %{ "XORL $tmp, $tmp\t# and_cmpLTMaskA\n\t"
>
> Sometimes you have cmpLT and sometimes not. Always use the instruct name.
So cmpLTMask everywhere? And use a name that IDs the pattern, right?
> + instruct and_cmpLTMaskB(rRegI p, rRegI q, rRegI y, eFlagsReg cr)
> + %{
>
> Could you move the %{ to the same line to be like the existing ones (I know that 32 and 64 are different; it's annoying):
>
> + instruct cadd_cmpLTMaskB(rRegI p, rRegI q, rRegI y, eFlagsReg cr) %{
> src/cpu/x86/vm/x86_64.ad:
>
> + /* Better to save a register than avoid a branch
>
> Do we really want to keep the unused code?
We could lose it. I think we need to keep a comment to document why we did it with a branch.
David
More information about the hotspot-compiler-dev
mailing list