aboutsummaryrefslogtreecommitdiffstats
path: root/test/CFrontend/cast-to-bool.c
blob: 5d6c20a39aa68e99d1378a909d3685f675179a21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN: %llvmgcc -S %s -o - | grep {trunc.*to i8}
// RUN: %llvmgcc -S %s -o - | llvm-as | opt -instcombine | llc -march=x86 | \
// RUN:   grep {test.*1}
int
main ( int argc, char** argv)
{
  int i;
  int result = 1;
  for (i = 2; i <= 3; i++)
    {
      if ((i & 1) == 0)
	{
	    result = result + 17;
	}
    }
  return result;
}