-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Fix floating point fast-math intrinsics #32362
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
Conversation
r? @brson (rust_highfive has picked a reviewer for you, use r? to override) |
extern "C" void LLVMRustSetHasUnsafeAlgebra(LLVMValueRef Instr) { | ||
unwrap<Instruction>(Instr)->setHasUnsafeAlgebra(true); | ||
extern "C" void LLVMRustSetHasUnsafeAlgebra(LLVMValueRef V) { | ||
if(auto O = dyn_cast<Instruction>(unwrap<Value>(V))) O->setHasUnsafeAlgebra(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you put the body on a second line, and call the variable I
instead of O
? (because it's not an operator, sadly)
r? @eddyb |
@bors r+ p=1 This is blocking nightlies. |
📌 Commit ba89b25 has been approved by |
Fix floating point fast-math intrinsics The implementation did not handle the case where both operands were constants, which caused an llvm assertion: ``` rustc: //buildslave//rust-buildbot//slave//nightly-dist-rustc-musl-linux//build//src//llvm//include/llvm/Support/Casting.h:237: typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X = llvm::Instruction; Y = llvm::Value; typename llvm::cast_retty<X, Y*>::ret_type = llvm::Instruction*]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed. ```
The implementation did not handle the case where both operands were constants, which caused an llvm assertion: