Skip to content

ret guard makes the LLVM verifier sad #958

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

Closed
jruderman opened this issue Sep 21, 2011 · 0 comments
Closed

ret guard makes the LLVM verifier sad #958

jruderman opened this issue Sep 21, 2011 · 0 comments

Comments

@jruderman
Copy link
Contributor

fn main() {
    alt 2 {
      x when (ret) { x; }
    }
}

LLVM dies saying:

PHINode should have one entry for each predecessor of its parent basic block!
  %6 = phi i32* [ %3, %9 ]
Broken module found, compilation aborted!
Stack dump:
0.      Running pass 'Function Pass Manager' on module 'rust_out'.
1.      Running pass 'Module Verifier' on function '@_ZN4main17_58aa485ede601b15E'

with the stack:

0   librustllvm.dylib               0x0161ca67 abort + 39
1   librustllvm.dylib               0x015b8563 (anonymous namespace)::Verifier::abortIfBroken() + 211
2   librustllvm.dylib               0x015c9fc7 (anonymous namespace)::Verifier::runOnFunction(llvm::Function&) + 1927
3   librustllvm.dylib               0x01599f1f llvm::FPPassManager::runOnFunction(llvm::Function&) + 655
4   librustllvm.dylib               0x0159a02c llvm::FPPassManager::runOnModule(llvm::Module&) + 156
5   librustllvm.dylib               0x0159986f llvm::MPPassManager::runOnModule(llvm::Module&) + 639
6   librustllvm.dylib               0x01599b4c llvm::PassManagerImpl::run(llvm::Module&) + 172
7   librustllvm.dylib               0x01599c8b llvm::PassManager::run(llvm::Module&) + 27
8   librustllvm.dylib               0x009fc5a0 LLVMRustWriteOutputFile + 768 (RustWrapper.cpp:96)
9   rustc                           0x00009007 _ZN3lib4llvm4llvmE681 + 119
10  rustc                           0x00632a86 back::link::write::run_passes::anon7290::anon7291 + 150
11  libstd.dylib                    0x00908cc6 str::as_buf + 294
12  rustc                           0x006329cb back::link::write::run_passes::anon7290 + 187
13  libstd.dylib                    0x00908cc6 str::as_buf + 294
14  rustc                           0x004e3d77 back::link::write::run_passes + 14391
15  rustc                           0x0064106e driver::rustc::compile_input::thunk8003 + 158
16  rustc                           0x00557ea0 driver::rustc::time + 352
17  rustc                           0x0055f3c7 driver::rustc::compile_input + 23431
18  rustc                           0x0057ddb8 driver::rustc::main + 45960
19  rustc                           0x0057f90f _rust_main + 63
20  rustc                           0x00645b1f _rust_main_wrap + 31
21  librustrt.dylib                 0x0088af4c task_start_wrapper + 60 (rust_task.cpp:149)
bors pushed a commit to rust-lang-ci/rust that referenced this issue Oct 26, 2020
bors pushed a commit to rust-lang-ci/rust that referenced this issue Oct 26, 2020
Fixes rust-lang#958: Use session.fatal() instead of assert!
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
coastalwhite pushed a commit to coastalwhite/rust that referenced this issue Aug 5, 2023
`_xgetbv` was reimplemented to use inline assembly in rust-lang#333 since LLVM
3.9 didn't export the intrinsic we needed to use.  LLVM 4.0 has since
rectified that issue, and since rust's minimum supported version of LLVM
is 8.0, this change can be reverted.
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

2 participants