Add support for the 'x' constraint.
[oota-llvm.git] / test / FrontendC++ / integration-O2.cpp
1 // RUN: %llvmgxx %s -O2 -S -o - | FileCheck %s
2
3 // This test verifies that we get expected codegen out of the -O2 optimization
4 // level from the full optimizer.
5
6
7
8 // Verify that ipsccp is running and can eliminate globals.
9 static int test1g = 42;
10 void test1f1() {
11   if (test1g == 0) test1g = 0;
12 }
13 int test1f2() {
14   return test1g;
15 }
16
17 // CHECK: @_Z7test1f2v()
18 // CHECK: entry:
19 // CHECK-NEXT: ret i32 42