[llvm-dev] RFC: Complex in LLVM
David Greene via llvm-dev
llvm-dev at lists.llvm.org
Tue Jul 2 08:52:15 PDT 2019
Björn Pettersson A <bjorn.a.pettersson at ericsson.com> writes:
> If I understand the proposal correctly these new types aren't really
> limited to floating point.
Currently they are but we could relax that.
> We probably want to use them for fixed point types as well
>
> c32 %res = smul.fix c32 %a, c32 %b, i16 31
> v4c32 %res = sadd.sat v4c32 %a, v4c32 %b
Wouldn't we want a different type for such a thing?
I'm trying to come up with a good name fox complex<fixed-point>.
Originally I thought maybe ci32 but that might be interpreted as a
Gaussian integer. Is a Gaussian integer type useful? I haven't ever
seen it used in my time here (though I can't claim to have super-deep
knowledge of full applications) but maybe it's more prominent in other
domains.
> at least if that simplifies loop vectorization etc.
It probably would.
> Then it would be neat to also have c16.
Agreed.
> (btw, downstream we'd probably try to add c24 and c40 as well,
> similar to what we do today for i24 and i40 types).
As I said in my reply to Hal, a general complex<floating-or-fixed-type>
may be the way to go.
-David
More information about the llvm-dev
mailing list