CXX_FAST_TLS calling convention: target independent portion.
[oota-llvm.git] / test / Transforms / DeadStoreElimination / ifthen.ll
1 ; RUN: opt < %s -basicaa -dse -enable-nonlocal-dse -S | FileCheck %s
2
3 ; The store and add in if.then block should be removed by non-local DSE.
4 ; CHECK-NOT: %stval = add
5 ; CHECK-NOT: store i32 %stval
6 ;
7 define void @foo(i32* noalias nocapture %a, i32* noalias nocapture readonly %b, i32 %c) {
8 entry:
9   %cmp = icmp sgt i32 %c, 0
10   br i1 %cmp, label %if.then, label %if.end
11
12 if.then:
13   %0 = load i32, i32* %b, align 4
14   %stval = add nsw i32 %0, 1
15   store i32 %stval, i32* %a, align 4
16   br label %if.end
17
18 if.end:
19   %m.0 = phi i32 [ 13, %if.then ], [ 10, %entry ]
20   store i32 %m.0, i32* %a, align 4
21   ret void
22 }