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

Invalid record when running llvm-dis #56

Closed
bohde opened this issue Feb 22, 2018 · 2 comments
Closed

Invalid record when running llvm-dis #56

bohde opened this issue Feb 22, 2018 · 2 comments

Comments

@bohde
Copy link

bohde commented Feb 22, 2018

I was trying to test out the Tapir using the command line tools, and whenever I use llvm-dis, I get the following error:

llvm-dis: error: Invalid record (Producer: 'LLVM5.0.0git-ec3ad2b' Reader: 'LLVM 5.0.0git-ec3ad2b')

I'm using version ec3ad2b, and using the following command to replicate it:

llvm-as nloop.ll -o=- | llvm-dis

The nloop.ll file is below:

declare token @llvm.syncregion.start() #3

declare void @print(i32)

define void @test (i32 %n) {
entry:
    %i = alloca i32
    store i32 0, i32* %i  ; store it back
    br label %loop.1.entry

loop.1.entry:
    %tmp = load i32, i32* %i
    %cmp = icmp ne i32 %tmp, %n
    br i1 %cmp, label %loop.1.body, label %loop.1.exit

loop.1.body:
    %syncreg = call token @llvm.syncregion.start()
    detach within %syncreg, label %loop.1.body.1, label %loop.1.body.2

loop.1.body.1:
    %tmp2 = load i32, i32* %i
    call void @print(i32 %tmp2)
    reattach within %syncreg, label %loop.1.body.2

loop.1.body.2:
    %tmp3 = load i32, i32* %i
    %tmp4 = add i32 %tmp3, 1   ; increment it
    store i32 %tmp4, i32* %i  ; store it back
    br label %loop.1.final

loop.1.final:
    sync within %syncreg, label %loop.1.entry

loop.1.exit:
    ret void
}
neboat added a commit that referenced this issue Feb 24, 2018
…ss Tapir sync instructions correctly. This change addresses issue #56.
@neboat
Copy link
Collaborator

neboat commented Feb 24, 2018

Thank you for the report. I think I've identified the source of the bug, and I'm testing a fix now on the CI.

wsmoses pushed a commit that referenced this issue Feb 25, 2018
…ss Tapir sync instructions correctly. This change addresses issue #56.
@wsmoses
Copy link
Owner

wsmoses commented Feb 25, 2018

Resolved by #57

@wsmoses wsmoses closed this as completed Feb 25, 2018
neboat added a commit that referenced this issue Mar 11, 2018
…ss Tapir sync instructions correctly. This change addresses issue #56.
neboat added a commit that referenced this issue Mar 24, 2018
…ss Tapir sync instructions correctly. This change addresses issue #56.
wsmoses pushed a commit that referenced this issue Nov 1, 2018
…ss Tapir sync instructions correctly. This change addresses issue #56.
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue Dec 19, 2018
…ss Tapir sync instructions correctly. This change addresses issue wsmoses#56.
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue Dec 20, 2018
…ss Tapir sync instructions correctly. This change addresses issue wsmoses#56.
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue Dec 20, 2018
…ss Tapir sync instructions correctly. This change addresses issue wsmoses#56.
stelleg pushed a commit to stelleg/Tapir-LLVM that referenced this issue Jan 12, 2019
…ss Tapir sync instructions correctly. This change addresses issue wsmoses#56.
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

3 participants