[LLVMbugs] [Bug 14172] New: Bitcode Reader/Assembler incorrectly handles structs of arrays in different address space.
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Oct 24 16:02:35 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=14172
Bug #: 14172
Summary: Bitcode Reader/Assembler incorrectly handles structs
of arrays in different address space.
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Bitcode Reader
AssignedTo: unassignedbugs at nondot.org
ReportedBy: micah.villmow at amd.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
; RUN: llvm-as < %s | llvm-dis > %t1.ll
; RUN: diff %s %t1.ll
target datalayout =
"e-p:128:128:128-p1:32:32:32-p2:8:8:8-p3:16:16:16-p4:64:64:64-p5:96:96:96-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:32"
define i64 @fa_1() nounwind {
%t = ptrtoint { [7 x double], [7 x double] } addrspace(4)* null to i64
ret i64 %t
}
define { [7 x double], [7 x double] } addrspace(4)* @fa_2() nounwind {
%t = getelementptr { [7 x double], [7 x double] } addrspace(4)* null, i64 11
ret { [7 x double], [7 x double] } addrspace(4)* %t
}
define i64 @fa_3() nounwind {
%t = ptrtoint { [7 x double], [7 x double] } addrspace(4)* getelementptr ({
[7 x double], [7 x double] } addrspace(4)* null, i64 11) to i64
ret i64 %t
}
define i64 @fa_4() nounwind {
%t = mul i64 ptrtoint ({ [7 x double], [7 x double] } addrspace(4)*
getelementptr ({ [7 x double], [7 x double] } addrspace(4)* null, i64 11) to
i64), 5
ret i64 %t
}
define i64 @fa_5() nounwind {
%t = bitcast i64 mul (i64 3, i64 mul (i64 ptrtoint ({ [7 x double], [7 x
double] } addrspace(4)* getelementptr ({ [7 x double], [7 x double] }
addrspace(4)* null, i64 11) to i64), i64 5)) to i64
ret i64 %t
}
The above test case fails when being run because fa_4 and fa_5 do not produce
the same code at assembly, the structs { [7 x double], [7 x double] }
addrspace(4) somehow get incorrectly mapped to double*.
--
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