llvm-project
bdf4ebad - [InstCombine] Fix demanded classes for fptrunc/fptrunc_round (#240523)

Commit
1 day ago
[InstCombine] Fix demanded classes for fptrunc/fptrunc_round (#240523) Fixes `simplifyDemandedUseFPClassFPTrunc` so that `bf16 = fptrunc(f32)` and `f80 = fptrunc(f128)` both demand a `fcSubnormal` source for a `fcNormal` result. This is because `bf16 = fptrunc(float32-max-subnormal)` rounds up to `bfloat16-min-normal`. This PR also adds non-trivial test coverage for `fptrunc.round`. AI Disclosure: I used Claude Opus 5 to help write the tests.
Author
Parents
Loading