diff mbox

[Bug,105200,r600g] Regression: ImageMagick OpenCL kernel no longer compiles

Message ID bug-105200-502-gyrg1vrvq4@http.bugs.freedesktop.org/ (mailing list archive)
State New, archived
Headers show

Commit Message

bugzilla-daemon@freedesktop.org Feb. 23, 2018, 2 a.m. UTC
https://bugs.freedesktop.org/show_bug.cgi?id=105200

--- Comment #2 from nixscripter@gmail.com ---
It seems the libclc version I'm using was Feb 2nd. Good point

... and now that I've tried to compile SVN r325851, I see why it was held back.

First, I had to patch this:

And this is after I did my little patch to avoid an LLVM syntax error:



And then... more address space issues:

[...]
WARNING: Linking two modules of different data layouts:
'r600--/lib/relational/isnormal.cl.cayman.bc' is
'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-A5'
whereas 'llvm-link' is
'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64'

WARNING: Linking two modules of different data layouts:
'r600--/lib/relational/isnotequal.cl.cayman.bc' is
'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-A5'
whereas 'llvm-link' is
'e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64'
[...]
Allocation instruction pointer not in the stack address space!
  %2 = alloca i32, align 4, addrspace(5)
Allocation instruction pointer not in the stack address space!
  %3 = alloca i32, align 4, addrspace(5)
Allocation instruction pointer not in the stack address space!
  %4 = alloca i32, align 4, addrspace(5)
Allocation instruction pointer not in the stack address space!
  %5 = alloca i32, align 4, addrspace(5)
Allocation instruction pointer not in the stack address space!
  %6 = alloca i32, align 4, addrspace(5)
[...]
Allocation instruction pointer not in the stack address space!
  %33 = alloca float, align 4, addrspace(5)
/usr/bin/llvm-link: error: linked module is broken!
make: *** [Makefile:3127: r600--/lib/builtins.link.cedar.bc] Error 1
diff mbox

Patch

Index: utils/prepare-builtins.cpp
===================================================================
--- utils/prepare-builtins.cpp  (revision 325851)
+++ utils/prepare-builtins.cpp  (working copy)
@@ -105,7 +105,7 @@ 
     exit(1);
   }

-  WriteBitcodeToFile(M, Out->os());
+  WriteBitcodeToFile(*M, Out->os());

   // Declare success.
   Out->keep();