NEON and64 patch test cases

These test cases are the same as for the core-and64 patch. Note that all of these are expected to fall back to core instructions because the values are located in hard registers from the start.

The example compiler output is attached because it's too wide for the wiki. I've included the following columns for comparison:

  1. Output from the unpatched[1] compiler configured for VFPv3
    • The baseline; the goal is to match this (or be as good as), wherever possible.
  2. Output from the unpatched compiler configured for NEON
    • The "before" case.
  3. Output from the unpatched compiler configured for NEON with lower-subreg disabled
    • This is mainly for comparison with column 5.
  4. Output from the patched compiler, also configured for NEON.
    • The "after" case.
  5. Output from the patched compiler with lower-subreg disabled (-fno-split-wide-types)

    • This should simulate what it would look like once lower-subreg is 'fixed'.

In many cases column 4 is the same as column 2; this demonstrates how much lower-subreg is interfering with the result.

We certainly do not manage to get column 5 to match column 1 in all cases, but the result is a marked improvement over column 2.

[1] where 'unpatched' means this patch is not applied, but the dependencies (core-shift, neon-shift, neon-extend, and core-and64) are applied.

   1 void bar (long long, long long);
   2 
   3 void
   4 foo (long long a)
   5 {
   6     bar (a&1, a);
   7 }
   8 
   9 void
  10 foo2 (long long a)
  11 {
  12     bar (a&~0x100000001, a);
  13 }
  14 
  15 long long
  16 and (long long a, long long b)
  17 {
  18   return a & b;
  19 }
  20 
  21 long long
  22 anddi_zesidi_di (unsigned int a, long long b)
  23 {
  24   return a & b;
  25 }
  26 
  27 long long
  28 anddi_sesdi_di (int a, long long b)
  29 {
  30   return a & b;
  31 }
  32 
  33 long long
  34 anddi_notdi_di (long long a, long long b)
  35 {
  36   return ~a & b;
  37 }
  38 
  39 long long
  40 anddi_notzesidi_di (unsigned int a, long long b)
  41 {
  42   return ~((unsigned long long)a) & b;
  43 }
  44 
  45 long long
  46 anddi_notsesidi_di (int a, long long b)
  47 {
  48   return ~((long long)a) & b;
  49 }
  50 
  51 
  52 long long
  53 not (long long a)
  54 {
  55   return ~a;
  56 }
  57 
  58 long long
  59 or (long long a, long long b)
  60 {
  61   return a | b;
  62 }
  63 
  64 long long
  65 or_const (long long a)
  66 {
  67   return a | 10;
  68 }
  69 
  70 long long
  71 iordi_zesidi_di (unsigned int a, long long b)
  72 {
  73   return a | b;
  74 }
  75 
  76 long long
  77 iordi_sesidi_di (int a, long long b)
  78 {
  79   return a | b;
  80 }
  81 
  82 long long
  83 xor (long long a, long long b)
  84 {
  85   return a ^ b;
  86 }
  87 
  88 long long
  89 xor_const (long long a)
  90 {
  91   return a ^ 10;
  92 }
  93 
  94 long long
  95 xordi_zesidi_di (unsigned int a, long long b)
  96 {
  97   return a ^ b;
  98 }
  99 
 100 long long
 101 xordi_sesidi_di (int a, long long b)
 102 {
 103   return a ^ b;
 104 }

AndrewStubbs/Sandbox/neon-and64 (last modified 2012-05-22 19:24:57)