llvm-6502/test/Transforms/LICM/call_sink_const_function.ll
Duncan Sands e4dc717585 Ding dong, the DoesntAccessMemoryFns and
OnlyReadsMemoryFns tables are dead!  We
get more, and more accurate, information
from gcc via the readnone and readonly
function attributes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44288 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-23 19:30:27 +00:00

18 lines
383 B
LLVM

; RUN: llvm-as < %s | opt -basicaa -licm | llvm-dis | %prcontext sin 1 | grep Out:
declare double @sin(double) readnone
declare void @foo()
define double @test(double %X) {
br label %Loop
Loop: ; preds = %Loop, %0
call void @foo( )
%A = call double @sin( double %X ) readnone ; <double> [#uses=1]
br i1 true, label %Loop, label %Out
Out: ; preds = %Loop
ret double %A
}