Expand fdiv32 instruction to generate the desired precision following IEEE spec.
Details
Details
- Reviewers
• tstellarAMD arsenm wdng
NOTE: we may still need to modify fdiv.ll test to check the exact code sequence!
This implementation has mainly been done by Wei!
Diff Detail
Diff Detail
Event Timeline
Comment Actions
New diff posted. This actually implements the lowering of 32-bit floating point division: SITargetLowering::LowerFDIV32.
It affects frem because frem is using fdiv.
Comment Actions
The fdiv test must be modified.
We should not simply replace the division lowering this way. This should be controlled by precision options, so the existing lowering should still be able to work
Comment Actions
Update based on Matt's comments:
- Keep the original fpdiv32 expansion under fast_math;
- update the LIT test for fpdiv.ll
Comment Actions
Add a test with function attribute "unsafe-fp-math=true";
Correct a typo (SI-DAG instead of SI_DAG)
Thanks;
Can you add a test where the fast math flag is missing from the interaction, but globally enabled?