mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-23 15:29:51 +00:00
ec9a35a6f9
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47793 91177308-0d34-0410-b5e6-96231b3b80d8
20 lines
521 B
LLVM
20 lines
521 B
LLVM
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
|
|
; RUN: %prcontext div 1 | grep ret
|
|
|
|
;; 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
|
|
ret i32 %tmp.2
|
|
}
|
|
|