1 unsigned int shl0(unsigned int x)
   2 {
   3         return x << 15 << 15;
   4 }
   5 
   6 unsigned int shl1(unsigned int x)
   7 {
   8         return x << 16 << 15;
   9 }
  10 
  11 unsigned int shl2(unsigned int x)
  12 {
  13         return x << 16 << 16;
  14 }
  15 
  16 unsigned int shl3(unsigned int x)
  17 {
  18         return x << 12 << 10 << 10;
  19 }
  20 
  21 
  22 unsigned int lsr0(unsigned int x)
  23 {
  24         return x >> 15 >> 15;
  25 }
  26 
  27 unsigned int lsr1(unsigned int x)
  28 {
  29         return x >> 16 >> 15;
  30 }
  31 
  32 unsigned int lsr2(unsigned int x)
  33 {
  34         return x >> 16 >> 16;
  35 }
  36 
  37 unsigned int lsr3(unsigned int x)
  38 {
  39         return x >> 12 >> 10 >> 10;
  40 }
  41 
  42 
  43 int asr0(int x)
  44 {
  45         return x >> 15 >> 15;
  46 }
  47 
  48 int asr1(int x)
  49 {
  50         return x >> 16 >> 15;
  51 }
  52 
  53 int asr2(int x)
  54 {
  55         return x >> 16 >> 16;
  56 }
  57 
  58 int asr3(int x)
  59 {
  60         return x >> 12 >> 10 >> 10;
  61 }
  62 
  63 /*
  64  * check-name: shift-shift
  65  * check-command: test-linearize -Wno-decl $file
  66  *
  67  * check-output-start
  68 shl0:
  69 .L0:
  70         <entry-point>
  71         shl.32      %r3 <- %arg1, $30
  72         ret.32      %r3
  73 
  74 
  75 shl1:
  76 .L2:
  77         <entry-point>
  78         shl.32      %r7 <- %arg1, $31
  79         ret.32      %r7
  80 
  81 
  82 shl2:
  83 .L4:
  84         <entry-point>
  85         ret.32      $0
  86 
  87 
  88 shl3:
  89 .L6:
  90         <entry-point>
  91         ret.32      $0
  92 
  93 
  94 lsr0:
  95 .L8:
  96         <entry-point>
  97         lsr.32      %r20 <- %arg1, $30
  98         ret.32      %r20
  99 
 100 
 101 lsr1:
 102 .L10:
 103         <entry-point>
 104         lsr.32      %r24 <- %arg1, $31
 105         ret.32      %r24
 106 
 107 
 108 lsr2:
 109 .L12:
 110         <entry-point>
 111         ret.32      $0
 112 
 113 
 114 lsr3:
 115 .L14:
 116         <entry-point>
 117         ret.32      $0
 118 
 119 
 120 asr0:
 121 .L16:
 122         <entry-point>
 123         asr.32      %r37 <- %arg1, $30
 124         ret.32      %r37
 125 
 126 
 127 asr1:
 128 .L18:
 129         <entry-point>
 130         asr.32      %r41 <- %arg1, $31
 131         ret.32      %r41
 132 
 133 
 134 asr2:
 135 .L20:
 136         <entry-point>
 137         asr.32      %r45 <- %arg1, $31
 138         ret.32      %r45
 139 
 140 
 141 asr3:
 142 .L22:
 143         <entry-point>
 144         asr.32      %r50 <- %arg1, $31
 145         ret.32      %r50
 146 
 147 
 148  * check-output-end
 149  */