llvm-6502/test/Transforms/InstCombine/sink_instruction.ll
Daniel Dunbar 31ab6e3364 Eliminate uses of %prcontext.
- I'd appreciate it if someone else eyeballs my changes to make sure I captured
   the intent of the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81083 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-05 11:35:16 +00:00

21 lines
523 B
LLVM

; RUN: opt -instcombine %s | llvm-dis | FileCheck %s
;; This tests that the instructions in the entry blocks are sunk into each
;; arm of the 'if'.
define i32 @foo(i1 %C, i32 %A, i32 %B) {
entry:
%tmp.2 = sdiv i32 %A, %B ; <i32> [#uses=1]
%tmp.9 = add i32 %B, %A ; <i32> [#uses=1]
br i1 %C, label %then, label %endif
then: ; preds = %entry
ret i32 %tmp.9
endif: ; preds = %entry
; CHECK: sdiv i32
; CHECK-NEXT: ret i32
ret i32 %tmp.2
}