Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llc fails to lower from SPIR to HSAIL/BRIG #5

Open
el1goluj opened this issue Sep 9, 2014 · 0 comments
Open

llc fails to lower from SPIR to HSAIL/BRIG #5

el1goluj opened this issue Sep 9, 2014 · 0 comments

Comments

@el1goluj
Copy link

el1goluj commented Sep 9, 2014

In kernel.cl.promote.bc, there is one load atomic instruction trigger this error:
%15 = load atomic i32 addrspace(1)* %11 seq_cst, align 4, !mem.scope !9

%15 is not used anywhere in the function so it shall be optimized away, but for some reason current HSAIL Compiler will crash.

Command
clamp-hsatools kernel.cl.promote.bc kernel.cl

Error message
/home/el1goluj/cppamp/build/lib/clamp-hsatools kernel.cl.promote.bc kernel.cl
llc: /home/amd/Perforce/praghave_msdnkv69_2767/drivers/opencl/compiler/llvm/include/llvm/CodeGen/MachineInstr.h:250: const llvm::MachineOperand& llvm::MachineInstr::getOperand(unsigned int) const: Assertion `i < getNumOperands() && "getOperand() out of range!"' failed.
0 llc 0x00000000012ea0ff
1 llc 0x00000000012e9df8
2 libpthread.so.0 0x00007fb13dd48340
3 libc.so.6 0x00007fb13d17ef89 gsignal + 57
4 libc.so.6 0x00007fb13d182398 abort + 328
5 libc.so.6 0x00007fb13d177e46
6 libc.so.6 0x00007fb13d177ef2
7 llc 0x00000000008d4fa5
8 llc 0x0000000000e0c4cf
9 llc 0x0000000000e0bd63
10 llc 0x0000000000e0a38c
11 llc 0x0000000000df936b llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 95
12 llc 0x00000000011fa8b1 llvm::FPPassManager::runOnFunction(llvm::Function&) + 289
13 llc 0x00000000011faa70 llvm::FPPassManager::runOnModule(llvm::Module&) + 102
14 llc 0x00000000011fad69 llvm::MPPassManager::runOnModule(llvm::Module&) + 395
15 llc 0x00000000011fb2cc llvm::PassManagerImpl::run(llvm::Module&) + 120
16 llc 0x00000000011fb4ad llvm::PassManager::run(llvm::Module&) + 39
17 llc 0x00000000008a9fb3 main + 4398
18 libc.so.6 0x00007fb13d169ec5 __libc_start_main + 245
19 llc 0x00000000008a8837
Stack dump:
0. Program arguments: /opt/amd/bin/llc -O2 -march=hsail-64 -o kernel.cl.promote.bc.brig kernel.cl.promote.bc.opt.bc

  1. Running pass 'Function Pass Manager' on module 'kernel.cl.promote.bc.opt.bc'.
  2. Running pass 'Machine Loop Invariant Code Motion' on function '@ZZ4mainEN3_EC__119__cxxamp_trampolineE_0PiPNSt3__16atomicIiEE'
    /home/el1goluj/cppamp/build/lib/clamp-hsatools: línea 16: 5246 Abortado (`core' generado) $LLVM_BIN/llc -O2 -march=hsail-64 -o $1.brig $1.opt.bc
    Error 2 (No such file or directory) opening "kernel.cl.promote.bc.brig"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant