RFR: 8075443: AARCH64: Missed L2I optimizations in C2

Andrew Haley aph at redhat.com
Thu Mar 19 16:26:23 UTC 2015


I think I need another reviewer for this.

Thanks,
Andrew.


On 03/18/2015 02:54 PM, Andrew Haley wrote:
> We use iRegIOrL2I erratically in aarch64.ad.  We can use it whenever
> we have a 32-bit input operand, and doing so improves code quality in
> many cases. We should use iRegIOrL2I instead of iRegI whenever it can
> be used as an input operand and the patterns allow us to do so.
> 
> I also took the opportunity to do a little technical debt reduction.
> In a few places we were doing int-mode operations in 64-bit-wide
> instructions.  This doesn't really matter, but it's a lot easier to
> reason about code generation if you have a rule that instructions must
> always use the correct mode.
> 
> This is an example of a pattern which has both changes.
> 
> @@ -8274,14 +8274,14 @@
>  %}
> 
>  instruct XorI_reg_not_reg(iRegINoSp dst,
> -                         iRegI src1, iRegI src2, immI_M1 m1,
> +                         iRegIorL2I src1, iRegIorL2I src2, immI_M1 m1,
>                           rFlagsReg cr) %{
>    match(Set dst (XorI m1 (XorI src2 src1)));
>    ins_cost(INSN_COST);
> -  format %{ "eon  $dst, $src1, $src2" %}
> -
> -  ins_encode %{
> -    __ eon(as_Register($dst$$reg),
> +  format %{ "eonw  $dst, $src1, $src2" %}
> +
> +  ins_encode %{
> +    __ eonw(as_Register($dst$$reg),
>                as_Register($src1$$reg),
>                as_Register($src2$$reg),
>                Assembler::LSL, 0);
> 
> http://cr.openjdk.java.net/~aph/8075443/
> 
> Andrew.
> 



More information about the hotspot-compiler-dev mailing list