Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add constant evaluation for fmod to CodeGen
When you use literals with fmod, it generates the hl intrinsic usind double. During HLOperationLower, this expands to several operations, including DXIL FRC intrinsic. FRC intrinsic doesn't support double, so GetOpFunc returns nullptr for the overload. nullptr is blindly used in CreateCall, which crashes trying to deref nullptr. This change fixes the literal case by adding constant eval to CodeGen for this intrinsic. It will still crash if non-constant doubles are used explicitly. Fixing that will require a special path in HLOperationLower to change the generated instruction sequence to something compatible with double.
- Loading branch information