summaryrefslogtreecommitdiffstats
path: root/test/Transforms/LICM/call_sink_const_function.ll
blob: f187e27335ba57fda2f4625fab448d9e0ee64b21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
; 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
}
OpenPOWER on IntegriCloud