1 typedef unsigned int uint;
   2 typedef _Bool bool;
   3 
   4 static uint   ini(uint a) { return !a; }
   5 static bool   bni(uint a) { return !a; }
   6 static uint  ioii(uint a, uint b) { return a || b; }
   7 static uint  iaii(uint a, uint b) { return a && b; }
   8 static bool  boii(uint a, uint b) { return a || b; }
   9 static bool  baii(uint a, uint b) { return a && b; }
  10 static uint ioiii(uint a, uint b, uint c) { return a || b || c; }
  11 static uint iaiii(uint a, uint b, uint c) { return a && b && c; }
  12 static bool boiii(uint a, uint b, uint c) { return a || b || c; }
  13 static bool baiii(uint a, uint b, uint c) { return a && b && c; }
  14 
  15 static uint   inb(bool a) { return !a; }
  16 static bool   bnb(bool a) { return !a; }
  17 static uint  iobb(bool a, bool b) { return a || b; }
  18 static uint  iabb(bool a, bool b) { return a && b; }
  19 static bool  bobb(bool a, bool b) { return a || b; }
  20 static bool  babb(bool a, bool b) { return a && b; }
  21 static uint iobbb(bool a, bool b, bool c) { return a || b || c; }
  22 static uint iabbb(bool a, bool b, bool c) { return a && b && c; }
  23 static bool bobbb(bool a, bool b, bool c) { return a || b || c; }
  24 static bool babbb(bool a, bool b, bool c) { return a && b && c; }
  25 
  26 /*
  27  * check-name: bool-simplify2
  28  * check-command: test-linearize $file
  29  *
  30  * check-output-pattern(20): setne\\.
  31  * check-output-pattern(4):  seteq\\.
  32  * check-output-pattern(8): zext\\.
  33  * check-output-pattern(12): and
  34  * check-output-pattern(12): or
  35  * check-output-end
  36  *
  37  * check-output-start
  38 ini:
  39 .L0:
  40         <entry-point>
  41         seteq.32    %r2 <- %arg1, $0
  42         ret.32      %r2
  43 
  44 
  45 bni:
  46 .L2:
  47         <entry-point>
  48         seteq.1     %r6 <- %arg1, $0
  49         ret.1       %r6
  50 
  51 
  52 ioii:
  53 .L4:
  54         <entry-point>
  55         setne.1     %r9 <- %arg1, $0
  56         setne.1     %r11 <- %arg2, $0
  57         or.1        %r12 <- %r9, %r11
  58         zext.32     %r13 <- (1) %r12
  59         ret.32      %r13
  60 
  61 
  62 iaii:
  63 .L6:
  64         <entry-point>
  65         setne.1     %r16 <- %arg1, $0
  66         setne.1     %r18 <- %arg2, $0
  67         and.1       %r19 <- %r16, %r18
  68         zext.32     %r20 <- (1) %r19
  69         ret.32      %r20
  70 
  71 
  72 boii:
  73 .L8:
  74         <entry-point>
  75         setne.1     %r23 <- %arg1, $0
  76         setne.1     %r25 <- %arg2, $0
  77         or.1        %r26 <- %r23, %r25
  78         ret.1       %r26
  79 
  80 
  81 baii:
  82 .L10:
  83         <entry-point>
  84         setne.1     %r31 <- %arg1, $0
  85         setne.1     %r33 <- %arg2, $0
  86         and.1       %r34 <- %r31, %r33
  87         ret.1       %r34
  88 
  89 
  90 ioiii:
  91 .L12:
  92         <entry-point>
  93         setne.1     %r39 <- %arg1, $0
  94         setne.1     %r41 <- %arg2, $0
  95         or.1        %r42 <- %r39, %r41
  96         setne.1     %r46 <- %arg3, $0
  97         or.1        %r47 <- %r42, %r46
  98         zext.32     %r48 <- (1) %r47
  99         ret.32      %r48
 100 
 101 
 102 iaiii:
 103 .L14:
 104         <entry-point>
 105         setne.1     %r51 <- %arg1, $0
 106         setne.1     %r53 <- %arg2, $0
 107         and.1       %r54 <- %r51, %r53
 108         setne.1     %r58 <- %arg3, $0
 109         and.1       %r59 <- %r54, %r58
 110         zext.32     %r60 <- (1) %r59
 111         ret.32      %r60
 112 
 113 
 114 boiii:
 115 .L16:
 116         <entry-point>
 117         setne.1     %r63 <- %arg1, $0
 118         setne.1     %r65 <- %arg2, $0
 119         or.1        %r66 <- %r63, %r65
 120         setne.1     %r70 <- %arg3, $0
 121         or.1        %r71 <- %r66, %r70
 122         ret.1       %r71
 123 
 124 
 125 baiii:
 126 .L18:
 127         <entry-point>
 128         setne.1     %r76 <- %arg1, $0
 129         setne.1     %r78 <- %arg2, $0
 130         and.1       %r79 <- %r76, %r78
 131         setne.1     %r83 <- %arg3, $0
 132         and.1       %r84 <- %r79, %r83
 133         ret.1       %r84
 134 
 135 
 136 inb:
 137 .L20:
 138         <entry-point>
 139         seteq.32    %r89 <- %arg1, $0
 140         ret.32      %r89
 141 
 142 
 143 bnb:
 144 .L22:
 145         <entry-point>
 146         seteq.1     %r93 <- %arg1, $0
 147         ret.1       %r93
 148 
 149 
 150 iobb:
 151 .L24:
 152         <entry-point>
 153         or.1        %r97 <- %arg1, %arg2
 154         zext.32     %r98 <- (1) %r97
 155         ret.32      %r98
 156 
 157 
 158 iabb:
 159 .L26:
 160         <entry-point>
 161         and.1       %r102 <- %arg1, %arg2
 162         zext.32     %r103 <- (1) %r102
 163         ret.32      %r103
 164 
 165 
 166 bobb:
 167 .L28:
 168         <entry-point>
 169         or.1        %r107 <- %arg1, %arg2
 170         ret.1       %r107
 171 
 172 
 173 babb:
 174 .L30:
 175         <entry-point>
 176         and.1       %r113 <- %arg1, %arg2
 177         ret.1       %r113
 178 
 179 
 180 iobbb:
 181 .L32:
 182         <entry-point>
 183         or.1        %r119 <- %arg1, %arg2
 184         or.1        %r123 <- %r119, %arg3
 185         zext.32     %r124 <- (1) %r123
 186         ret.32      %r124
 187 
 188 
 189 iabbb:
 190 .L34:
 191         <entry-point>
 192         and.1       %r128 <- %arg1, %arg2
 193         and.1       %r132 <- %r128, %arg3
 194         zext.32     %r133 <- (1) %r132
 195         ret.32      %r133
 196 
 197 
 198 bobbb:
 199 .L36:
 200         <entry-point>
 201         or.1        %r137 <- %arg1, %arg2
 202         or.1        %r141 <- %r137, %arg3
 203         ret.1       %r141
 204 
 205 
 206 babbb:
 207 .L38:
 208         <entry-point>
 209         and.1       %r147 <- %arg1, %arg2
 210         and.1       %r151 <- %r147, %arg3
 211         ret.1       %r151
 212 
 213 
 214  * check-output-end
 215  */