swift
4d1df28d - ConstantFolding: add constant folding for some floating point intrinsics

Commit
1 year ago
ConstantFolding: add constant folding for some floating point intrinsics * `sitofp` signed integer to floating point * `rint` round floating point to integral * `bitcast` between integer and floating point Constant folding `bitcast`s also made it necessary to rewrite constant folding for Nan and inf values, because the old code explicitly checked for `bitcast` intrinsics. Relying on constant folded `bitcast`s makes the new version much simpler. It is important to constant fold these intrinsics already in SIL because it enables other optimizations.
Author
Committer
Parents
Loading