The patch adds the required methods to FixedPointBuilder
for converting between fixed-point and floating point,
and uses them from Clang.
This depends on D54749.
Paths
| Differential D86632
[Fixed Point] Add codegen for conversion between fixed-point and floating point. ClosedPublic Authored by ebevhan on Aug 26 2020, 8:37 AM.
Details Summary The patch adds the required methods to FixedPointBuilder This depends on D54749.
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 26 2020, 8:37 AM ebevhan added a parent revision: D86631: [Fixed Point] Add fixed-point to floating point cast types and consteval..Aug 26 2020, 8:38 AM
This revision is now accepted and ready to land.Sep 21 2020, 12:09 PM Comment Actions I had a question in the other patch about whether you should just have a method on FixedPointSemantics that returns the unscaled semantics (since FixedPointSemantics is totally capable of expressing integer types), which would let fitsInFloatSemantics have more obvious semantics. That would affect this as well. But otherwise I have no concerns. This revision was landed with ongoing or failed builds.Jan 12 2021, 4:53 AM Closed by commit rGc4944a6f53f6: [Fixed Point] Add codegen for conversion between fixed-point and floating point. (authored by ebevhan, committed by bjope). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 290245 clang/lib/CodeGen/CGExprScalar.cpp
clang/test/Frontend/fixed_point_compound.c
clang/test/Frontend/fixed_point_conversions.c
clang/test/Frontend/fixed_point_conversions_half.c
llvm/include/llvm/IR/FixedPointBuilder.h
|
I like this method name. Does this have the same problem as I asked about in the other patch about really needing to be about whether the *unscaled* fixed-point type fits in the given type?