RFR: 8075443: AARCH64: Missed L2I optimizations in C2

Andrew Haley aph at redhat.com
Wed Mar 18 14:54:33 UTC 2015

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)));
-  format %{ "eon  $dst, $src1, $src2" %}
-  ins_encode %{
-    __ eon(as_Register($dst$$reg),
+  format %{ "eonw  $dst, $src1, $src2" %}
+  ins_encode %{
+    __ eonw(as_Register($dst$$reg),
               Assembler::LSL, 0);



More information about the hotspot-compiler-dev mailing list