-
Notifications
You must be signed in to change notification settings - Fork 13.4k
unsigned int getFPReg(const llvm::MachineOperand&): Assertion `Reg >= X86::FP0 && Reg <= X86::FP6 && "Expected FP register!" #41013
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
Comments
The underlying problem/workaround on this 1 appears to be that we don't have constant folding for an frem node in SDAG. This gets folded in IR with -instsimplify for example. |
SelectionDAG::foldConstantFPMath will handle FREM constant folding, but not if it will cause a APFloat::opDivByZero |
Ah, the same restriction is on fdiv...and that seems wrong. If it's not a strict node, I think we should always fold it. |
The failure here isn't caused by the constants. It's caused by calling fmod with double arguments on an sse1 only target. This fails too define void @accum(double %x, double %y ) #0 {
entry:
%B6 = frem double %y, %x
store double %B6, double* undef
unreachable
}
attributes #0 = { "target-features"="+sse,-avx,-avx2,-sse2" } We ended up with an xmm0 to fp0 COPY instruction which isn't supported. I feel like I've seen something like this before. |
We've definitely seen variations of this before - see related bugs.
|
Extended Description
Reduced from https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14508
The text was updated successfully, but these errors were encountered: