xref: /aosp_15_r20/external/clang/test/CodeGen/2002-03-14-BrokenPHINode.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -emit-llvm %s  -o /dev/null
2*67e74705SXin Li 
3*67e74705SXin Li /* GCC was generating PHI nodes with an arity < #pred of the basic block the
4*67e74705SXin Li  * PHI node lived in.  This was breaking LLVM because the number of entries
5*67e74705SXin Li  * in a PHI node must equal the number of predecessors for a basic block.
6*67e74705SXin Li  */
7*67e74705SXin Li 
trys(char * s,int x)8*67e74705SXin Li int trys(char *s, int x)
9*67e74705SXin Li {
10*67e74705SXin Li   int asa;
11*67e74705SXin Li   double Val;
12*67e74705SXin Li   int LLS;
13*67e74705SXin Li   if (x) {
14*67e74705SXin Li     asa = LLS + asa;
15*67e74705SXin Li   } else {
16*67e74705SXin Li   }
17*67e74705SXin Li   return asa+(int)Val;
18*67e74705SXin Li }
19*67e74705SXin Li 
20