-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
is_val_statically_known: ICE with different args #120480
Comments
@rustbot label +F-core_intrinsics -needs-triage |
@rustbot claim |
@Teapot4195 Would that check if the pointer address is constant or the referenced value is constant? I think for |
I think llvm.is.constant.ptr checks for whether or not the the pointer address is statically known. I don't think mutable variables in function bodies can be statically known and references to globals are guaranteed to fold to false. That covers all the cases I thought about but I'm fairly confident I missed something. |
They can be. It is usually the result of inlineing. Detecting that is kind of the point of the intrinsic. |
…piler-errors Avoid ICE when is_val_statically_known is not of a supported type 2 ICE with 1 stone! 1. Implement `llvm.is.constant.ptr` to avoid first ICE in linked issue. 2. return `false` when the argument is not one of `i*`/`f*`/`ptr` to avoid second ICE. fixes rust-lang#120480
…piler-errors Avoid ICE when is_val_statically_known is not of a supported type 2 ICE with 1 stone! 1. Implement `llvm.is.constant.ptr` to avoid first ICE in linked issue. 2. return `false` when the argument is not one of `i*`/`f*`/`ptr` to avoid second ICE. fixes rust-lang#120480
Rollup merge of rust-lang#120484 - Teapot4195:issue-120480-fix, r=compiler-errors Avoid ICE when is_val_statically_known is not of a supported type 2 ICE with 1 stone! 1. Implement `llvm.is.constant.ptr` to avoid first ICE in linked issue. 2. return `false` when the argument is not one of `i*`/`f*`/`ptr` to avoid second ICE. fixes rust-lang#120480
Code1
Code 2
Few ICEs with new intrinsic
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=cb804433ecbb2a93b148f472302cc0ef:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=863b2a8afb2364a85f572a57c57ad322:
Meta
rustc --version --verbose
:Error output 1
Backtrace 1
Error output 2
Backtrace 2
#119911, so cc @NCGThompson
The text was updated successfully, but these errors were encountered: