[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


          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 =
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