[LLVMbugs] [Bug 7304] New: Partial specialize uses wrong specialization for callsite
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Jun 4 12:03:23 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7304
Summary: Partial specialize uses wrong specialization for
callsite
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: Interprocedural Optimizations
AssignedTo: unassignedbugs at nondot.org
ReportedBy: kennethuil at gmail.com
CC: llvmbugs at cs.uiuc.edu
Given the test code:
declare void @callback1()
declare void @callback2()
define internal void @UseCallback(void()* %pCallback) {
call void %pCallback()
ret void
}
define void @foo()
{
call void @UseCallback(void()* @callback1)
call void @UseCallback(void()* @callback1)
call void @UseCallback(void()* @callback2)
call void @UseCallback(void()* @callback1)
call void @UseCallback(void()* @callback2)
call void @UseCallback(void()* @callback2)
ret void
}
Running "opt -partialspecialization -o test-opt.bc test.bc"
yields the following code:
declare void @callback1()
declare void @callback2()
define internal void @UseCallback(void ()* %pCallback) {
call void %pCallback()
ret void
}
define void @foo() {
call void @UseCallback1()
call void @UseCallback1()
call void @UseCallback1() ; should be @UseCallback2!
call void @UseCallback1()
call void @UseCallback1() ; should be @UseCallback2!
call void @UseCallback1() ; should be @UseCallback2!
ret void
}
define internal void @UseCallback1() {
call void @callback1()
ret void
}
define internal void @UseCallback2() {
call void @callback2()
ret void
}
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list