[Mesa-dev] [Bug 70150] New: Mesa downsizes to i32 the types ulong and long
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Oct 4 13:01:10 PDT 2013
https://bugs.freedesktop.org/show_bug.cgi?id=70150
Priority: medium
Bug ID: 70150
Assignee: mesa-dev at lists.freedesktop.org
Summary: Mesa downsizes to i32 the types ulong and long
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: klondike at klondike.es
Hardware: x86-64 (AMD64)
Status: NEW
Version: 9.2
Component: Other
Product: Mesa
Given the following opencl code:
__kernel void ldiv(__global long * out, long arg0, long arg1)
{
out[0] = arg0 / arg1;
}
Mesa generates the following code:
; ModuleID = 'radeon'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-v2048:2048:2048-n32:64"
target triple = "r600--"
; Function Attrs: nounwind
define void @ldiv(i32 addrspace(1)* nocapture %out, i32 %arg0, i32 %arg1) #0 {
%1 = sdiv i32 %arg0, %arg1
store i32 %1, i32 addrspace(1)* %out, align 4, !tbaa !1
ret void
}
attributes #0 = { nounwind "less-precise-fpmad"="false"
"no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf"="false"
"no-infs-fp-math"="false" "no-nans-fp-math"="false" "unsafe-fp-math"="false"
"use-soft-float"="false" }
!opencl.kernels = !{!0}
!0 = metadata !{void (i32 addrspace(1)*, i32, i32)* @ldiv}
!1 = metadata !{metadata !"long", metadata !2}
!2 = metadata !{metadata !"omnipotent char", metadata !3}
!3 = metadata !{metadata !"Simple C/C++ TBAA"}
This is obviously wrong since according to the opencl specification (Section
6.1.1 "Built-in Scalar Data Types") the long and ulong types are 64 bit long
whilst i32 is 32 bit long.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131004/fceb51b1/attachment.html>
More information about the mesa-dev
mailing list