[llvm-dev] [RFC] Matrix support (take 2)

David Greene via llvm-dev llvm-dev at lists.llvm.org
Thu Dec 20 10:05:32 PST 2018


Roman Lebedev via llvm-dev <llvm-dev at lists.llvm.org> writes:

> Much like as with native fixed-point type support, a whole new
> incompatible type is suggested to be added here.  I *suspect*, *every*
> single transform in instcombine/instsimplify will need to be
> *duplicated*.

Only for operations which can be masked (and therefore use the new
type).  We may or may not care about masking integer adds and subtracts,
for example, or bitwise operations.  We may want to do so for power
reasons (and maybe others?) but it's generally not required for
correctness.

> That is a lot. Intrinsics sound like less intrusive solution, in both
> cases.

I don't see how intrinsics is any less work.  We'll need to duplicate
transforms for every intrinsic we add, which seems to be the moral
equivalent of duplicating transforms for every operation we care about
using the new type.  Intrinsics have the added disadvantage of being
semantically opaque.

                               -David


More information about the llvm-dev mailing list