-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
Invalid codegen for wasm at opt-level=0 #51986
Copy link
Copy link
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/
Description
Activity
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/Target: WASM (WebAssembly), http://webassembly.org/
I've reported an upstream LLVM bug for this but I want to track it on our side as well to track pulling in the fix. The gist of the issue is that this code:
will execute successfully when compiled at O0:
And it should certainly panic!
I'm currently hoping we can fix this upstream in LLVM before we need to work around it in rustc!