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

optnone function results in MachineBasicBlocks with duplicated predecessors #24955

Closed
MatzeB opened this issue Aug 26, 2015 · 3 comments
Closed
Assignees
Labels
bugzilla Issues migrated from bugzilla llvm:codegen

Comments

@MatzeB
Copy link
Contributor

MatzeB commented Aug 26, 2015

Bugzilla Link 24581
Resolution FIXED
Resolved on Aug 26, 2015 15:47
Version trunk
OS All
CC @pogo59

Extended Description

The machine verifier enforces the property that no block is listed twice in the successor or predecessor list. For a function with the optnone function this is not always true after instruction selection. Example:

cat test.ll
define void @​bar() #​0 {
entry:
br i1 undef, label %exit, label %exit

exit:
ret void
}

attributes #​0 = { noinline optnone }

llc -verify-machineinstrs test.ll
...
*** Bad machine code: MBB has duplicate entries in its successor list. ***
...

I'm not sure why the machine verifier enforces this property, without the optnone attribute the codegenprepare appears to remove those pointless jumps though I am not sure yet whether this is on purpose to avoid the verification problems.

@MatzeB
Copy link
Contributor Author

MatzeB commented Aug 26, 2015

assigned to @MatzeB

@MatzeB
Copy link
Contributor Author

MatzeB commented Aug 26, 2015

http://reviews.llvm.org/D12350 fixes this.

@MatzeB
Copy link
Contributor Author

MatzeB commented Aug 26, 2015

Fixed in r246074.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla llvm:codegen
Projects
None yet
Development

No branches or pull requests

1 participant