Page MenuHomePhabricator

SPIR-V FunctionCall Fail
ArchivedPublic

Authored by pmoreau on Jan 24 2016, 10:05 PM.
% NV50_PROG_DEBUG=255 nouveau_compiler -a 96 function_call.spv 1 jobs
Compiling for NV96
translating program of type 5
Parsing SPIR-V generated by 6 (version 10)
Version 1.0
ID bound: 18
called:4 (out %r2, in %r0 %r1)
BB:0 (1 instructions) - df = { }
-> BB:2 (tree)
0: bra BB:2 (0)
BB:2 (1 instructions) - df = { }
1: add u32 %r2 %r0 %r1 (0)
callee:12 ()
BB:0 (3 instructions) - df = { }
-> BB:2 (tree)
2: ld u32 %r0 s[0x10] (0)
3: ld u32 %r1 s[0x14] (0)
4: bra BB:2 (0)
BB:2 (3 instructions) - df = { }
5: mov u32 %r2 0x0000002a (0)
6: call called:4 %r3 %r0 %r2 (0)
7: st u32 # g[%r1+0x0] %r3 exit (0)
MAIN:-1 ()
BB:0 (0 instructions) - df = { }
called:4 (out %r2, in %r0 %r1)
BB:0 (1 instructions) - df = { }
-> BB:2 (tree)
0: bra BB:2 (0)
BB:2 (1 instructions) - df = { }
1: add u32 %r2 %r0 %r1 (0)
callee:12 ()
BB:0 (3 instructions) - df = { }
-> BB:2 (tree)
2: ld u32 %r0 s[0x10] (0)
3: ld u32 %r1 s[0x14] (0)
4: bra BB:2 (0)
BB:2 (3 instructions) - df = { }
5: mov u32 %r2 0x0000002a (0)
6: call called:4 %r3 %r0 %r2 (0)
7: st u32 # g[%r1+0x0] %r3 exit (0)
MAIN:-1 ()
BB:0 (0 instructions) - df = { }
called:4 (out %r2, in %r5 %r6 $r0)
BB:0 (2 instructions) - df = { }
-> BB:2 (tree)
0: mov u32 %r8 $r0 (0)
1: bra BB:2 (0)
BB:2 (1 instructions) - idom = BB:0, df = { }
2: add u32 %r9 %r5 %r6 (0)
callee:12 (in $r0)
BB:0 (4 instructions) - df = { }
-> BB:2 (tree)
3: mov u32 %r7 $r0 (0)
4: ld u32 %r8 s[0x10] (0)
5: ld u32 %r9 s[0x14] (0)
6: bra BB:2 (0)
BB:2 (3 instructions) - idom = BB:0, df = { }
7: mov u32 %r10 0x0000002a (0)
8: call called:4 %r11 %r8 %r10 %r7 (0)
9: st u32 # g[%r9+0x0] %r11 exit (0)
MAIN:-1 (in $r0)
BB:0 (1 instructions) - df = { }
10: mov u32 %r3 $r0 (0)
PEEPHOLE: DeadCodeElim
PEEPHOLE: CopyPropagation
PEEPHOLE: MergeSplits
PEEPHOLE: GlobalCSE
PEEPHOLE: LocalCSE
PEEPHOLE: AlgebraicOpt
PEEPHOLE: ModifierFolding
PEEPHOLE: ConstantFolding
PEEPHOLE: LoadPropagation
PEEPHOLE: IndirectPropagation
PEEPHOLE: MemoryOpt
PEEPHOLE: LocalCSE
PEEPHOLE: DeadCodeElim
called:4 (out %r2, in %r5 %r6 $r0)
BB:0 (1 instructions) - df = { }
-> BB:2 (tree)
0: bra BB:2 (0)
BB:2 (0 instructions) - idom = BB:0, df = { }
callee:12 (in $r0)
BB:0 (4 instructions) - df = { }
-> BB:2 (tree)
1: mov u32 %r7 $r0 (0)
2: ld u32 %r8 s[0x10] (0)
3: ld u32 %r9 s[0x14] (0)
4: bra BB:2 (0)
BB:2 (3 instructions) - idom = BB:0, df = { }
5: mov u32 %r10 0x0000002a (0)
6: call called:4 %r11 %r8 %r10 %r7 (0)
7: st u32 # g[%r9+0x0] %r11 exit (0)
MAIN:-1 (in $r0)
BB:0 (0 instructions) - df = { }
called:4 (out %r2, in %r5 %r6 $r0)
BB:0 (2 instructions) - df = { }
-> BB:2 (tree)
0: nop - # (0)
1: bra BB:2 (0)
BB:2 (0 instructions) - idom = BB:0, df = { }
buildLiveSets(BB:0)
buildLiveSets(BB:2)
BB:2 live set of out blocks:
BitSet of size 10:
BB:2 live set after propagation:
BitSet of size 10:
BB:0 live set of out blocks:
BitSet of size 10:
BB:0 live set after propagation:
BitSet of size 10:
BuildIntervals(BB:0)
BuildIntervals(BB:2)
allocateRegisters to 2 instructions
printing live intervals ...
livei(%7): [0 1)
RIG_Node[%0]($[1]-1): 2 colors, weight inf, deg 0/255
X
RIG_Node[%1]($[1]-1): 2 colors, weight inf, deg 0/255
X
RIG_Node[%2]($[1]-1): 2 colors, weight inf, deg 0/255
X
RIG_Node[%3]($[1]0): 2 colors, weight inf, deg 0/255
X
RIG_Node[%4]($[1]-1): 2 colors, weight inf, deg 0/255
X
RIG_Node[%5]($[1]-1): 2 colors, weight inf, deg 0/255
X
RIG_Node[%6]($[1]-1): 2 colors, weight inf, deg 0/255
X
RIG_Node[%7]($[1]0): 2 colors, weight inf, deg 0/255
X
RIG_Node[%8]($[1]-1): 2 colors, weight inf, deg 0/255
X
RIG_Node[%9]($[1]-1): 2 colors, weight inf, deg 0/255
X
SELECT phase
RegAlloc done: 1
nouveau_compiler: ../../../../../src/gallium/drivers/nouveau/codegen/nv50_ir_util.h:505: void nv50_ir::BitSet::setRange(unsigned int, unsigned int): Assertion `(i + n) <= size && (((i % 32) + n) <= 32)' failed.
zsh: abort (core dumped) NV50_PROG_DEBUG=255 nouveau_compiler -a 96 function_call.spv
#0 0x00007ffff6b7b5f8 in raise () from /usr/lib/libc.so.6
#1 0x00007ffff6b7ca7a in abort () from /usr/lib/libc.so.6
#2 0x00007ffff6b74417 in __assert_fail_base () from /usr/lib/libc.so.6
#3 0x00007ffff6b744c2 in __assert_fail () from /usr/lib/libc.so.6
#4 0x000000000048a9ba in nv50_ir::BitSet::setRange (this=0x7ffffffe8c20, i=2147483646, n=2)
at ../../../../../src/gallium/drivers/nouveau/codegen/nv50_ir_util.h:505
#5 0x0000000000481ae8 in nv50_ir::RegisterSet::occupy (this=0x7ffffffe8c00, f=nv50_ir::FILE_GPR, reg=2147483646,
size=2) at ../../../../../src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp:197
#6 0x0000000000481a3b in nv50_ir::RegisterSet::occupy (this=0x7ffffffe8c00, v=0x7f3340)
at ../../../../../src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp:185
#7 0x000000000048252c in nv50_ir::RegAlloc::ArgumentMovesPass::visit (this=0x7ffffffe9150, bb=0x802a90)
at ../../../../../src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp:527
#8 0x000000000042049d in nv50_ir::Pass::doRun (this=0x7ffffffe9150, func=0x8011e0, ordered=false, skipPhi=false)
at ../../../../../src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp:495
#9 0x0000000000420363 in nv50_ir::Pass::run (this=0x7ffffffe9150, func=0x8011e0, ordered=false, skipPhi=false)
at ../../../../../src/gallium/drivers/nouveau/codegen/nv50_ir_bb.cpp:477
#10 0x00000000004885f7 in nv50_ir::RegAlloc::execFunc (this=0x7ffffffe9270)
at ../../../../../src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp:1830
#11 0x0000000000488387 in nv50_ir::RegAlloc::exec (this=0x7ffffffe9270)
at ../../../../../src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp:1794
#12 0x0000000000488c66 in nv50_ir::Program::registerAllocation (this=0x7e6fb0)
at ../../../../../src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp:1913
#13 0x0000000000416fa9 in nv50_ir_generate_code (info=0x7ffffffe9340)
at ../../../../../src/gallium/drivers/nouveau/codegen/nv50_ir.cpp:1204
#14 0x0000000000402f39 in nouveau_codegen_spirv (chipset=172, binary=0x7ffffffe9f80 "\003\002#\a", binarySize=540,
size=0x7ffffffe9f7c, code=0x7ffffffe9f70) at ../../../../../src/gallium/drivers/nouveau/nouveau_compiler.c:125
#15 0x0000000000403325 in main (argc=4, argv=0x7fffffffe098)
at ../../../../../src/gallium/drivers/nouveau/nouveau_compiler.c:225

Event Timeline

pmoreau created this object with visibility "Public (No Login Required)".
pmoreau created this object with edit policy "Nouveau (Project)".