Rail Shafigulin via llvm-dev
2016-Mar-23 18:51 UTC
[llvm-dev] supporting a type but not supporting an operaion
i'm looking at https://github.com/llvm-mirror/llvm/blob/master/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp#L2107 but i don't quite understand the comment. how is it possible for a target not to support an operation and yet support a type? can someone give an example. i realize the question might sound silly, but i'm not really getting it. any help is appreciated. -- Rail Shafigulin Software Engineer Esencia Technologies -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160323/10fec255/attachment.html>
Krzysztof Parzyszek via llvm-dev
2016-Mar-23 18:55 UTC
[llvm-dev] supporting a type but not supporting an operaion
On 3/23/2016 1:51 PM, Rail Shafigulin via llvm-dev wrote:> i'm looking at > https://github.com/llvm-mirror/llvm/blob/master/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp#L2107 > but i don't quite understand the comment. how is it possible for a > target not to support an operation and yet support a type? can someone > give an example. i realize the question might sound silly, but i'm not > really getting it.A type is "supported" (i.e. legal) if there is a register that can hold it. Specifically, if there is a register class associated with that type. A support of an operation means that there is an instruction (or a short sequence of instructions) that implements given operation. For example, a target can have 128-bit registers, but the only instructions that use them may be load, store and an arithmetic "add". In such a case, i128 is a supported type, but a "sub" operation on 128-bit values is not. -Krzysztof -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Rail Shafigulin via llvm-dev
2016-Mar-23 19:17 UTC
[llvm-dev] supporting a type but not supporting an operaion
> > A type is "supported" (i.e. legal) if there is a register that can hold > it. Specifically, if there is a register class associated with that type. > A support of an operation means that there is an instruction (or a short > sequence of instructions) that implements given operation. > For example, a target can have 128-bit registers, but the only > instructions that use them may be load, store and an arithmetic "add". In > such a case, i128 is a supported type, but a "sub" operation on 128-bit > values is not. > > -Krzysztof > > Oh I see. Thanks.> -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted > by The Linux Foundation > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- Rail Shafigulin Software Engineer Esencia Technologies -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160323/e644bc18/attachment.html>