cc5647a2fa0528a06d9d61e5ccf55328a9a9d7c0
[oota-llvm.git] / test / Feature / OperandBundles / dse.ll
1 ; RUN: opt -S -dse < %s | FileCheck %s
2
3 declare void @f()
4 declare noalias i8* @malloc(i32) nounwind
5
6 define void @test_0() {
7 ; CHECK-LABEL: @test_0(
8   %m = call i8* @malloc(i32 24)
9   tail call void @f() [ "unknown"(i8* %m) ]
10 ; CHECK: store i8 -19, i8* %m
11   store i8 -19, i8* %m
12   ret void
13 }
14
15 define i8* @test_1() {
16 ; CHECK-LABEL: @test_1(
17   %m = call i8* @malloc(i32 24)
18   tail call void @f() [ "unknown"(i8* %m) ]
19   store i8 -19, i8* %m
20   tail call void @f()
21   store i8 101, i8* %m
22
23 ; CHECK: tail call void @f() [ "unknown"(i8* %m) ]
24 ; CHECK: store i8 -19, i8* %m
25 ; CHECK: tail call void @f()
26 ; CHECK: store i8 101, i8* %m
27
28   ret i8* %m
29 }