Fixed and reactivated a partial specialization test

llvm-svn: 111516
This commit is contained in:
Kenneth Uildriks 2010-08-19 12:42:38 +00:00
parent 583a1cf7b5
commit d4b6ab9888
1 changed files with 13 additions and 9 deletions

View File

@ -1,8 +1,8 @@
; If there are two specializations of a function, make sure each callsite ; If there are two specializations of a function, make sure each callsite
; calls the right one. ; calls the right one.
; ;
; RN: opt -S -partialspecialization %s | FileCheck %s ; RUN: opt -S -partialspecialization -disable-inlining %s | opt -S -inline | FileCheck %s -check-prefix=CORRECT
; RUN: true ; RUN: opt -S -partialspecialization -disable-inlining %s | FileCheck %s
declare void @callback1() declare void @callback1()
declare void @callback2() declare void @callback2()
@ -14,14 +14,18 @@ define internal void @UseCallback(void()* %pCallback) {
define void @foo(void()* %pNonConstCallback) define void @foo(void()* %pNonConstCallback)
{ {
Entry: Entry:
; CORRECT: Entry
; CORRECT-NEXT: call void @callback1()
; CORRECT-NEXT: call void @callback1()
; CORRECT-NEXT: call void @callback2()
; CORRECT-NEXT: call void %pNonConstCallback()
; CORRECT-NEXT: call void @callback1()
; CORRECT-NEXT: call void @callback2()
; CORRECT-NEXT: call void @callback2()
; CHECK: Entry ; CHECK: Entry
; CHECK-NEXT: call void @callback1() ; CHECK-NOT: call void @UseCallback(void ()* @callback1)
; CHECK-NEXT: call void @callback1() ; CHECK-NOT: call void @UseCallback(void ()* @callback2)
; CHECK-NEXT: call void @callback2() ; CHECK: ret void
; CHECK-NEXT: call void %pNonConstCallback()
; CHECK-NEXT: call void @callback1()
; CHECK-NEXT: call void @callback2()
; CHECK-NEXT: call void @callback2()
call void @UseCallback(void()* @callback1) call void @UseCallback(void()* @callback1)
call void @UseCallback(void()* @callback1) call void @UseCallback(void()* @callback1)
call void @UseCallback(void()* @callback2) call void @UseCallback(void()* @callback2)