Model stacksave and stackrestore as both writing memory, since we
[oota-llvm.git] / test / Transforms / InstCombine / hoist_instr.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
2 ; RUN:   %prcontext div 1 | grep then:
3
4 ;; This tests that the div is hoisted into the then block.
5
6 int %foo(bool %C, int %A, int %B) {
7 entry:
8         br bool %C, label %then, label %endif
9
10 then:
11         br label %endif
12
13 endif:
14         %X = phi int [%A, %then], [15, %entry]
15         %Y = div int %X, 42
16         ret int %Y
17 }